Template Class CArgValueImpl#

Class Documentation#

template<typename TVar>
class CArgValueImpl#

Argument container containing default function implementations.

Template Parameters:

TVar – The value this argument is used with.

Public Functions

inline CArgValueImpl(CArgumentDefT<TVar> &rArgumentDef)#

Constructor.

Parameters:

rArgumentDef[in] Reference to the command line definition.

inline void Parse(TVar&, const std::string&)#

Parse the value from the string (override for assignment values)

Parameters:
  • rtArgument[in] Reference to the argument.

  • rssValue[in] Reference to the string containing the value to be assigned.

inline std::string GetArgumentOptionMarkup()#

Get the markup string for the argument type. Overload in derived class.

Returns:

std::string Returns the markup (default empty).

inline std::string GetOptionDetails(size_t)#

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.

Returns:

std::string Returns the option details (default empty).

inline std::string GetArgumentValueString(const TVar&)#

Get the value of the variable.

Returns:

std::string Returns the value of the variable.

inline bool MultiArgument()#

Is this a multi argument assignments?

Remark

Default implementation is to support argument assignments only once.

Returns:

bool Returns ‘true’ when multiple assignments are allowed; otherwise ‘false’.

Protected Attributes

CArgumentDefT<TVar> &m_rArgumentDef#

Accessible command line argument definition for derived classes.