CLI  2.9
SyntaxNode Class Reference

Syntax node elements. More...

#include <syntax_node.h>

Inheritance diagram for SyntaxNode:

Public Member Functions

 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...
 
virtual const bool FindElements (Element::List &CLI_ExactList, Element::List &CLI_NearList, const char *const STR_Keyword) const
 Sub-elements search. 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 tk::String GetKeyword (void) const
 String identifier accessor. 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...
 

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...
 
- Protected Member Functions inherited from Object
 Object (void)
 Default constructor only available to sub-classes. More...
 

Detailed Description

Syntax node elements.

Syntax node elements are element that accepts child elements. They store a list of possible childs, and offer operations based on this list.

Definition at line 51 of file syntax_node.h.

Constructor & Destructor Documentation

◆ SyntaxNode()

SyntaxNode::SyntaxNode ( const char *const  STR_Keyword,
const Help CLI_Help 
)
explicit

Constructor.

Parameters
STR_KeywordKeyword of the element.
CLI_HelpCorresponding help.

◆ ~SyntaxNode()

virtual SyntaxNode::~SyntaxNode ( void  )
virtual

Destructor.

Member Function Documentation

◆ AddElement()

Element& SyntaxNode::AddElement ( Element *const  PCLI_Element)

Possible element addition.

Returns
The element added.
Parameters
PCLI_ElementNew element.

◆ FindElements()

virtual const bool SyntaxNode::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 Element.

Reimplemented in Param.

◆ RemoveElement()

const bool SyntaxNode::RemoveElement ( const Element *const  PCLI_Element,
const bool  B_AutoDelete 
)

Element removal.

Returns
true if the element has been actually removed, false otherwise.
Parameters
PCLI_ElementElement to remove.
B_AutoDeleteAuto-deletion flag. true have the given object being automatically deleted when removed.

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