Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

StateDictionary.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2000 KOM/Darmstadt University of Technology
00003  *
00004  * This program is free software; you can redistribute it and/or modify it
00005  * under the terms of the GNU General Public License as published by the
00006  * Free Software Foundation; either version 2, or (at your option) any
00007  * later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00017  * USA.
00018  */
00019 #ifndef STATE_DICTIONARY_H
00020 #define STATE_DICTIONARY_H
00021 
00022 #include "dictionary.h"
00023 #include "MNList.h"
00024 
00025 class StateDictionary
00026 {
00027     struct Dict
00028     {
00029         typedef dictionary<int,int>   IntMap;
00030 
00031         int    _maxIndex;
00032         IntMap _nameToIndex;
00033         IntMap _indexToName;
00034 
00035         Dict();
00036 
00037         int addName( int name );
00038         int indexForName( int name );
00039         int nameForIndex( int idx );
00040         int maxIndex( );
00041     };
00042 
00043     dictionary<int,Dict*> _stateMap;
00044     Dict                  _signalMap;
00045 
00046 public:
00047     StateDictionary();
00048 
00049     int  addName( int dim, int name );      // returns the index
00050     int  indexForName( int dim, int name ); // returns the index
00051     int  nameForIndex( int dim, int idx );  // returns the name
00052     int  maxIndex( int dim );
00053 
00054     int  addSignalName( int name );
00055     int  indexForSignalName( int name );
00056     int  nameForSignalIndex( int idx );
00057     int  maxSignalIndex( );
00058 
00059     int  v2getDimensions( );
00060     int* v2getSizeVector( );
00061 
00062     int  v2getDimensionsWithSignals( );
00063     int* v2getSizeVectorWithSignals( );
00064 };
00065 
00066 extern StateDictionary  globalStateDictionary;
00067 
00068 #endif /* STATE_DICTIONARY_H */
00069 

Generated on Sat Mar 23 18:58:40 2002 for Komssys-mkauto by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002