00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TORC_GENERIC_OM_FORBIDDENEVENT_HPP
00017 #define TORC_GENERIC_OM_FORBIDDENEVENT_HPP
00018
00019 #include "torc/generic/om/PointerTypes.hpp"
00020 #include "torc/generic/om/Visitable.hpp"
00021 #include "torc/generic/om/SelfReferencing.hpp"
00022 #include "torc/generic/om/FactoryType.hpp"
00023 #include "torc/generic/om/VisitorType.hpp"
00024 #include "torc/generic/om/Value.hpp"
00025
00026 #include <list>
00027
00028 namespace torc { namespace generic { class Event; } }
00029
00030 namespace torc {
00031
00032 namespace generic {
00033
00034
00035
00036
00037
00038
00039
00040
00041 class ForbiddenEvent
00042 : public Visitable,
00043 public SelfReferencing<ForbiddenEvent>
00044 {
00045 friend class FactoryType<ForbiddenEvent>;
00046
00047 public:
00048
00049
00050
00051 typedef VisitorType<ForbiddenEvent> Visitor;
00052
00053 virtual void
00054 accept(BaseVisitor & inoutVisitor) throw(Error);
00055
00056
00057
00058
00059 class Factory: public FactoryType<ForbiddenEvent>
00060 {
00061 public:
00062 using FactoryType<ForbiddenEvent>::create;
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076 ForbiddenEventSharedPtr
00077 virtual newForbiddenEventPtr( const EventSharedPtr & inStartTimeInterval,
00078 const EventSharedPtr & inEndTimeInterval,
00079 const std::list< EventSharedPtr > & inEvents,
00080 const TimingSharedPtr & inTiming
00081 = TimingSharedPtr(),
00082 const Value & inDuration = Value() ) throw(Error);
00083 };
00084
00085
00086
00087
00088
00089 inline const EventSharedPtr
00090 getStartTimeInterval() const throw();
00091
00092
00093
00094
00095
00096 void
00097 setStartTimeInterval(const EventSharedPtr & inSource) throw();
00098
00099
00100
00101
00102
00103 inline const EventSharedPtr
00104 getEndTimeInterval() const throw();
00105
00106
00107
00108
00109
00110 void
00111 setEndTimeInterval(const EventSharedPtr & inSource) throw();
00112
00113
00114
00115
00116
00117 inline const Value
00118 getDuration() const throw();
00119
00120
00121
00122
00123
00124 void
00125 setDuration(const Value & inValue) throw();
00126
00127
00128
00129
00130
00131
00132 inline void
00133 getEvents( std::list< EventSharedPtr > & outEvents ) const throw();
00134
00135
00136
00137
00138
00139
00140 void
00141 setEvents( const std::list< EventSharedPtr > & inEvents ) throw();
00142
00143
00144
00145
00146
00147
00148 void
00149 addEvent(const EventSharedPtr & inSource) throw();
00150
00151 virtual
00152 ~ForbiddenEvent() throw();
00153
00154 protected:
00155 ForbiddenEvent();
00156
00157 private:
00158 ForbiddenEvent(const ForbiddenEvent & source) throw();
00159
00160 ForbiddenEvent &
00161 operator=(const ForbiddenEvent & source) throw();
00162
00163 EventSharedPtr mStartTimeInterval;
00164 EventSharedPtr mEndTimeInterval;
00165 Value mDuration;
00166 std::list< EventSharedPtr > mEvents;
00167
00168 };
00169
00170
00171
00172
00173
00174 inline const EventSharedPtr
00175 ForbiddenEvent::getStartTimeInterval() const throw() {
00176 return mStartTimeInterval;
00177 }
00178
00179
00180
00181
00182
00183 inline const EventSharedPtr
00184 ForbiddenEvent::getEndTimeInterval() const throw() {
00185 return mEndTimeInterval;
00186 }
00187
00188
00189
00190
00191
00192 inline const Value
00193 ForbiddenEvent::getDuration() const throw() {
00194 return mDuration;
00195 }
00196
00197
00198
00199
00200
00201
00202 inline void
00203 ForbiddenEvent::getEvents(
00204 std::list< EventSharedPtr > & outEvents ) const throw() {
00205 outEvents.insert( outEvents.end(),
00206 mEvents.begin(), mEvents.end() );
00207 }
00208
00209 }
00210
00211 }
00212 #endif // TORC_GENERIC_OM_FORBIDDENEVENT_HPP