A parameter storing an enum value.
More...
#include <param.h>
|
| EnumParam (const std::string &_argStr, const std::string _enumName, bool _isRequired) |
|
bool | addEnumValue (int value, const std::string &info) |
|
bool | addEnumValue (int value, const std::string &str_val, const std::string &info) |
|
virtual std::string | valToString () const |
| Returns the string representation of the parameter's value. More...
|
|
virtual std::string | type () const |
| Returns the string representation of the parameter's type. More...
|
|
virtual bool | isSet () const |
| Returns true if the parameter is filled, false otherwise. More...
|
|
virtual bool | isKeywordInType (const std::string &keyword) |
| Checks if the parameter type contains the keyword. More...
|
|
bool | isKeywordInDescription (const std::string &keyword) |
| Checks if the description contains the keyword. More...
|
|
virtual bool | parse (const char *arg) |
| Parses the parameter from the given string. More...
|
|
| Param (const std::string &_argStr, bool _isRequired) |
| A constructor of a parameter. More...
|
|
| Param (const std::string &_argStr, const std::string &_typeDescStr, bool _isRequired) |
| A constructor of a parameter. More...
|
|
virtual bool | parse (const wchar_t *arg) |
| Parses the parameter from the given wide string. More...
|
|
void | setActive (bool _active) |
|
virtual bool | isActive () const |
| Returns true if the parameter is active, false otherwise. More...
|
|
virtual std::string | info (bool isExtended) const |
|
void | printInColor (int color) |
| Prints the parameter using the given color. Appends the parameter switch to the name. More...
|
|
|
std::string | extendedInfo () const |
| Extended information. More...
|
|
std::string | optionsInfo () const |
|
bool | isInEnumScope (int intVal) const |
|
void | printDesc (bool isExtended=true) const |
| Prints a formatted description of the parameter, including its unique name, type, and the info. More...
|
|
virtual bool | isNameSimilar (const std::string &filter) |
| Checks if the param name is similar to the given filter. More...
|
|
A parameter storing an enum value.
Definition at line 421 of file param.h.
◆ EnumParam()
paramkit::EnumParam::EnumParam |
( |
const std::string & |
_argStr, |
|
|
const std::string |
_enumName, |
|
|
bool |
_isRequired |
|
) |
| |
|
inline |
◆ addEnumValue() [1/2]
bool paramkit::EnumParam::addEnumValue |
( |
int |
value, |
|
|
const std::string & |
info |
|
) |
| |
|
inline |
◆ addEnumValue() [2/2]
bool paramkit::EnumParam::addEnumValue |
( |
int |
value, |
|
|
const std::string & |
str_val, |
|
|
const std::string & |
info |
|
) |
| |
|
inline |
◆ extendedInfo()
std::string paramkit::EnumParam::extendedInfo |
( |
| ) |
const |
|
inlineprotectedvirtual |
◆ isInEnumScope()
bool paramkit::EnumParam::isInEnumScope |
( |
int |
intVal | ) |
const |
|
inlineprotected |
◆ isKeywordInDescription()
bool paramkit::EnumParam::isKeywordInDescription |
( |
const std::string & |
keyword | ) |
|
|
inlinevirtual |
◆ isKeywordInType()
virtual bool paramkit::EnumParam::isKeywordInType |
( |
const std::string & |
keyword | ) |
|
|
inlinevirtual |
Checks if the parameter type contains the keyword.
Reimplemented from paramkit::Param.
Definition at line 472 of file param.h.
◆ isSet()
virtual bool paramkit::EnumParam::isSet |
( |
| ) |
const |
|
inlinevirtual |
Returns true if the parameter is filled, false otherwise.
Implements paramkit::Param.
Definition at line 463 of file param.h.
◆ optionsInfo()
std::string paramkit::EnumParam::optionsInfo |
( |
| ) |
const |
|
inlineprotected |
◆ parse()
virtual bool paramkit::EnumParam::parse |
( |
const char * |
arg | ) |
|
|
inlinevirtual |
◆ type()
virtual std::string paramkit::EnumParam::type |
( |
| ) |
const |
|
inlinevirtual |
Returns the string representation of the parameter's type.
Implements paramkit::Param.
Definition at line 458 of file param.h.
◆ valToString()
virtual std::string paramkit::EnumParam::valToString |
( |
| ) |
const |
|
inlinevirtual |
Returns the string representation of the parameter's value.
Implements paramkit::Param.
Definition at line 444 of file param.h.
◆ enumName
std::string paramkit::EnumParam::enumName |
|
protected |
◆ enumToInfo
std::map<int, std::string> paramkit::EnumParam::enumToInfo |
|
protected |
required: info about the enum parameter
Definition at line 570 of file param.h.
◆ enumToString
std::map<int, std::string> paramkit::EnumParam::enumToString |
|
protected |
optional: string representation of the enum parameter
Definition at line 569 of file param.h.
◆ m_isSet
bool paramkit::EnumParam::m_isSet |
|
protected |
◆ value
int paramkit::EnumParam::value |
The documentation for this class was generated from the following file: