Go to the documentation of this file.00001 #ifndef wali_wfa_ITRANS_GUARD
00002 #define wali_wfa_ITRANS_GUARD 1
00003
00004
00005
00006
00007
00008 #include <iostream>
00009 #include "wali/Common.hpp"
00010 #include "wali/Markable.hpp"
00011 #include "wali/Printable.hpp"
00012 #include "wali/SemElem.hpp"
00013 #include "wali/KeyContainer.hpp"
00014
00015 #include "wali/TaggedWeight.hpp"
00016 #include "wali/util/WeightChanger.hpp"
00017
00018 namespace wali
00019 {
00020 namespace wpds {
00021 class Config;
00022 }
00023
00024 namespace wfa
00025 {
00026
00027 class ITrans;
00028
00029
00030
00031
00032
00033
00034
00035 struct ITransLT {
00036 bool operator()( const ITrans* a, const ITrans* b ) const;
00037 };
00038
00039 struct ITransEq {
00040 bool operator()( const ITrans* a, const ITrans* b );
00041 };
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063 class ITrans : public Printable, public virtual IMarkable
00064 {
00065
00066
00067
00068 public:
00069 enum status_t { MODIFIED,SAME };
00070 static const std::string XMLTag;
00071 static const std::string XMLFromTag;
00072 static const std::string XMLStackTag;
00073 static const std::string XMLToTag;
00074
00075
00076
00077
00078 public:
00079
00080
00081
00082 virtual ITrans* copy() const = 0;
00083
00084
00085
00086 virtual ITrans* copy(Key fromst, Key stk, Key tost) const = 0;
00087
00088
00089
00090
00091
00092 virtual Key from() const throw() = 0;
00093
00094
00095 virtual Key stack() const throw() = 0;
00096
00097
00098 virtual Key to() const throw() = 0;
00099
00100
00101 virtual const sem_elem_t weight() const throw() = 0;
00102
00103
00104
00105
00106
00107
00108 virtual const sem_elem_t getDelta() const throw() = 0;
00109
00110
00111
00112
00113
00114 virtual Key from() throw() = 0;
00115
00116
00117 virtual Key stack() throw() = 0;
00118
00119
00120 virtual Key to() throw() = 0;
00121
00122
00123 virtual sem_elem_t weight() throw() = 0;
00124
00125
00126
00127
00128
00129
00130 virtual sem_elem_t getDelta() throw() = 0;
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143 virtual void setWeight( sem_elem_t w ) = 0;
00144
00145
00146
00147
00148 virtual void setDelta( const sem_elem_t w ) = 0;
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162 virtual void combineTrans( ITrans* tp )= 0;
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173 virtual const KeyPair & keypair() const throw() = 0;
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185 virtual bool modified() const throw() = 0;
00186
00187
00188
00189
00190 virtual wpds::Config* getConfig() const = 0;
00191
00192
00193
00194
00195
00196 virtual void setConfig( wpds::Config* c ) = 0;
00197
00198
00199
00200
00201
00202
00203
00204 virtual sem_elem_t poststar_eps_closure( sem_elem_t se ) = 0;
00205
00206
00207
00208
00209
00210
00211 virtual TaggedWeight apply_post( TaggedWeight tw) const = 0;
00212
00213
00214
00215
00216
00217
00218 virtual TaggedWeight apply_pre( TaggedWeight tw) const = 0;
00219
00220
00221
00222
00223
00224
00225 virtual void applyWeightChanger( util::WeightChanger &wc) = 0;
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235 virtual bool equal( const ITrans & rhs ) const;
00236
00237
00238 virtual bool equal( const ITrans * rhs ) const;
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249 virtual std::ostream& print( std::ostream& o ) const;
00250
00251
00252
00253
00254
00255
00256 virtual std::ostream& marshall( std::ostream& o ) const;
00257
00258 };
00259
00260 }
00261
00262 }
00263
00264 #endif // wali_wfa_ITRANS_GUARD
00265