This is a special "command option" which is really a meta-option to group other options together for use in other meta-options. This particular meta-option allows a group of options to be specified in other meta-options. This option is considered "set" if any of the member options are set. This class and CommandOptionGroupAnd are designed to make up for the fact that the verification meta-options are not designed to work in other verification meta-options.
Definition at line 678 of file CommandOption.hpp.
#include <CommandOption.hpp>
Public Member Functions | |
virtual std::string | checkArguments () |
Do not do any checking. More... | |
CommandOptionGroupOr () | |
virtual unsigned long | getCount () const |
returns the sum of all encapsulated option counts. More... | |
virtual std::string | getOptionString () const |
return a string containing the aggregated option strings More... | |
virtual | ~CommandOptionGroupOr () |
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 |
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... | |
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 |
CommandOptionGroupOr contructor. Does nothing explicitly.
Definition at line 684 of file CommandOption.hpp.
|
inlinevirtual |
Destructor.
Definition at line 688 of file CommandOption.hpp.
|
inlinevirtual |
Do not do any checking.
Reimplemented from gnsstk::CommandOptionOneOf.
Definition at line 691 of file CommandOption.hpp.
|
virtual |
returns the sum of all encapsulated option counts.
Reimplemented from gnsstk::CommandOption.
Reimplemented in gnsstk::CommandOptionGroupAnd.
Definition at line 531 of file CommandOption.cpp.
|
virtual |
return a string containing the aggregated option strings
Reimplemented from gnsstk::CommandOption.
Definition at line 515 of file CommandOption.cpp.