te::qt::widgets::SymbolNode Class Reference

#include <SymbolNode.h>

Public Member Functions

 SymbolNode ()
 

Private Types

enum  SymbolNodeType { NODE = 0, LEAF = 1 }
 

Initializer Methods

Methods related to instantiation and destruction.

std::map< std::string, te::qt::widgets::SymbolNode * > m_nodes
 
te::qt::widgets::SymbolNodem_parent
 
SymbolNodeType m_type
 
std::map< std::string, Symbol * > m_symbolMap
 The set of symbol. More...
 
std::string m_id
 
std::string m_name
 
 SymbolNode (const std::string &name, te::qt::widgets::SymbolNode *parent=nullptr)
 Default constructor. More...
 
virtual ~SymbolNode ()
 Destructor. More...
 
virtual void add (te::qt::widgets::SymbolNode *node)
 
virtual te::qt::widgets::SymbolNoderemove (te::qt::widgets::SymbolNode *node)
 
virtual void erase (te::qt::widgets::SymbolNode *node)
 
virtual void eraseAll ()
 
const std::map< std::string, te::qt::widgets::SymbolNode * > & getNodes () const
 
std::size_t getNodesCount () const
 
void addSymbol (Symbol *symbol)
 It inserts a new symbol to this library. More...
 
SymbolremoveSymbol (Symbol *symbol)
 It removes the symbol from this library. More...
 
void eraseSymbol (Symbol *symbol)
 It removes the symbol from this library. More...
 
const std::map< std::string, te::qt::widgets::Symbol * > & getSymbols () const
 
te::qt::widgets::SymbolfindSymbolById (const std::string &id) const
 It returns the symbol identified by a given id or NULL if none is found. More...
 
te::qt::widgets::SymbolNodefindParentBySymbolId (const std::string &id)
 It returns the symbol identified by a given id or NULL if none is found. More...
 
te::qt::widgets::SymbolNodefindNodeById (const std::string &id) const
 It returns the group identified by a given id or NULL if none is found. More...
 
te::qt::widgets::SymbolNodefindNodeFromTopLevelByName (const std::string &name) const
 It returns the group identified by a given id or NULL if none is found. More...
 
te::qt::widgets::SymbolNodefindNodeFromTopLevelById (const std::string &id) const
 It returns the group identified by a given id or NULL if none is found. More...
 
bool hasNodes () const
 
bool hasSymbols () const
 
std::string getID () const
 
void setName (const std::string &name)
 
std::string getName () const
 
void setParent (SymbolNode *parent)
 
SymbolNodegetParent () const
 
SymbolNodeType getType ()
 
void clear ()
 It removes all symbols from this library. More...
 

Detailed Description

Definition at line 48 of file SymbolNode.h.

Member Enumeration Documentation

◆ SymbolNodeType

Enumerator
NODE 

node

LEAF 

leaf

Definition at line 57 of file SymbolNode.h.

Constructor & Destructor Documentation

◆ SymbolNode() [1/2]

te::qt::widgets::SymbolNode::SymbolNode ( )

◆ SymbolNode() [2/2]

te::qt::widgets::SymbolNode::SymbolNode ( const std::string &  name,
te::qt::widgets::SymbolNode parent = nullptr 
)

Default constructor.

◆ ~SymbolNode()

virtual te::qt::widgets::SymbolNode::~SymbolNode ( )
virtual

Destructor.

Member Function Documentation

◆ add()

virtual void te::qt::widgets::SymbolNode::add ( te::qt::widgets::SymbolNode node)
virtual

◆ addSymbol()

void te::qt::widgets::SymbolNode::addSymbol ( Symbol symbol)

It inserts a new symbol to this library.

Parameters
symbolThe new symbol that will be added to this library.

◆ clear()

void te::qt::widgets::SymbolNode::clear ( )
protected

It removes all symbols from this library.

◆ erase()

virtual void te::qt::widgets::SymbolNode::erase ( te::qt::widgets::SymbolNode node)
virtual

◆ eraseAll()

virtual void te::qt::widgets::SymbolNode::eraseAll ( )
virtual

◆ eraseSymbol()

void te::qt::widgets::SymbolNode::eraseSymbol ( Symbol symbol)

It removes the symbol from this library.

Parameters
symbolThe symbol to be removed.
Exceptions
ExceptionIf the symbol doesn't exist it will raise an exception.

◆ findNodeById()

te::qt::widgets::SymbolNode* te::qt::widgets::SymbolNode::findNodeById ( const std::string &  id) const

It returns the group identified by a given id or NULL if none is found.

Parameters
nameThe id of the symbol we are looking for.
Returns
A pointer to a symbol or NULL if none is found.

◆ findNodeFromTopLevelById()

te::qt::widgets::SymbolNode* te::qt::widgets::SymbolNode::findNodeFromTopLevelById ( const std::string &  id) const

It returns the group identified by a given id or NULL if none is found.

Parameters
nameThe name of the group we are looking for.
Returns
A pointer to a group or NULL if none is found.

◆ findNodeFromTopLevelByName()

te::qt::widgets::SymbolNode* te::qt::widgets::SymbolNode::findNodeFromTopLevelByName ( const std::string &  name) const

It returns the group identified by a given id or NULL if none is found.

Parameters
nameThe name of the group we are looking for.
Returns
A pointer to a group or NULL if none is found.

◆ findParentBySymbolId()

te::qt::widgets::SymbolNode* te::qt::widgets::SymbolNode::findParentBySymbolId ( const std::string &  id)

It returns the symbol identified by a given id or NULL if none is found.

Parameters
nameThe id of the symbol we are looking for.
Returns
A pointer to a symbol or NULL if none is found.

◆ findSymbolById()

te::qt::widgets::Symbol* te::qt::widgets::SymbolNode::findSymbolById ( const std::string &  id) const

It returns the symbol identified by a given id or NULL if none is found.

Parameters
nameThe id of the symbol we are looking for.
Returns
A pointer to a symbol or NULL if none is found.

◆ getID()

std::string te::qt::widgets::SymbolNode::getID ( ) const

◆ getName()

std::string te::qt::widgets::SymbolNode::getName ( ) const

◆ getNodes()

const std::map<std::string, te::qt::widgets::SymbolNode*>& te::qt::widgets::SymbolNode::getNodes ( ) const
Returns
Note

◆ getNodesCount()

std::size_t te::qt::widgets::SymbolNode::getNodesCount ( ) const
Returns

◆ getParent()

SymbolNode* te::qt::widgets::SymbolNode::getParent ( ) const

◆ getSymbols()

const std::map<std::string, te::qt::widgets::Symbol*>& te::qt::widgets::SymbolNode::getSymbols ( ) const
Returns
Note

◆ getType()

SymbolNodeType te::qt::widgets::SymbolNode::getType ( )
protected

◆ hasNodes()

bool te::qt::widgets::SymbolNode::hasNodes ( ) const

◆ hasSymbols()

bool te::qt::widgets::SymbolNode::hasSymbols ( ) const

◆ remove()

virtual te::qt::widgets::SymbolNode* te::qt::widgets::SymbolNode::remove ( te::qt::widgets::SymbolNode node)
virtual

◆ removeSymbol()

Symbol* te::qt::widgets::SymbolNode::removeSymbol ( Symbol symbol)

It removes the symbol from this library.

Parameters
symbolThe symbol to be removed.
Exceptions
ExceptionIf the symbol doesn't exist it will raise an exception.

◆ setName()

void te::qt::widgets::SymbolNode::setName ( const std::string &  name)

◆ setParent()

void te::qt::widgets::SymbolNode::setParent ( SymbolNode parent)

Member Data Documentation

◆ m_id

std::string te::qt::widgets::SymbolNode::m_id
protected

Definition at line 208 of file SymbolNode.h.

◆ m_name

std::string te::qt::widgets::SymbolNode::m_name
protected

Definition at line 209 of file SymbolNode.h.

◆ m_nodes

std::map<std::string, te::qt::widgets::SymbolNode*> te::qt::widgets::SymbolNode::m_nodes
protected

Definition at line 204 of file SymbolNode.h.

◆ m_parent

te::qt::widgets::SymbolNode* te::qt::widgets::SymbolNode::m_parent
protected

Definition at line 205 of file SymbolNode.h.

◆ m_symbolMap

std::map<std::string, Symbol*> te::qt::widgets::SymbolNode::m_symbolMap
protected

The set of symbol.

Definition at line 207 of file SymbolNode.h.

◆ m_type

SymbolNodeType te::qt::widgets::SymbolNode::m_type
protected

Definition at line 206 of file SymbolNode.h.


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