Lines Matching refs:name

83 // name) and argv (the entire commandline), which we sock away a copy of.
87 string name; // the name of the flag
131 extern bool GetCommandLineOption(const char* name, string* OUTPUT);
135 extern bool GetCommandLineFlagInfo(const char* name,
138 // Return the CommandLineFlagInfo of the flagname. exit() if name not found.
141 extern CommandLineFlagInfo GetCommandLineFlagInfoOrDie(const char* name);
158 // it to be empty if the setting failed for some reason -- the name is
159 // not a valid flag name, or the value is not a valid value -- and
163 extern string SetCommandLineOption(const char* name, const char* value);
164 extern string SetCommandLineOptionWithMode(const char* name, const char* value,
311 // Note that when we define a flag variable FLAGS_<name>, we also
312 // preemptively define a junk variable, FLAGS_no<name>. This is to
335 FlagRegisterer(const char* name, const char* type,
365 // FLAGS_no<name>. This serves the second purpose of assuring a
366 // compile error if someone tries to define a flag named no<name>
368 #define DEFINE_VARIABLE(type, shorttype, name, value, help) \
370 static const type FLAGS_nono##name = value; \
371 type FLAGS_##name = FLAGS_nono##name; \
372 type FLAGS_no##name = FLAGS_nono##name; \
373 static FlagRegisterer o_##name( \
374 #name, #type, MAYBE_STRIPPED_HELP(help), __FILE__, \
375 &FLAGS_##name, &FLAGS_no##name); \
377 using fL##shorttype::FLAGS_##name
379 #define DECLARE_VARIABLE(type, shorttype, name) \
381 extern type FLAGS_##name; \
383 using fL##shorttype::FLAGS_##name
394 extern bool FlagsTypeWarn(const char *name);
396 #define DECLARE_bool(name) DECLARE_VARIABLE(bool,B, name)
398 #define DEFINE_bool(name,val,txt) namespace fLB { \
399 const bool FLAGS_nonono##name = \
402 ? FlagsTypeWarn(#name) : true; \
404 DEFINE_VARIABLE(bool,B, name, val, txt)
405 #define DECLARE_int32(name) DECLARE_VARIABLE(int32,I, name)
406 #define DEFINE_int32(name,val,txt) DEFINE_VARIABLE(int32,I, name, val, txt)
408 #define DECLARE_int64(name) DECLARE_VARIABLE(int64,I64, name)
409 #define DEFINE_int64(name,val,txt) DEFINE_VARIABLE(int64,I64, name, val, txt)
411 #define DECLARE_uint64(name) DECLARE_VARIABLE(uint64,U64, name)
412 #define DEFINE_uint64(name,val,txt) DEFINE_VARIABLE(uint64,U64, name, val, txt)
414 #define DECLARE_double(name) DECLARE_VARIABLE(double,D, name)
415 #define DEFINE_double(name,val,txt) DEFINE_VARIABLE(double,D, name, val, txt)
423 #define DECLARE_string(name) namespace fLS { extern string& FLAGS_##name; } \
424 using fLS::FLAGS_##name
426 // We need to define a var named FLAGS_no##name so people don't define
430 #define DEFINE_string(name, val, txt) \
432 static union { void* align; char s[sizeof(string)]; } s_##name[2]; \
433 const string* const FLAGS_no##name = new (s_##name[0].s) string(val); \
434 static FlagRegisterer o_##name( \
435 #name, "string", MAYBE_STRIPPED_HELP(txt), __FILE__, \
436 s_##name[0].s, new (s_##name[1].s) string(*FLAGS_no##name)); \
437 string& FLAGS_##name = *(reinterpret_cast<string*>(s_##name[0].s)); \
439 using fLS::FLAGS_##name