| Index: tools/gn/source_file_type.h
|
| diff --git a/tools/gn/source_file_type.h b/tools/gn/source_file_type.h
|
| index c43b4324443e5184709390fd5bfb658fc6a5edfd..af71d1c99ebb139322a8eeefd0767ce32901b8b8 100644
|
| --- a/tools/gn/source_file_type.h
|
| +++ b/tools/gn/source_file_type.h
|
| @@ -28,4 +28,19 @@ enum SourceFileType {
|
|
|
| SourceFileType GetSourceFileType(const SourceFile& file);
|
|
|
| +// Represents a set of tool types.
|
| +class SourceFileTypeSet {
|
| + public:
|
| + SourceFileTypeSet() {
|
| + for (auto& flag : flags_)
|
| + flag = 0;
|
| + }
|
| +
|
| + void Set(SourceFileType type) { flags_[static_cast<int>(type)] = true; }
|
| + bool Get(SourceFileType type) const { return flags_[static_cast<int>(type)]; }
|
| +
|
| + private:
|
| + bool flags_[static_cast<int>(SOURCE_NUMTYPES)];
|
| +};
|
| +
|
| #endif // TOOLS_GN_SOURCE_FILE_TYPE_H_
|
|
|