00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TORC_GENERIC_OM_APPLY_HPP
00017 #define TORC_GENERIC_OM_APPLY_HPP
00018
00019 #include "torc/generic/om/PointerTypes.hpp"
00020 #include "torc/generic/om/Commentable.hpp"
00021 #include "torc/generic/om/Visitable.hpp"
00022 #include "torc/generic/om/VisitorType.hpp"
00023 #include "torc/generic/om/SelfReferencing.hpp"
00024 #include "torc/generic/om/UserDataContainer.hpp"
00025 #include "torc/generic/om/FactoryType.hpp"
00026 #include "torc/generic/om/Value.hpp"
00027
00028 namespace torc { namespace generic { class LogicalResponse; } }
00029
00030 namespace torc {
00031
00032 namespace generic {
00033
00034
00035
00036
00037
00038 class Apply
00039 : public Commentable,
00040 public Visitable,
00041 public SelfReferencing<Apply>,
00042 public UserDataContainer
00043 {
00044
00045 friend class FactoryType<Apply>;
00046
00047 public:
00048
00049
00050
00051 typedef VisitorType<Apply> Visitor;
00052
00053 virtual void
00054 accept(BaseVisitor & inoutVisitor) throw(Error);
00055
00056
00057
00058
00059 class Factory: public FactoryType<Apply>
00060 {
00061 public:
00062 using FactoryType<Apply>::create;
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 ApplySharedPtr
00075 virtual newApplyPtr( const int32_t & inNoOfCycle,
00076 const Value & inCycleDuration,
00077 const std::list< LogicalResponseSharedPtr > & inLogicResponces,
00078 const SimulateSharedPtr & inSimulate
00079 = SimulateSharedPtr() ) throw(Error);
00080 };
00081
00082
00083
00084
00085
00086 inline const int32_t
00087 getNoOfCycle() const throw();
00088
00089
00090
00091
00092
00093 void
00094 setNoOfCycle( const int32_t & inValue ) throw();
00095
00096
00097
00098
00099
00100 inline const Value
00101 getCycleDuration() const throw();
00102
00103
00104
00105
00106
00107 void
00108 setCycleDuration(const Value & value) throw();
00109
00110
00111
00112
00113
00114
00115 inline void
00116 getLogicResponses( std::list< LogicalResponseSharedPtr > & outLogicResponces ) const throw();
00117
00118
00119
00120
00121
00122
00123 void
00124 setLogicResponses( const std::list< LogicalResponseSharedPtr > & inLogicResponces ) throw();
00125
00126
00127
00128
00129
00130
00131 void
00132 addLogicResponse(const LogicalResponseSharedPtr & inLogicResponce ) throw();
00133
00134 ~Apply() throw();
00135
00136 protected:
00137 Apply();
00138
00139 private:
00140 Apply(const Apply & source) throw();
00141
00142 Apply &
00143 operator=(const Apply & source) throw();
00144
00145 int32_t mNoOfCycle;
00146 Value mCycleDuration;
00147 std::list< LogicalResponseSharedPtr > mLogicResponses;
00148
00149 };
00150
00151
00152
00153
00154
00155 inline const int32_t
00156 Apply::getNoOfCycle() const throw() {
00157 return mNoOfCycle;
00158 }
00159
00160
00161
00162
00163
00164 inline const Value
00165 Apply::getCycleDuration() const throw() {
00166 return mCycleDuration;
00167 }
00168
00169
00170
00171
00172
00173
00174 inline void
00175 Apply::getLogicResponses(
00176 std::list< LogicalResponseSharedPtr > & outLogicResponces ) const throw() {
00177 outLogicResponces.insert( outLogicResponces.end(),
00178 mLogicResponses.begin(), mLogicResponses.end() );
00179 }
00180
00181 }
00182
00183 }
00184 #endif // TORC_GENERIC_OM_APPLY_HPP