![]() |
TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
|
The symbols table is updated every time the scene or text editor changes. The symbols table contains the list of item names and ItemHandle pointers as well as names and pointers to each data entry in each item. More...
#include <SymbolsTable.h>
Public Member Functions | |
SymbolsTable (NetworkHandle *) | |
constructor | |
virtual void | update (int n=0) |
update the symbols table | |
virtual bool | isValidPointer (void *) const |
checks whether the given item handle pointer is valid | |
virtual QList< ItemHandle * > | allHandlesSortedByFamily () const |
get list of all items sorted according to family | |
virtual QList< ItemHandle * > | allHandlesSortedByName () const |
get list of all items sorted according to their full name | |
Public Attributes | |
QHash< QString, ItemHandle * > | uniqueHandlesWithDot |
handle names and the corresponsing handles. This hash stores the unique full names, such a M.A and M_A | |
QHash< QString, ItemHandle * > | uniqueHandlesWithUnderscore |
QHash< QString, ItemHandle * > | nonuniqueHandles |
handle names and the corresponsing handles. This hash stores the the non-unique names, such as A. Therefore the hash may contain multiple values for the same key (see QHash documentation) | |
QHash< QString, QPair < ItemHandle *, QString > > | uniqueDataWithDot |
row or column name and the corresponding handle and tool in which the row or column name belongs. Stores full names only. For example, if A.k0 is a data item, then this table will contain A.k0 and A_k0. All entries are unique. | |
QHash< QString, QPair < ItemHandle *, QString > > | uniqueDataWithUnderscore |
QHash< QString, QPair < ItemHandle *, QString > > | nonuniqueData |
row or column name and the corresponding handle and tool in which the row or column name belongs. Stores just the row or column name. For example, if A.k0 is a data item, then this table will contain k0. The individual, non-unique, names such as k0 may have multiple hash values for the same hash key (see QHash documentation). | |
QHash< QString, ItemHandle * > | handlesByFamily |
this hash contains all the list of items belonging in each family. The items are listed under their family only and not under their parent families. For example, you will not find an item of family "Elephant" under the "Mammals" key. You will have to specifically search under "Elephant" and use ItemFamily's isA method to find out that it is also a "Mammal" | |
Protected Member Functions | |
virtual void | update (const QList< ItemHandle * > &) |
update the symbols table | |
Protected Attributes | |
NetworkHandle * | network |
the network that this symbols table belongs with | |
ItemHandle | globalHandle |
This is a special item handle that does not represent any item on the scene. It is used to store "global" data. | |
QHash< void *, QString > | handlesAddress |
addresses of all handles | |
Friends | |
class | NetworkHandle |
The symbols table is updated every time the scene or text editor changes. The symbols table contains the list of item names and ItemHandle pointers as well as names and pointers to each data entry in each item.
Definition at line 37 of file SymbolsTable.h.
Tinkercell::SymbolsTable::SymbolsTable | ( | NetworkHandle * | net | ) |
constructor
NetworkWindow* | network that this symbol table belongs in |
Definition at line 23 of file SymbolsTable.cpp.
QList< ItemHandle * > Tinkercell::SymbolsTable::allHandlesSortedByFamily | ( | ) | const [virtual] |
get list of all items sorted according to family
Definition at line 252 of file SymbolsTable.cpp.
QList< ItemHandle * > Tinkercell::SymbolsTable::allHandlesSortedByName | ( | ) | const [virtual] |
get list of all items sorted according to their full name
Definition at line 290 of file SymbolsTable.cpp.
bool Tinkercell::SymbolsTable::isValidPointer | ( | void * | p | ) | const [virtual] |
checks whether the given item handle pointer is valid
Definition at line 303 of file SymbolsTable.cpp.
void Tinkercell::SymbolsTable::update | ( | int | n = 0 | ) | [virtual] |
update the symbols table
Definition at line 28 of file SymbolsTable.cpp.
void Tinkercell::SymbolsTable::update | ( | const QList< ItemHandle * > & | items | ) | [protected, virtual] |
update the symbols table
Definition at line 82 of file SymbolsTable.cpp.
friend class NetworkHandle [friend] |
Definition at line 91 of file SymbolsTable.h.
ItemHandle Tinkercell::SymbolsTable::globalHandle [protected] |
This is a special item handle that does not represent any item on the scene. It is used to store "global" data.
Definition at line 84 of file SymbolsTable.h.
QHash<void*,QString> Tinkercell::SymbolsTable::handlesAddress [protected] |
addresses of all handles
Definition at line 89 of file SymbolsTable.h.
QHash<QString, ItemHandle* > Tinkercell::SymbolsTable::handlesByFamily |
this hash contains all the list of items belonging in each family. The items are listed under their family only and not under their parent families. For example, you will not find an item of family "Elephant" under the "Mammals" key. You will have to specifically search under "Elephant" and use ItemFamily's isA method to find out that it is also a "Mammal"
Definition at line 69 of file SymbolsTable.h.
NetworkHandle* Tinkercell::SymbolsTable::network [protected] |
the network that this symbols table belongs with
Definition at line 82 of file SymbolsTable.h.
QHash<QString, QPair<ItemHandle*,QString> > Tinkercell::SymbolsTable::nonuniqueData |
row or column name and the corresponding handle and tool in which the row or column name belongs. Stores just the row or column name. For example, if A.k0 is a data item, then this table will contain k0. The individual, non-unique, names such as k0 may have multiple hash values for the same hash key (see QHash documentation).
Definition at line 64 of file SymbolsTable.h.
QHash<QString,ItemHandle*> Tinkercell::SymbolsTable::nonuniqueHandles |
handle names and the corresponsing handles. This hash stores the the non-unique names, such as A. Therefore the hash may contain multiple values for the same key (see QHash documentation)
Definition at line 53 of file SymbolsTable.h.
QHash<QString, QPair<ItemHandle*,QString> > Tinkercell::SymbolsTable::uniqueDataWithDot |
row or column name and the corresponding handle and tool in which the row or column name belongs. Stores full names only. For example, if A.k0 is a data item, then this table will contain A.k0 and A_k0. All entries are unique.
Definition at line 58 of file SymbolsTable.h.
QHash<QString, QPair<ItemHandle*,QString> > Tinkercell::SymbolsTable::uniqueDataWithUnderscore |
Definition at line 58 of file SymbolsTable.h.
QHash<QString,ItemHandle*> Tinkercell::SymbolsTable::uniqueHandlesWithDot |
handle names and the corresponsing handles. This hash stores the unique full names, such a M.A and M_A
Definition at line 48 of file SymbolsTable.h.
QHash<QString,ItemHandle*> Tinkercell::SymbolsTable::uniqueHandlesWithUnderscore |
Definition at line 48 of file SymbolsTable.h.