00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef V2_STATES_H
00020 #define V2_STATES_H
00021
00022 #include "V1States.h"
00023 #include "MNString.h"
00024 #include "MNArray.h"
00025
00026 class V1Transition;
00027
00028 class V2StateVector;
00029 class V2PartialState;
00030 class V2StateOther;
00031 class V2StateKeep;
00032
00033
00034
00035
00036
00037 class V2StateVector
00038 {
00039 typedef V2PartialState* V2PartialStatePtr;
00040
00041 V2PartialState** _vector;
00042 int _dimension;
00043 V1Transition* _transition;
00044 int _first_line;
00045
00046 public:
00047 enum Mode { Name, Index };
00048
00049 public:
00050 V2StateVector( int dimension, int first_line, V1Transition* trans );
00051
00052 V2StateVector( int dimension, int* v, int first_line, Mode m );
00053 V2StateVector( V2StateVector& orig );
00054 ~V2StateVector( );
00055
00056 void set( int dim, V2PartialState* s );
00057 int* getIndexVector();
00058 int* getIndexVectorWithSignals();
00059 V1Transition* getTransition( );
00060
00061 bool keep();
00062 bool generic();
00063
00064 MNString asIndexVector( );
00065 MNString asNameVector( );
00066 MNString asSymbolicName( );
00067 MNString asNextstateParameters( );
00068
00069 int getFirstLine( );
00070
00071
00072 };
00073
00074
00075
00076
00077
00078 class V2PartialState
00079 {
00080 int _dimension;
00081 int _name;
00082 int _ps_index;
00083
00084 public:
00085 enum Mode { Name, Index };
00086
00087 public:
00088 V2PartialState( int dimension );
00089 V2PartialState( int dimension, int name, Mode mode = Name );
00090 V2PartialState( int dimension, V1PartialState& orig );
00091 virtual ~V2PartialState( ) { }
00092
00093 virtual MNString getString();
00094 virtual int getName();
00095 virtual int getIndex();
00096
00097 virtual bool keep();
00098 virtual bool generic();
00099 };
00100
00101
00102
00103
00104
00105 class V2StateOther : public V2PartialState
00106 {
00107 public:
00108 V2StateOther( int dimension );
00109 virtual ~V2StateOther() { }
00110
00111 virtual MNString getString();
00112 virtual int getName();
00113 virtual int getIndex();
00114
00115 virtual bool generic();
00116 };
00117
00118
00119
00120
00121
00122 class V2StateKeep : public V2PartialState
00123 {
00124 public:
00125 V2StateKeep( int dimension );
00126 virtual ~V2StateKeep() { }
00127
00128 virtual MNString getString();
00129 virtual int getName();
00130 virtual int getIndex();
00131
00132 virtual bool keep();
00133 };
00134
00135 #endif
00136