Lines Matching defs:flags
26 // required and optional flags.
36 // - Both long-form and short-form flags are supported, but boolean flags don't
46 // - This implementation also supports string flags:
58 // However, flags are usually using hyphens for word separation. Hence
63 // -> in the code: flags::my_flag.value()
75 // In most cases, you want to define some flags, parse them, and query them.
85 // if (!flags::Parse(argv)) {
89 // if (flags::h.value()) {
94 // printf("flag value: %s\n", flags::my_flag.value().c_str());
95 // for (const std::string& arg : flags::positional_arguments) {
102 // Those macros can be used to define flags.
108 // - in the code: flags::my_flag
125 namespace flags {
127 // Parse the command-line arguments, checking flags, and separating positional
128 // arguments from flags.
137 } // namespace flags
144 // flags::my_flag.
153 namespace flags { \
160 extern flags::Flag<Type> flags::Name
167 namespace flags {
195 // Static class keeping track of the flags/arguments values.
232 static std::vector<FlagInfo> flags;
233 return flags;
260 } // namespace flags