• Home
  • Raw
  • Download

Lines Matching refs:flag

81 static std::string FlagToEnvVar(const char* flag) {  in FlagToEnvVar()  argument
82 const std::string flag_str(flag); in FlagToEnvVar()
95 bool BoolFromEnv(const char* flag, bool default_value) { in BoolFromEnv() argument
96 const std::string env_var = FlagToEnvVar(flag); in BoolFromEnv()
105 int32_t Int32FromEnv(const char* flag, int32_t default_value) { in Int32FromEnv() argument
106 const std::string env_var = FlagToEnvVar(flag); in Int32FromEnv()
125 const char* StringFromEnv(const char* flag, const char* default_value) { in StringFromEnv() argument
126 const std::string env_var = FlagToEnvVar(flag); in StringFromEnv()
136 const char* ParseFlagValue(const char* str, const char* flag, in ParseFlagValue() argument
139 if (str == nullptr || flag == nullptr) return nullptr; in ParseFlagValue()
142 const std::string flag_str = std::string("--") + std::string(flag); in ParseFlagValue()
161 bool ParseBoolFlag(const char* str, const char* flag, bool* value) { in ParseBoolFlag() argument
163 const char* const value_str = ParseFlagValue(str, flag, true); in ParseBoolFlag()
173 bool ParseInt32Flag(const char* str, const char* flag, int32_t* value) { in ParseInt32Flag() argument
175 const char* const value_str = ParseFlagValue(str, flag, false); in ParseInt32Flag()
181 return ParseInt32(std::string("The value of flag --") + flag, value_str, in ParseInt32Flag()
185 bool ParseDoubleFlag(const char* str, const char* flag, double* value) { in ParseDoubleFlag() argument
187 const char* const value_str = ParseFlagValue(str, flag, false); in ParseDoubleFlag()
193 return ParseDouble(std::string("The value of flag --") + flag, value_str, in ParseDoubleFlag()
197 bool ParseStringFlag(const char* str, const char* flag, std::string* value) { in ParseStringFlag() argument
199 const char* const value_str = ParseFlagValue(str, flag, false); in ParseStringFlag()
208 bool IsFlag(const char* str, const char* flag) { in IsFlag() argument
209 return (ParseFlagValue(str, flag, true) != nullptr); in IsFlag()