TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends
Tinkercell::SymbolsTable Class Reference

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>

Collaboration diagram for Tinkercell::SymbolsTable:
Collaboration graph
[legend]

List of all members.

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

NetworkHandlenetwork
 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

Detailed Description

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.


Constructor & Destructor Documentation

Tinkercell::SymbolsTable::SymbolsTable ( NetworkHandle net)

constructor

Parameters:
NetworkWindow*network that this symbol table belongs in

Definition at line 23 of file SymbolsTable.cpp.


Member Function Documentation

QList< ItemHandle * > Tinkercell::SymbolsTable::allHandlesSortedByFamily ( ) const [virtual]

get list of all items sorted according to family

Definition at line 252 of file SymbolsTable.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::SymbolsTable::update ( const QList< ItemHandle * > &  items) [protected, virtual]

update the symbols table

Definition at line 82 of file SymbolsTable.cpp.

Here is the call graph for this function:


Friends And Related Function Documentation

friend class NetworkHandle [friend]

Definition at line 91 of file SymbolsTable.h.


Member Data Documentation

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.

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.

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.

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.

Definition at line 58 of file SymbolsTable.h.

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.

Definition at line 48 of file SymbolsTable.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines