All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.

Definition at line 36 of file SymbolLibrary.cpp.

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

Destructor.

Definition at line 42 of file SymbolLibrary.cpp.

Member Function Documentation

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

It removes all symbols from this library.

Definition at line 92 of file SymbolLibrary.cpp.

References te::common::FreeContents().

te::qt::widgets::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.

Definition at line 70 of file SymbolLibrary.cpp.

std::pair< std::map< std::string, te::qt::widgets::Symbol * >::const_iterator, std::map< std::string, te::qt::widgets::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.

Definition at line 81 of file SymbolLibrary.cpp.

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.

Definition at line 46 of file SymbolLibrary.cpp.

References te::qt::widgets::Symbol::getInfo(), te::qt::widgets::SymbolInfo::m_id, and TE_TR.

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.

Definition at line 57 of file SymbolLibrary.cpp.

References te::qt::widgets::Symbol::getInfo(), te::qt::widgets::SymbolInfo::m_id, and TE_TR.

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 files: