#include <OMKNotAttributeExtension.h>
Inheritance diagram for OMK::NotAttributeExtension:
Protected Member Functions | |
virtual void | preComputeParameters () |
method. | |
virtual void | postComputeParameters () |
This method is called during compute by the extensible simulated object. | |
Protected Attributes | |
AttributeT< bool > * | _not |
IAttributeBaseT< bool > * | _attributeAccessor |
Private Member Functions | |
DECLARE_EXTENSION_FACTORY (NotAttributeExtension) |
Example:
object { Class Tracker Scheduling { Frequency 60 } UserParams { TargetConnect [target Position] } Extensions { near { Class Trigger } not { Class NotAttribute AttributeId nearReached // The attribute of the trigger Output true } } }
See Tracker and TriggerExtension
Definition at line 83 of file OMKNotAttributeExtension.h.
OMK::NotAttributeExtension::DECLARE_EXTENSION_FACTORY | ( | NotAttributeExtension | ) | [private] |
void NotAttributeExtension::preComputeParameters | ( | ) | [protected, virtual] |
method.
This method is called by the extensible simulated object at each compute step. Its call takes place in the compute method just after the inputs were retrieved by the computeInputs method and before the output parameters will be computed by the computeParameters
Reimplemented from OMK::Extension.
Definition at line 62 of file OMKNotAttributeExtension.cpp.
References _attributeAccessor, _not, OMK::IAttributeT< PrmType, ModelType, AccessorType >::get(), OMK::IAccessorT< T >::get(), OMK::IAttribute::isUpdated(), OMK::IAccessorT< T >::set(), and OMK::IAttributeT< PrmType, ModelType, AccessorType >::set().
00063 { 00064 if( _attributeAccessor->isUpdated() ) 00065 _not->set( !_attributeAccessor->get() ) ; 00066 else if( _not->isUpdated() ) 00067 _attributeAccessor->set( !_not->get() ) ; 00068 }
void NotAttributeExtension::postComputeParameters | ( | ) | [protected, virtual] |
This method is called during compute by the extensible simulated object.
This method is called by the extensible simulated object at each compute step. Its call takes place in the compute method just after the output parameters were computed by the computeParameters method and before they will be copied in the outputs by the computeOutputs method.
Reimplemented from OMK::Extension.
Definition at line 70 of file OMKNotAttributeExtension.cpp.
References _attributeAccessor, _not, OMK::IAccessorT< T >::get(), and OMK::IAttributeT< PrmType, ModelType, AccessorType >::set().
00071 { 00072 _not->set( !_attributeAccessor->get() ) ; 00073 }
AttributeT< bool >* OMK::NotAttributeExtension::_not [protected] |
Definition at line 89 of file OMKNotAttributeExtension.h.
Referenced by postComputeParameters(), and preComputeParameters().
IAttributeBaseT< bool >* OMK::NotAttributeExtension::_attributeAccessor [protected] |
Definition at line 90 of file OMKNotAttributeExtension.h.
Referenced by postComputeParameters(), and preComputeParameters().
Documentation generated on Mon Jun 9 11:46:03 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |