|
Public Member Functions |
| OptionResult (const std::string &optionHelp) |
| Sets defaults for all results.
|
virtual | ~OptionResult () |
| Empty Deconstructor.
|
void | addNameOrAlias (const std::string &name, bool hasNegation) |
| Adds a name or alias to a result class.
|
void | verifyType (char optionType) |
| Verifies that the type of the class matches the requested type.
|
std::string | getName () const |
| Returns the main name of the object.
|
std::string | getNextAlias () |
| Gets the next alias from map using the class iterator.
|
void | resetAliasIter () |
| Resets the object iterator for getNextAlias.
|
bool | isNegation (const std::string &name) |
| Returns if a given name is a negation.
|
int | has_arg () |
| Simple getter to check if option takes an argument in positive form.
|
void | setHas_arg (int has_arg) |
| Simple setter for if option takes an argument in positive form.
|
virtual void | setVal (const std::string &name, const std::string &val)=0 |
| Pure virtual function for converting a value into its resultant type.
|
int | resultSet (const std::string &name) |
| Returns the number of times an option was set.
|
std::string | getRawValue () const |
| Gets the raw value that was set.
|
void | printHelp (bool isStandardOption) |
| Iterates through each alias and prints the option help.
|
virtual void | writeDefault ()=0 |
| Pure virtual function for write the value of the resultpointer.
|
Protected Member Functions |
void | incrementCount (const std::string &name) |
| Increments the proper counter for the name.
|
void | validateArgumentCount (const std::string &name, const std::string &val) |
| Validates that the option name should or should not take an argument.
|
Protected Attributes |
char | m_type |
| Type of resultant.
|
std::string | m_rawval |
| Raw value for option from command line.
|