Lines Matching defs:Flag
54 struct Flag { struct
55 enum FlagType { TYPE_BOOL, TYPE_INT, TYPE_FLOAT, TYPE_STRING, TYPE_ARGS };
57 FlagType type_; // What type of flag, bool, int, or string.
58 const char* name_; // Name of the flag, ex "my_flag".
59 void* valptr_; // Pointer to the global flag variable.
60 const void* defptr_; // Pointer to the default value.
61 const char* cmt_; // A comment about the flags purpose.
62 bool owns_ptr_; // Does the flag own its string value?
64 FlagType type() const { return type_; } in type()
66 const char* name() const { return name_; } in name()
68 const char* comment() const { return cmt_; } in comment()
70 bool* bool_variable() const { in bool_variable()
75 int* int_variable() const { in int_variable()
80 double* float_variable() const { in float_variable()
85 const char* string_value() const { in string_value()
90 void set_string_value(const char* value, bool owns_ptr) { in set_string_value()
98 JSArguments* args_variable() const { in args_variable()
103 bool bool_default() const { in bool_default()
108 int int_default() const { in int_default()
113 double float_default() const { in float_default()
118 const char* string_default() const { in string_default()
123 JSArguments args_default() const { in args_default()
129 bool IsDefault() const { in IsDefault()
152 void Reset() { in Reset()