This class represents a library of symbols. More...
#include <SymbolLibrary.h>
Public Member Functions | |
| void | clear () |
| It removes all symbols from this library. More... | |
| Symbol * | findById (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... | |
This class represents a library of symbols.
Definition at line 52 of file SymbolLibrary.h.
| te::qt::widgets::SymbolLibrary::SymbolLibrary | ( | const std::string & | name | ) |
|
default |
Destructor.
Referenced by SymbolLibrary().
| void te::qt::widgets::SymbolLibrary::clear | ( | ) |
It removes all symbols from this library.
Definition at line 90 of file SymbolLibrary.cpp.
References te::common::FreeContents(), and m_symbolMap.
| 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.
| name | The id of the symbol we are looking for. |
Definition at line 68 of file SymbolLibrary.cpp.
References m_symbolMap.
Referenced by insert().
| 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.
Definition at line 79 of file SymbolLibrary.cpp.
References m_symbolMap.
| const std::string & te::qt::widgets::SymbolLibrary::getName | ( | ) | const |
Definition at line 85 of file SymbolLibrary.cpp.
References m_name.
Referenced by te::qt::widgets::SymbolLibraryManager::insert(), and te::qt::widgets::SymbolLibraryManager::remove().
| void te::qt::widgets::SymbolLibrary::insert | ( | Symbol * | symbol | ) |
It inserts a new symbol to this library.
| symbol | The new symbol that will be added to this library. |
Definition at line 44 of file SymbolLibrary.cpp.
References findById(), te::qt::widgets::Symbol::getInfo(), te::qt::widgets::SymbolInfo::m_id, m_symbolMap, and TE_TR.
| void te::qt::widgets::SymbolLibrary::remove | ( | Symbol * | symbol | ) |
It removes the symbol from this library.
| symbol | The symbol to be removed. |
| Exception | If the symbol doesn't exist it will raise an exception. |
Definition at line 55 of file SymbolLibrary.cpp.
References te::qt::widgets::Symbol::getInfo(), te::qt::widgets::SymbolInfo::m_id, m_symbolMap, and TE_TR.
|
private |
The name of the symbol library.
Definition at line 103 of file SymbolLibrary.h.
Referenced by getName().
|
private |
The set of symbols.
Definition at line 104 of file SymbolLibrary.h.
Referenced by clear(), findById(), getIterator(), insert(), and remove().