Home | History | Annotate | Download | only in src

Lines Matching refs:FLAG

8 #define FLAG(name) FLAGS_##name
11 #define DECLARE_bool(name) extern bool FLAG(name)
12 #define DECLARE_int32(name) extern int32_t FLAG(name)
13 #define DECLARE_int64(name) extern int64_t FLAG(name)
14 #define DECLARE_double(name) extern double FLAG(name)
15 #define DECLARE_string(name) extern std::string FLAG(name)
18 #define DEFINE_bool(name, default_val, doc) bool FLAG(name) = (default_val)
19 #define DEFINE_int32(name, default_val, doc) int32_t FLAG(name) = (default_val)
20 #define DEFINE_int64(name, default_val, doc) int64_t FLAG(name) = (default_val)
21 #define DEFINE_double(name, default_val, doc) double FLAG(name) = (default_val)
23 std::string FLAG(name) = (default_val)
32 // corresponding to the given Google Test flag.
33 bool BoolFromEnv(const char* flag, bool default_val);
34 int32_t Int32FromEnv(const char* flag, int32_t default_val);
35 double DoubleFromEnv(const char* flag, double default_val);
36 const char* StringFromEnv(const char* flag, const char* default_val);
38 // Parses a string for a bool flag, in the form of either
39 // "--flag=value" or "--flag".
46 // On success, stores the value of the flag in *value, and returns
48 bool ParseBoolFlag(const char* str, const char* flag, bool* value);
50 // Parses a string for an Int32 flag, in the form of
51 // "--flag=value".
53 // On success, stores the value of the flag in *value, and returns
55 bool ParseInt32Flag(const char* str, const char* flag, int32_t* value);
57 // Parses a string for a Double flag, in the form of
58 // "--flag=value".
60 // On success, stores the value of the flag in *value, and returns
62 bool ParseDoubleFlag(const char* str, const char* flag, double* value);
64 // Parses a string for a string flag, in the form of
65 // "--flag=value".
67 // On success, stores the value of the flag in *value, and returns
69 bool ParseStringFlag(const char* str, const char* flag, std::string* value);
71 // Returns true if the string matches the flag.
72 bool IsFlag(const char* str, const char* flag);