Home | History | Annotate | Download | only in brillo

Lines Matching full:flag

9 // delimeter, e.g. "--flag=value".  An argument of "--" will terminate flag
10 // parsing, so that any subsequent arguments will be treated as non-flag
11 // arguments, regardless of prefix. Non-flag arguments are outside the scope
15 // The FlagHelper class will automatically take care of the --help flag, as
29 // with the name FLAGS_<name>, that can be used to access the flag's
39 // DEFINE_int32(example, 0, "Example int flag");
42 // printf("You passed in %d to --example command line flag\n",
66 // The corresponding class representation of a command line flag, used
69 class Flag {
71 Flag(const char* name,
75 virtual ~Flag() = default;
77 // Sets the associated FLAGS_xxxx value, taking into account the flag type
80 // Returns the type of the flag as a char array, for use in the help message
89 class BRILLO_EXPORT BoolFlag final : public Flag {
106 class BRILLO_EXPORT Int32Flag final : public Flag {
121 class BRILLO_EXPORT Int64Flag final : public Flag {
136 class BRILLO_EXPORT UInt64Flag final : public Flag {
151 class BRILLO_EXPORT DoubleFlag final : public Flag {
166 class BRILLO_EXPORT StringFlag final : public Flag {
182 // scoped FLAGS_xxxx variables for easier access to command line flag
185 // will also ensure a compiler error will be thrown if another flag
189 brillo::FlagHelper::GetInstance()->AddFlag(std::unique_ptr<brillo::Flag>( \
209 std::unique_ptr<brillo::Flag>(new brillo::BoolFlag( \
212 std::unique_ptr<brillo::Flag>(new brillo::BoolFlag( \
226 // Flag definitions from carrying over from previous tests.
238 // map from base::CommandLine, and finds the corresponding Flag in order to
239 // update the FLAGS_xxxx values to the parsed value. If the --help flag is
241 // flag is passed in, it outputs an error message and exits the program with
245 // Adds a flag to be tracked and updated once the command line is actually
248 // DEFINE_xxxx macros to register a command line flag.
249 void AddFlag(std::unique_ptr<Flag> flag);
262 std::map<std::string, std::unique_ptr<Flag>> defined_flags_;