TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
SymbolsTable.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 
00003 Copyright (c) 2008 Deepak Chandran
00004 Contact: Deepak Chandran (dchandran1@gmail.com)
00005 See COPYRIGHT.TXT
00006 
00007 This file defines the class that stores all symbols, such as node and 
00008 connection names and data columns and rows, for each scene 
00009 
00010 ****************************************************************************/
00011 
00012 
00013 #ifndef TINKERCELL_SYMBOLSTABLE_H
00014 #define TINKERCELL_SYMBOLSTABLE_H
00015 
00016 #include <QtGui>
00017 #include <QString>
00018 #include <QHash>
00019 #include <QPair>
00020 
00021 #include "ItemHandle.h"
00022 
00023 namespace Tinkercell
00024 {
00025         class Tool;
00026         class MainWindow;
00027         class NetworkHandle;
00028         class ItemHandle;
00029         class GraphicsScene;
00030         class TextEditor;
00031 
00037         class TINKERCELLCOREEXPORT SymbolsTable
00038         {
00039         public:
00043                 SymbolsTable(NetworkHandle *);
00045                 virtual void update(int n=0);
00048                 QHash<QString,ItemHandle*> uniqueHandlesWithDot, uniqueHandlesWithUnderscore;
00053                 QHash<QString,ItemHandle*> nonuniqueHandles;
00058                 QHash<QString, QPair<ItemHandle*,QString> > uniqueDataWithDot, uniqueDataWithUnderscore;
00064                 QHash<QString, QPair<ItemHandle*,QString> > nonuniqueData;
00069                 QHash<QString, ItemHandle* > handlesByFamily;
00070 
00072                 virtual bool isValidPointer(void*) const;
00073                 
00075                 virtual QList<ItemHandle*> allHandlesSortedByFamily() const;
00076                 
00078                 virtual QList<ItemHandle*> allHandlesSortedByName() const;
00079                 
00080         protected:
00082                 NetworkHandle * network;
00084                 ItemHandle globalHandle;
00086                 virtual void update(const QList<ItemHandle*>&);
00087 
00089                 QHash<void*,QString> handlesAddress;
00090                 
00091                 friend class NetworkHandle;
00092         };
00093 }
00094 
00095 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines