A type‐erased handle for an instance of an Abseil Flag and holds reflection information pertaining to that flag. Use CommandLineFlag to access a flag's name, location, help string etc.
Synopsis
Declared in <absl/flags/commandlineflag.h>
class CommandLineFlag;
Description
To obtain an absl::CommandLineFlag, invoke absl::FindCommandLineFlag() passing it the flag name string.
Example:
// Obtain reflection handle for a flag named "flagname". const absl::CommandLineFlag* my_flag_data = absl::FindCommandLineFlag("flagname");
// Now you can get flag info from that reflection handle. std::string flag_location = my_flag_data‐>Filename(); ...
Member Functions
Name |
Description |
|
Constructors |
|
Not assignable. |
|
Returns the current value for this flag. |
|
Returns the default value for this flag. |
|
Returns name of the file where this flag is defined. |
|
Returns help message associated with this flag. |
Returns true if the flag has type |
|
|
Returns true iff this object corresponds to retired flag. |
|
Returns name of this flag. |
Sets the value of the flag based on specified string |
|
Attempts to retrieve the flag value. |
Protected Member Functions
Name |
Description |
|
Destroys this handle. Protected so only derived types may be destroyed. |
Non-Member Functions
Name |
Description |
Returns the reflection handle of an Abseil flag of the specified name, or |
|
Returns the reflection handle corresponding to specified Abseil Flag instance. Use this handle to access flag's reflection information, like name, location, default value etc. |
Created with MrDocs