| 7 | class OptionProto; |
| 8 | |
| 9 | class FlagGroup |
| 10 | { |
| 11 | public: |
| 12 | FlagGroup(); |
| 13 | FlagGroup(std::initializer_list<FlagGroup*> groups); |
| 14 | |
| 15 | public: |
| 16 | void parseFlags( |
| 17 | int argc, |
| 18 | const char* argv[], |
| 19 | std::function<bool(const std::string&)> callback = |
| 20 | [](const auto&) |
| 21 | { |
| 22 | return false; |
| 23 | }); |
| 24 | std::vector<std::string> parseFlagsWithFilenames( |
| 25 | int argc, |
| 26 | const char* argv[], |
| 27 | std::function<bool(const std::string&)> callback = |
| 28 | [](const auto&) |
| 29 | { |
| 30 | return false; |
| 31 | }); |
| 32 | void parseFlagsWithConfigFiles(int argc, |
| 33 | const char* argv[], |
| 34 | const std::map<std::string, const ConfigProto*>& configFiles); |
| 35 | |
| 36 | void addFlag(Flag* flag); |
| 37 | void checkInitialised() const; |
| 38 | |
| 39 | private: |
| 40 | bool _initialised = false; |
| 41 | const std::vector<FlagGroup*> _groups; |
| 42 | std::vector<Flag*> _flags; |
| 43 | }; |
| 44 | |
| 45 | class Flag |
| 46 | { |
no outgoing calls
no test coverage detected