te::qt::widgets::SymbolLibrary Class Reference

This class represents a library of symbols. More...

#include <SymbolLibrary.h>

Public Member Functions

void clear ()
 It removes all symbols from this library. More...
 
SymbolfindById (const std::string &id) const
 It returns the symbol identified by a given id or NULL if none is found. More...
 
std::pair< std::map< std::string, Symbol * >::const_iterator, std::map< std::string, Symbol * >::const_iterator > getIterator () const
 It returns a pair of iterators over the symbols of this library. More...
 
const std::string & getName () const
 
void insert (Symbol *symbol)
 It inserts a new symbol to this library. More...
 
void remove (Symbol *symbol)
 It removes the symbol from this library. More...
 
 SymbolLibrary (const std::string &name)
 Constructor. More...
 
 ~SymbolLibrary ()
 Destructor. More...
 

Private Attributes

std::string m_name
 The name of the symbol library. More...
 
std::map< std::string, Symbol * > m_symbolMap
 The set of symbols. More...
 

Detailed Description

This class represents a library of symbols.

See also
Symbol, SymbolLibaryManager

Definition at line 52 of file SymbolLibrary.h.

Constructor & Destructor Documentation

te::qt::widgets::SymbolLibrary::SymbolLibrary ( const std::string &  name)

Constructor.

te::qt::widgets::SymbolLibrary::~SymbolLibrary ( )

Destructor.

Member Function Documentation

void te::qt::widgets::SymbolLibrary::clear ( )

It removes all symbols from this library.

Symbol* te::qt::widgets::SymbolLibrary::findById ( 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.
std::pair<std::map<std::string, Symbol*>::const_iterator, std::map<std::string, Symbol*>::const_iterator> te::qt::widgets::SymbolLibrary::getIterator ( ) const

It returns a pair of iterators over the symbols of this library.

Returns
A pair of iterators over the symbols of this library where pair.first will be the beginning and pair.second will be the end iterator.
const std::string& te::qt::widgets::SymbolLibrary::getName ( ) const
void te::qt::widgets::SymbolLibrary::insert ( Symbol symbol)

It inserts a new symbol to this library.

Parameters
symbolThe new symbol that will be added to this library.
void te::qt::widgets::SymbolLibrary::remove ( 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.

Member Data Documentation

std::string te::qt::widgets::SymbolLibrary::m_name
private

The name of the symbol library.

Definition at line 103 of file SymbolLibrary.h.

std::map<std::string, Symbol*> te::qt::widgets::SymbolLibrary::m_symbolMap
private

The set of symbols.

Definition at line 104 of file SymbolLibrary.h.


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