| |
libFAUDES
Sections
Index
|
faudes::SimEventAttribute Class Reference |
Public Member Functions | |
virtual SimEventAttribute * | New (void) const |
Construct on heap. | |
virtual SimEventAttribute * | Copy (void) const |
Construct on heap. | |
virtual const SimEventAttribute * | Cast (const Type *pOther) const |
Cast other object to this type. | |
virtual SimEventAttribute & | Assign (const Type &rSrc) |
Assign configuration data from other object. | |
virtual bool | Equal (const Type &rOther) const |
Test equality of configuration data. | |
virtual SimEventAttribute & | operator= (const SimEventAttribute &rSrc) |
virtual bool | operator== (const SimEventAttribute &rOther) const |
virtual bool | operator!= (const SimEventAttribute &rOther) const |
SimEventAttribute (void) | |
Default constructor. | |
SimEventAttribute (const SimEventAttribute &rSrc) | |
Copy constructor. | |
virtual bool | IsDefault (void) const |
Test for default value. | |
bool | IsStochastic (void) const |
Test for stochastic property. | |
bool | IsPriority (void) const |
Test for priority property. | |
void | Stochastic (const SimStochasticEventAttribute &rStochasticAttribute) |
Set stochastic behaviour. | |
void | Priority (const SimPriorityEventAttribute &rPriorityAttribute) |
Set priority behaviour. | |
const SimPriorityEventAttribute & | Priority (void) const |
Get priority attribute. | |
const SimStochasticEventAttribute & | Stochastic (void) const |
Get stochastic attribute. | |
Public Attributes | |
tpTime::Type | mScheduledFor |
Next scheduled occurence of this event relative to current time. | |
tpTime::Type | mExpiresAt |
Time at which the recent schedule expires. | |
tpTime::Type | mDelayFor |
Amount of time to defer the event. | |
TimeInterval | mReferenceInterval |
Time domain on which the recent schedule was computed. | |
Protected Member Functions | |
SimEventAttribute & | DoAssign (const SimEventAttribute &rSrcAttr) |
Assignment method. | |
bool | DoEqual (const SimEventAttribute &rOther) const |
Test equality. | |
virtual void | DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0) |
Reads the attribute from TokenReader, see AttributeVoid for public wrappers. | |
virtual void | DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const |
Writes the attribute to TokenWriter, see AttributeVoid for public wrappers. | |
Protected Attributes | |
bool | mStochastic |
Indicate precense of stochastic behaviour. | |
bool | mPriority |
Indicate precense of priority property. | |
SimPriorityEventAttribute | mPriorityAttribute |
Priority definition data. | |
SimStochasticEventAttribute | mStochasticAttribute |
Stochastic definition data. |
faudes::SimEventAttribute::SimEventAttribute | ( | void | ) | [inline] |
Default constructor.
Construct a SimEventAttribute with priority 0.
Definition at line 164 of file sp_simeventset.h.
faudes::SimEventAttribute::SimEventAttribute | ( | const SimEventAttribute & | rSrc | ) | [inline] |
SimEventAttribute * faudes::SimEventAttribute::New | ( | void | ) | const [virtual] |
Construct on heap.
Technically not a constructor, this function creates an object with the same type Type. New() is defined as a virtual function and derived classes are meant to re-implement with the appropiate constructor. This can be done via the provided macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION. As with new, it is the callers reponsabilty to delete the object when no longer needed.
Reimplemented from faudes::AttributeCFlags.
Definition at line 15 of file sp_simeventset.cpp.
SimEventAttribute * faudes::SimEventAttribute::Copy | ( | void | ) | const [virtual] |
Construct on heap.
Technically not a constructor, this function creates an object with the same type Type and the same configuration. Copy() is defined as a virtual function and derived classes are meant to re-implement with the appropiate copy constructor. This can be done via the provided macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION. As with new, it is the callers reponsabilty to delete the object when no longer needed.
Reimplemented from faudes::AttributeCFlags.
Definition at line 15 of file sp_simeventset.cpp.
const SimEventAttribute * faudes::SimEventAttribute::Cast | ( | const Type * | pOther | ) | const [virtual] |
Cast other object to this type.
Enables the run-time interface to test whether pObject is derived from this object. This feature is used e.g. in the faudes container classes to test attributes. Derived classes must reimplement this function using the appropriate dynamic cast.
Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.
Reimplemented from faudes::AttributeCFlags.
Definition at line 15 of file sp_simeventset.cpp.
SimEventAttribute & faudes::SimEventAttribute::Assign | ( | const Type & | rSrc | ) | [virtual] |
Assign configuration data from other object.
Derived classes should reimplement this method to first try to cast the source to the respective class. If successful, the protected function DoAssign is invoked to perform the actual assignment. If the cast fails, the Assign method of the parent class is called. Thus, faudes objects are up- and downcatsted for assignment, maintaining as much of the source data as digestable by the destination object. On the downside, there is no sensible typechecking at compile-time.
Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.
rSrc | Source to copy from |
Reimplemented from faudes::AttributeCFlags.
Definition at line 15 of file sp_simeventset.cpp.
bool faudes::SimEventAttribute::Equal | ( | const Type & | rOther | ) | const [virtual] |
Test equality of configuration data.
Derived classes should reimplement this method to return true if both actual types and configuration data match. The object name is not consired in the test.
This method calls the virtual method DoEqual(). Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.
rOther | Other objevt to compare with. |
Reimplemented from faudes::AttributeCFlags.
Definition at line 15 of file sp_simeventset.cpp.
SimEventAttribute & faudes::SimEventAttribute::operator= | ( | const SimEventAttribute & | rSrc | ) | [virtual] |
Definition at line 15 of file sp_simeventset.cpp.
bool faudes::SimEventAttribute::operator== | ( | const SimEventAttribute & | rOther | ) | const [virtual] |
Definition at line 15 of file sp_simeventset.cpp.
bool faudes::SimEventAttribute::operator!= | ( | const SimEventAttribute & | rOther | ) | const [virtual] |
Definition at line 15 of file sp_simeventset.cpp.
virtual bool faudes::SimEventAttribute::IsDefault | ( | void | ) | const [inline, virtual] |
Test for default value.
Reimplemented from faudes::AttributeCFlags.
Definition at line 179 of file sp_simeventset.h.
bool faudes::SimEventAttribute::IsStochastic | ( | void | ) | const [inline] |
Test for stochastic property.
Definition at line 188 of file sp_simeventset.h.
bool faudes::SimEventAttribute::IsPriority | ( | void | ) | const [inline] |
Test for priority property.
Definition at line 196 of file sp_simeventset.h.
void faudes::SimEventAttribute::Stochastic | ( | const SimStochasticEventAttribute & | rStochasticAttribute | ) | [inline] |
Set stochastic behaviour.
Define this attribute to indicate the specified stochastic bahaviour.
rStochasticAttribute | Define stochastic behaviour |
Definition at line 205 of file sp_simeventset.h.
void faudes::SimEventAttribute::Priority | ( | const SimPriorityEventAttribute & | rPriorityAttribute | ) | [inline] |
Set priority behaviour.
Define this attribute to indicate execution with the specified priority.
rPriorityAttribute | Define stochastic behaviour |
Definition at line 216 of file sp_simeventset.h.
const SimPriorityEventAttribute& faudes::SimEventAttribute::Priority | ( | void | ) | const [inline] |
Get priority attribute.
Note that the return value is only meaningful if the attribute actually is a priority attribute.
Definition at line 228 of file sp_simeventset.h.
const SimStochasticEventAttribute& faudes::SimEventAttribute::Stochastic | ( | void | ) | const [inline] |
Get stochastic attribute.
Note that the return value is only meaningful if the attribute defines stochastic behaviour.
Definition at line 238 of file sp_simeventset.h.
SimEventAttribute & faudes::SimEventAttribute::DoAssign | ( | const SimEventAttribute & | rSrcAttr | ) | [protected] |
Assignment method.
rSrcAttr | Source to assign from |
Definition at line 19 of file sp_simeventset.cpp.
bool faudes::SimEventAttribute::DoEqual | ( | const SimEventAttribute & | rOther | ) | const [protected] |
Test equality.
rOther | Attribute to compare with |
Definition at line 32 of file sp_simeventset.cpp.
void faudes::SimEventAttribute::DoRead | ( | TokenReader & | rTr, | |
const std::string & | rLabel = "" , |
|||
const Type * | pContext = 0 | |||
) | [protected, virtual] |
Reads the attribute from TokenReader, see AttributeVoid for public wrappers.
If the current token indicates a simulation event section, the method reads all consecutive simulation attributes. Else it does nothing. Exceptions may only be thrown on invalid data within the section. The label argument is ignored, we use hardcoded keywords for the four attributes. The context argument is ignored.
rTr | TokenReader to read from | |
rLabel | Section to read | |
pContext | Read context to provide contextual information |
Exception |
|
Reimplemented from faudes::AttributeCFlags.
Definition at line 82 of file sp_simeventset.cpp.
void faudes::SimEventAttribute::DoWrite | ( | TokenWriter & | rTw, | |
const std::string & | rLabel = "" , |
|||
const Type * | pContext = 0 | |||
) | const [protected, virtual] |
Writes the attribute to TokenWriter, see AttributeVoid for public wrappers.
Writes all present simulation event attributes to include the defining data. The label argument is ignored, we use hardcoded keywords. The context argument is ignored.
rTw | TokenWriter to write to | |
rLabel | Section to write | |
pContext | Read context to provide contextual information |
Exception |
|
Reimplemented from faudes::AttributeCFlags.
Definition at line 46 of file sp_simeventset.cpp.
Next scheduled occurence of this event relative to current time.
This is part of the execution state. It indicates the instance of time for which the respective event is scheduled to occur. Schedules, however, may expire or otherwise become invalid.
Definition at line 238 of file sp_simeventset.h.
Time at which the recent schedule expires.
This is part of the execution state. Once a schedule expires, the event is re-scheduled.
Definition at line 251 of file sp_simeventset.h.
Amount of time to defer the event.
This is part of the execution state. It is used for events of delay type and is a count down type alarm to trigger the event.
Definition at line 258 of file sp_simeventset.h.
Time domain on which the recent schedule was computed.
This is part of the execution state. It is used to invalidate schedules for events of trigger type.
Definition at line 264 of file sp_simeventset.h.
bool faudes::SimEventAttribute::mStochastic [protected] |
bool faudes::SimEventAttribute::mPriority [protected] |
libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6