00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef FAUDES_TP_ATTRIBUTES_H
00014 #define FAUDES_TP_ATTRIBUTES_H
00015
00016 #include "tokenreader.h"
00017 #include "tokenwriter.h"
00018 #include "attributes.h"
00019 #include "tp_timeconstraint.h"
00020
00021 namespace faudes {
00022
00023
00030 class AttributeTimedTrans : public AttributeFlags {
00031 public:
00032
00034 AttributeTimedTrans(void) : AttributeFlags() { mGuard.Name("Guard"); mResets.Name("Resets"); };
00035
00042 bool IsDefault(void) const {return mGuard.Empty() && mResets.Empty() && AttributeFlags::IsDefault(); };
00043
00045 TimeConstraint mGuard;
00046
00048 ClockSet mResets;
00049
00050 protected:
00051
00070 virtual void DoRead(TokenReader& rTr,const std::string& rLabel="", const Type* pContext=0);
00071
00089 virtual void DoWrite(TokenWriter& rTw, const std::string& rLabel="", const Type* pContext=0) const;
00090
00091
00092
00093 };
00094
00095
00104 class AttributeTimedState : public AttributeFlags {
00105 public:
00106
00108 AttributeTimedState(void) : AttributeFlags() { mInvariant.Name("Invariant"); };
00109
00116 bool IsDefault(void) const {return mInvariant.Empty() && AttributeFlags::IsDefault(); };
00117
00119 TimeConstraint mInvariant;
00120
00121 protected:
00122
00141 virtual void DoRead(TokenReader& rTr, const std::string& rLabel="", const Type* pContext=0);
00142
00160 virtual void DoWrite(TokenWriter& rTw, const std::string& rLabel="", const Type* pContext=0) const;
00161
00162
00163 };
00164
00165
00174 class AttributeTimedGlobal : public AttributeVoid {
00175 public:
00176
00178 AttributeTimedGlobal(void) {
00179 mpClockSymbolTable=mClocks.SymbolTablep(); };
00180
00187 bool IsDefault(void) const {return mClocks.Empty(); };
00188
00190 ClockSet mClocks;
00191
00193 SymbolTable* mpClockSymbolTable;
00194
00195 protected:
00196
00215 virtual void DoRead(TokenReader& rTr,const std::string& rLabel="", const Type* pContext=0);
00216
00234 virtual void DoWrite(TokenWriter& rTw, const std::string& rLabel="", const Type* pContext=0) const;
00235
00236
00237
00238
00239 };
00240
00241
00242 }
00243
00244 #endif