• Home
  • Raw
  • Download

Lines Matching refs:flag

112 static std::string FlagToEnvVar(const char* flag) {  in FlagToEnvVar()  argument
113 const std::string flag_str(flag); in FlagToEnvVar()
124 bool BoolFromEnv(const char* flag, bool default_val) { in BoolFromEnv() argument
125 const std::string env_var = FlagToEnvVar(flag); in BoolFromEnv()
130 int32_t Int32FromEnv(const char* flag, int32_t default_val) { in Int32FromEnv() argument
131 const std::string env_var = FlagToEnvVar(flag); in Int32FromEnv()
142 double DoubleFromEnv(const char* flag, double default_val) { in DoubleFromEnv() argument
143 const std::string env_var = FlagToEnvVar(flag); in DoubleFromEnv()
154 const char* StringFromEnv(const char* flag, const char* default_val) { in StringFromEnv() argument
155 const std::string env_var = FlagToEnvVar(flag); in StringFromEnv()
161 const char* flag, std::map<std::string, std::string> default_val) { in KvPairsFromEnv() argument
162 const std::string env_var = FlagToEnvVar(flag); in KvPairsFromEnv()
179 const char* ParseFlagValue(const char* str, const char* flag, in ParseFlagValue() argument
182 if (str == nullptr || flag == nullptr) return nullptr; in ParseFlagValue()
185 const std::string flag_str = std::string("--") + std::string(flag); in ParseFlagValue()
204 bool ParseBoolFlag(const char* str, const char* flag, bool* value) { in ParseBoolFlag() argument
206 const char* const value_str = ParseFlagValue(str, flag, true); in ParseBoolFlag()
216 bool ParseInt32Flag(const char* str, const char* flag, int32_t* value) { in ParseInt32Flag() argument
218 const char* const value_str = ParseFlagValue(str, flag, false); in ParseInt32Flag()
224 return ParseInt32(std::string("The value of flag --") + flag, value_str, in ParseInt32Flag()
228 bool ParseDoubleFlag(const char* str, const char* flag, double* value) { in ParseDoubleFlag() argument
230 const char* const value_str = ParseFlagValue(str, flag, false); in ParseDoubleFlag()
236 return ParseDouble(std::string("The value of flag --") + flag, value_str, in ParseDoubleFlag()
240 bool ParseStringFlag(const char* str, const char* flag, std::string* value) { in ParseStringFlag() argument
242 const char* const value_str = ParseFlagValue(str, flag, false); in ParseStringFlag()
251 bool ParseKeyValueFlag(const char* str, const char* flag, in ParseKeyValueFlag() argument
253 const char* const value_str = ParseFlagValue(str, flag, false); in ParseKeyValueFlag()
266 bool IsFlag(const char* str, const char* flag) { in IsFlag() argument
267 return (ParseFlagValue(str, flag, true) != nullptr); in IsFlag()