Lines Matching refs:Flag
54 struct Flag { struct
173 Flag flags[] = {
183 static const char* Type2String(Flag::FlagType type) { in Type2String()
185 case Flag::TYPE_BOOL: return "bool"; in Type2String()
186 case Flag::TYPE_INT: return "int"; in Type2String()
187 case Flag::TYPE_FLOAT: return "float"; in Type2String()
188 case Flag::TYPE_STRING: return "string"; in Type2String()
189 case Flag::TYPE_ARGS: return "arguments"; in Type2String()
196 static SmartArrayPointer<const char> ToString(Flag* flag) { in ToString()
200 case Flag::TYPE_BOOL: in ToString()
203 case Flag::TYPE_INT: in ToString()
206 case Flag::TYPE_FLOAT: in ToString()
209 case Flag::TYPE_STRING: { in ToString()
214 case Flag::TYPE_ARGS: { in ToString()
232 Flag* args_flag = NULL; in argv()
234 Flag* f = &flags[i]; in argv()
236 if (f->type() == Flag::TYPE_ARGS) { in argv()
243 if (f->type() != Flag::TYPE_BOOL || *(f->bool_variable())) { in argv()
249 if (f->type() != Flag::TYPE_BOOL) { in argv()
333 static Flag* FindFlag(const char* name) { in FindFlag()
360 Flag* flag = FindFlag(name); in SetFlagsFromCommandLine()
376 if (flag->type() != Flag::TYPE_BOOL && in SetFlagsFromCommandLine()
377 flag->type() != Flag::TYPE_ARGS && in SetFlagsFromCommandLine()
392 case Flag::TYPE_BOOL: in SetFlagsFromCommandLine()
395 case Flag::TYPE_INT: in SetFlagsFromCommandLine()
398 case Flag::TYPE_FLOAT: in SetFlagsFromCommandLine()
401 case Flag::TYPE_STRING: in SetFlagsFromCommandLine()
404 case Flag::TYPE_ARGS: { in SetFlagsFromCommandLine()
421 if ((flag->type() == Flag::TYPE_BOOL && value != NULL) || in SetFlagsFromCommandLine()
422 (flag->type() != Flag::TYPE_BOOL && is_bool) || in SetFlagsFromCommandLine()
530 Flag* f = &flags[i]; in PrintHelp()