Template Class CArgumentProvide#
Defined in File cmdlnparser.h
Inheritance Relationships#
Base Types#
public CArgumentProvideImpl< TArgument >
(Template Class CArgumentProvideImpl)public IArgumentProvide
(Struct IArgumentProvide)
Class Documentation#
-
template<typename TArgument>
class CArgumentProvide : public CArgumentProvideImpl<TArgument>, public IArgumentProvide# Default template for the templatized specific argument. This class implements the IArgumentProvide prototype functions and forwards the calls to the specialized argument implementations (which is the base of this class through the CArgumentProvideImpl<> class).
- Template Parameters:
TArgument – Template type used with a specialized implementation of CArgumentProvideImpl.
Public Functions
-
inline CArgumentProvide(CArgumentDefT<TArgument> &rArgumentDef, TArgument &rtArgument)#
Constructor assigning the reference to the argument to the member function.
- Parameters:
rArgumentDef – [in] Referetnce to the argument definition.
rtArgument – [in] Reference to the argument variable.
-
inline virtual void ArgumentAssign(const std::string &rssValue) override#
Assign the value from the string (override for assignment values)
- Parameters:
rssValue – [in] Reference to the string containing the value to be assigned.
-
inline virtual std::string GetArgumentOptionMarkup() override#
Get the markup string for the argument type. Overload in derived class.
- Returns:
std::string Returns the markup (default empty).
-
inline virtual std::string GetArgumentOptionDetails(size_t nMaxStringLen) override#
Get the option details for the argument type. Overload in derived class.
Remark
The nMaxStringLen could be ignored if no other alignment is needed; the print function will align the words based on their whitespace.
- Parameters:
nMaxStringLen – [in] The maximum length of the string in characters; after the length is reached a newline should be added.
- Returns:
std::string Returns the option details (default empty).
-
inline virtual std::string GetArgumentValueString() override#
Get the value of the variable.
- Returns:
std::string Returns the value of the variable.
-
inline virtual bool IsArgumentAssigned() override#
Is the argument assigned?
- Returns:
bool Returns ‘true’ when the argument was assigned; otherwise ‘false’.
-
inline virtual bool AllowMultiArgumentAssign() override#
Allow multi assignments?
- Returns:
bool Returns ‘true’ when multiple assignments are allowed; otherwise ‘false’.