This is a special "command option" which is really a meta-option to make sure that if one of a set of real options has been used, all of the set are used.
Definition at line 575 of file CommandOption.hpp.
#include <CommandOption.hpp>
Public Member Functions | |
virtual std::string | checkArguments () |
CommandOptionAllOf () | |
virtual unsigned long | getCount () const |
returns the sum of all encapsulated option counts if all are in use, zero otherwise. More... | |
virtual | ~CommandOptionAllOf () |
Destructor. More... | |
![]() | |
void | addOption (CommandOption *opt) |
Add an option to the list of mutually exclusive options. More... | |
CommandOptionOneOf () | |
CommandOption * | whichOne () const |
virtual | ~CommandOptionOneOf () |
Destructor. More... | |
![]() | |
CommandOption (const CommandOptionFlag of, const CommandOptionType ot, const char shOpt, const std::string &loOpt, const std::string &desc, const bool req=false, CommandOptionVec &optVectorList=defaultCommandOptionList) | |
std::ostream & | dumpValue (std::ostream &out) const |
Displays this->value to the stream out . More... | |
virtual std::string | getArgString () const |
Returns a string with the argument format. More... | |
std::string | getDescription () const |
Returns a formatted string with the description of this option. More... | |
std::string | getFullOptionString () const |
virtual std::string | getOptionString () const |
unsigned long | getOrder (unsigned long idx=-1) const |
const std::vector< std::string > & | getValue () const |
void | setDescription (const std::string &desc) |
CommandOption & | setMaxCount (const unsigned long l) |
struct option | toGetoptLongOption () const |
Returns a struct option for use with getopt_long. More... | |
std::string | toGetoptShortOption () const |
Returns a string for use with getopt. More... | |
virtual | ~CommandOption () |
Destructor. More... | |
Private Member Functions | |
CommandOption * | whichOne () const |
Additional Inherited Members | |
![]() | |
enum | CommandOptionFlag { noArgument = 0, hasArgument = 1 } |
enum | CommandOptionType { trailingType, stdType, metaType } |
![]() | |
CommandOption () | |
Default Constructor. More... | |
![]() | |
CommandOptionVec | optionVec |
![]() | |
unsigned long | count |
std::string | description |
The description for the help text. More... | |
std::string | longOpt |
The string for the long option (for example, "--foo"). More... | |
unsigned long | maxCount |
CommandOptionFlag | optFlag |
Flag for determining whether this option has an argument or not. More... | |
CommandOptionType | optType |
std::vector< unsigned long > | order |
The order in which this option was encountered on the command line. More... | |
CommandOptionParser * | parser |
bool | required |
Whether or not this is a required command line option. More... | |
char | shortOpt |
The character for the short option (for example, '-f'). More... | |
std::vector< std::string > | value |
Any arguments passed with this option get put in here. More... | |
|
inline |
CommandOptionAllOf contructor. This sets the CommandOptionType for this object to metaType.
Definition at line 582 of file CommandOption.hpp.
|
inlinevirtual |
Destructor.
Definition at line 586 of file CommandOption.hpp.
|
virtual |
If you specified a format for the arguments (for example, digit or string), this function checks them to see if they match. If they don't, an error string is returned. If they do, an empty string is returned.
Reimplemented from gnsstk::CommandOptionOneOf.
Definition at line 444 of file CommandOption.cpp.
|
virtual |
returns the sum of all encapsulated option counts if all are in use, zero otherwise.
Reimplemented from gnsstk::CommandOption.
Definition at line 466 of file CommandOption.cpp.
|
private |