CLI  2.9
Param Class Referenceabstract

Base parameter class. More...

#include <param.h>

Inheritance diagram for Param:

Public Member Functions

virtual ~Param (void)
 Destructor. More...
 
virtual const tk::String GetKeyword (void) const
 String identifier accessor. More...
 
virtual const bool FindElements (Element::List &CLI_ExactList, Element::List &CLI_NearList, const char *const STR_Keyword) const
 Sub-elements search. More...
 
virtual const bool SetstrValue (const char *const STR_Value) const =0
 Value setting. More...
 
const tk::String GetstrValue (void) const
 Value access in its string form. More...
 
virtual const Param *const Clone (void) const =0
 Parameter cloning handler. More...
 
const Param *const GetCloned (void) const
 Cloned parameter access. More...
 
virtual const ParamCopyValue (const Param &CLI_Param) const =0
 Value copy handler. More...
 
- Public Member Functions inherited from SyntaxNode
 SyntaxNode (const char *const STR_Keyword, const Help &CLI_Help)
 Constructor. More...
 
virtual ~SyntaxNode (void)
 Destructor. More...
 
ElementAddElement (Element *const PCLI_Element)
 Possible element addition. More...
 
const bool RemoveElement (const Element *const PCLI_Element, const bool B_AutoDelete)
 Element removal. More...
 
- Public Member Functions inherited from Element
 Element (const char *const STR_Keyword, const Help &STR_Help)
 Constructor. More...
 
virtual ~Element (void)=0
 Destructor. More...
 
virtual const HelpGetHelp (void) const
 Element help accessor. More...
 
virtual void SetCli (Cli &CLI_Cli)
 Cli reference setting. More...
 
CliGetCli (void)
 Read-Write Cli reference accessor. More...
 
const CliGetCli (void) const
 Read-only Cli reference accessor. More...
 
ShellGetShell (void) const
 Shell reference accessor. More...
 
const OutputDeviceGetOutputStream (void) const
 Output stream reference accessor. More...
 
const OutputDeviceGetErrorStream (void) const
 Error stream reference accessor. More...
 
- Public Member Functions inherited from Object
virtual ~Object (void)=0
 Pure virtual destructor. More...
 

Protected Member Functions

 Param (const char *const STR_Keyword, const Help &CLI_Help)
 Constructor. More...
 
const bool SetValue (const char *const STR_Value) const
 Value setting from derived class. More...
 
const Param *const InitClone (Param &CLI_CloneParam) const
 Clone initialization. More...
 
const bool SetCloned (const Param &CLI_Cloned)
 Cloned parameter reference setting. More...
 
- Protected Member Functions inherited from Object
 Object (void)
 Default constructor only available to sub-classes. More...
 

Additional Inherited Members

- Public Types inherited from Element
typedef tk::Queue< const Element * > List
 CLI element list type. More...
 
typedef tk::Map< const tk::String, const Element * > Map
 CLI element map type. More...
 

Detailed Description

Base parameter class.

Base class for any kind of parameter elements. Not final class.

Definition at line 50 of file param.h.

Constructor & Destructor Documentation

◆ Param()

Param::Param ( const char *const  STR_Keyword,
const Help CLI_Help 
)
explicitprotected

Constructor.

Parameters
STR_KeywordKeyword. Does not mean much for a parameter. Something like a description of the type of parameter.
CLI_HelpCorresponding help.

◆ ~Param()

virtual Param::~Param ( void  )
virtual

Destructor.

Member Function Documentation

◆ Clone()

virtual const Param* const Param::Clone ( void  ) const
pure virtual

Parameter cloning handler.

Returns
A newly created parameter object of the correct type.

To be overloaded by derived classes.

Implemented in ParamString, ParamFloat, ParamInt, and ParamHost.

◆ CopyValue()

virtual const Param& Param::CopyValue ( const Param CLI_Param) const
pure virtual

Value copy handler.

Parameters
CLI_ParamParameter to copy the value from.
Returns
The Param instance itself.

Implemented in ParamT< T >, ParamT< double >, ParamT< int >, and ParamString.

◆ FindElements()

virtual const bool Param::FindElements ( Element::List CLI_ExactList,
Element::List CLI_NearList,
const char *const  STR_Keyword 
) const
virtual

Sub-elements search.

Parameters
CLI_ExactListOutput list of elements exactly matching STR_Keyword.
CLI_NearListOutput list of elements matching STR_Keyword exactly or not.
STR_KeywordKeyword or beginning of a keyword. Can be the whole word, or just the beginning, or something possibly matching (for parameters). NULL means no keyword begun. Put NULL to retrieve all sub-elements.
Returns
true for success, false otherwise.

Reimplemented from SyntaxNode.

◆ GetCloned()

const Param* const Param::GetCloned ( void  ) const

Cloned parameter access.

Returns
Cloned parameter instance if any. NULL otherwise.

◆ GetKeyword()

virtual const tk::String Param::GetKeyword ( void  ) const
virtual

String identifier accessor.

Returns
String identifier.

Reimplemented from Element.

Referenced by ParamT< int >::CopyValue().

◆ GetstrValue()

const tk::String Param::GetstrValue ( void  ) const

Value access in its string form.

Returns
Parameter value in its string form.

◆ InitClone()

const Param* const Param::InitClone ( Param CLI_CloneParam) const
protected

Clone initialization.

Returns
CLI_CloneParam reference.
Parameters
CLI_CloneParamClone parameter to initialize.

◆ SetCloned()

const bool Param::SetCloned ( const Param CLI_Cloned)
protected

Cloned parameter reference setting.

Returns
true for success, false otherwise.
Parameters
CLI_ClonedClone parameter reference.

◆ SetstrValue()

virtual const bool Param::SetstrValue ( const char *const  STR_Value) const
pure virtual

Value setting.

Parameters
STR_ValueNew value.
Returns
true if the value has been set correctly, false otherwise.

To be overloaded by derived classes.

Implemented in ParamString, ParamFloat, and ParamInt.

◆ SetValue()

const bool Param::SetValue ( const char *const  STR_Value) const
protected

Value setting from derived class.

Returns
true for success, false otherwise.
Parameters
STR_ValueNew value.

Referenced by ParamT< int >::SetValue().


The documentation for this class was generated from the following file: