#include <OMKAbstractInput.h>
Inheritance diagram for OMK::AbstractInput< Type >:
Public Member Functions | |
AbstractInput (const Name &inputName, SimulatedObject &owner, bool makeConnectable, const int precisionLevel=OMK::Type::PolatorNT::defaultPrecisionLevel) | |
Constructor. | |
virtual | ~AbstractInput () |
Destructor. | |
virtual bool | connect (const Name &objectName, const Name &outputName)=0 |
connect this input to the output of an other simulated object. | |
virtual bool | connect (SimulatedObject &object, const Name &outputName)=0 |
connect this input to the output of an other simulated object. | |
virtual bool | connect (SimulatedObject *pointerToObject, const Name &outputName)=0 |
connect this input to the output of an other simulated object. | |
virtual bool | connect (const Name &objectName, const Name &outputName, const Type &initialValue)=0 |
connect this input to the output of an other object, and propose an initial value in case the output hasn't been initialised yet. | |
virtual bool | connect (SimulatedObject &object, const Name &outputName, const Type &initialValue)=0 |
connect this input to the output of an other object, and propose an initial value in case the output hasn't been initialised yet. | |
virtual bool | connect (SimulatedObject *pointerToObject, const Name &outputName, const Type &initialValue)=0 |
connect this input to the output of an other object, and propose an initial value in case the output hasn't been initialised yet. | |
virtual bool | connectToControlParameter (const Name &objectName, const Name &controlParameterName)=0 |
connect this input to a control parameter of an other simulated object. | |
virtual bool | connectToControlParameter (SimulatedObject &object, const Name &controlParameterName)=0 |
connect this input to the controlParameter of an other simulated object. | |
virtual bool | connectToControlParameter (SimulatedObject *pointerToObject, const Name &controlParameterName)=0 |
connect this input to the controlParameter of an other simulated object. | |
virtual bool | connectToControlParameter (const Name &objectName, const Name &controlParameterName, const Type &initialValue)=0 |
connect this input to a control parameter of an other object, and propose an initial value in case the controlParameter hasn't been initialised yet. | |
virtual bool | connectToControlParameter (SimulatedObject &object, const Name &controlParameterName, const Type &initialValue)=0 |
connect this input to a control parameter of an other object, and propose an initial value in case the controlParameter hasn't been initialised yet. | |
virtual bool | connectToControlParameter (SimulatedObject *pointerToObject, const Name &controlParameterName, const Type &initialValue)=0 |
connect this input to a control parameter of an other object, and propose an initial value in case the controlParameter hasn't been initialised yet. | |
virtual bool | isConnectable () const |
isConnectable. | |
bool | isConnected () const |
To know if the input is connected to an output. | |
virtual void | setConnectable (bool nextConnectableState) |
setConnectable. | |
virtual const OutputNT * | getConnectedOutput () const=0 |
get a pointer to output this input is connected to | |
const EventIdentifier & | getConnectionEventId () const |
get the connection event ID | |
const EventIdentifier & | getConnectionToControlParameterEventId () const |
get the connection event ID, when the connection request comes from a control parameter | |
virtual const Type & | get (int deltaT=0)=0 |
get a value from this input | |
virtual int | getDistanceToExactValue () const=0 |
get distance to exact value. | |
virtual const Type & | getLastExactValue () const=0 |
get the last exact value. | |
virtual const Date & | getDateOfLastExactValue () const=0 |
get the date of the last exact value. | |
virtual void | printDebuggingInformation (std::ostream &err) const=0 |
print any usefull debugging information for this input | |
virtual int | getPrecisionLevel () const |
get the polation level used by this input | |
virtual int | setPrecisionLevel (const int newValue) |
change the polation level of this input | |
virtual void | notifyAliasing (InputAlias< Type > *aliasingInputAlias) |
called when this input is aliased | |
virtual void | notifyUnaliasing (InputAlias< Type > *aliasingInputAlias) |
called when this input is no longer aliased | |
Protected Attributes | |
std::list< InputAlias< Type > * > | _listOfAliases |
list of aliases of this input | |
int | _precisionLevel |
precision level asked for when a value is fetched from the connected output | |
bool | _connectable |
can simulated objects other than the owner change the connection of this input | |
const EventIdentifier | _connectionEventId |
the connection event Identifier | |
const EventIdentifier | _connectionToControlParameterEventId |
the connection event Identifier |
Definition at line 38 of file OMKAbstractInput.h.
OMK::AbstractInput< Type >::AbstractInput | ( | const Name & | inputName, | |
SimulatedObject & | owner, | |||
bool | makeConnectable, | |||
const int | precisionLevel = OMK::Type::PolatorNT::defaultPrecisionLevel | |||
) | [inline] |
Constructor.
inputName | the input name | |
owner | the input owner | |
makeConnectable | true is this input must accept connection requests originating from other simulated objects than it's owner | |
precisionLevel | the degre of precision of any polation operation. The scale of this degree is meaningfull only on a polator level. The higher this degre, the more precise calculation should get. |
Definition at line 273 of file OMKAbstractInput.h.
References OMK::InputNT::registerMe().
00277 : InputNT( owner, inputName ), 00278 _precisionLevel( precisionLevel ), 00279 _connectable( makeConnectable ), 00280 _connectionEventId( ( "newConnection " + inputName.getString() ).c_str() ), 00281 _connectionToControlParameterEventId( ( "newConnectionToControlParameter " 00282 + inputName.getString() ).c_str() ) 00283 { 00284 #ifdef _DEBUGTYPEUTIL 00285 std::cout << "AbstractInput<Type>::AbstractInput --> constructor " 00286 << std::endl ; 00287 #endif 00288 registerMe() ; 00289 }
OMK::AbstractInput< Type >::~AbstractInput | ( | ) | [inline, virtual] |
Destructor.
Definition at line 294 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::_listOfAliases.
00295 { 00296 typename std::list< InputAlias< Type > * >::iterator i ; 00297 for( i =_listOfAliases.begin() ; i != _listOfAliases.end() ; ++i ) 00298 { 00299 (*i)->inputAliasedDeleted() ; 00300 } 00301 }
virtual bool OMK::AbstractInput< Type >::connect | ( | const Name & | objectName, | |
const Name & | outputName | |||
) | [pure virtual] |
connect this input to the output of an other simulated object.
objectName | the object owning outputName | |
outputName | the name of the output to be connected to |
Implements OMK::InputNT.
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
Referenced by OMK::InputAlias< T >::connect(), and OMK::AbstractInput< Type >::connect().
virtual bool OMK::AbstractInput< Type >::connect | ( | SimulatedObject & | object, | |
const Name & | outputName | |||
) | [pure virtual] |
connect this input to the output of an other simulated object.
pointerToObject | the object owning outputName | |
outputName | the name of the output to be connected to |
Implements OMK::InputNT.
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
bool OMK::AbstractInput< Type >::connect | ( | SimulatedObject * | pointerToObject, | |
const Name & | outputName | |||
) | [inline, pure virtual] |
connect this input to the output of an other simulated object.
pointerToObject | the object owning outputName | |
outputName | the name of the output to be connected to |
Implements OMK::InputNT.
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
Definition at line 390 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::connect(), OMERROR, and OMK::AbstractInput< Type >::printDebuggingInformation().
00392 { 00393 if( pointerToObject != 0 ) 00394 { 00395 return connect( *pointerToObject, outputName ) ; 00396 } 00397 else 00398 { 00399 OMERROR( "AbstractInput<Type>::connect : got null pointer" ) ; 00400 printDebuggingInformation( std::cerr ) ; 00401 return false ; 00402 } 00403 }
virtual bool OMK::AbstractInput< Type >::connect | ( | const Name & | objectName, | |
const Name & | outputName, | |||
const Type & | initialValue | |||
) | [pure virtual] |
connect this input to the output of an other object, and propose an initial value in case the output hasn't been initialised yet.
objectName | the object owning outputName | |
outputName | the name of the output to be connected to | |
initialValue | the proposed initial value to the output if it isn't initialised |
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
virtual bool OMK::AbstractInput< Type >::connect | ( | SimulatedObject & | object, | |
const Name & | outputName, | |||
const Type & | initialValue | |||
) | [pure virtual] |
connect this input to the output of an other object, and propose an initial value in case the output hasn't been initialised yet.
object | the object owning outputName | |
outputName | the name of the output to be connected to | |
initialValue | the proposed initial value to the output if it isn't initialised |
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
bool OMK::AbstractInput< Type >::connect | ( | SimulatedObject * | pointerToObject, | |
const Name & | outputName, | |||
const Type & | initialValue | |||
) | [inline, pure virtual] |
connect this input to the output of an other object, and propose an initial value in case the output hasn't been initialised yet.
pointerToObject | the object owning outputName | |
outputName | the name of the output to be connected to | |
initialValue | the proposed initial value to the output if it isn't initialised |
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
Definition at line 408 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::connect(), OMERROR, and OMK::AbstractInput< Type >::printDebuggingInformation().
00411 { 00412 if( pointerToObject != 0 ) 00413 { 00414 return connect( *pointerToObject, outputName, initialValue ) ; 00415 } 00416 else 00417 { 00418 OMERROR( "AbstractInput< Type >::connect : got null pointer" ) ; 00419 printDebuggingInformation( std::cerr ) ; 00420 return false ; 00421 } 00422 }
virtual bool OMK::AbstractInput< Type >::connectToControlParameter | ( | const Name & | objectName, | |
const Name & | controlParameterName | |||
) | [pure virtual] |
connect this input to a control parameter of an other simulated object.
objectName | the object owning controlParameterName | |
controlParameterName | the name of the output to be connected to |
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
Referenced by OMK::InputAlias< T >::connectToControlParameter(), and OMK::AbstractInput< Type >::connectToControlParameter().
virtual bool OMK::AbstractInput< Type >::connectToControlParameter | ( | SimulatedObject & | object, | |
const Name & | controlParameterName | |||
) | [pure virtual] |
connect this input to the controlParameter of an other simulated object.
object | the object owning controlParameterName | |
controlParameterName | the name of the output to be connected to |
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
bool OMK::AbstractInput< Type >::connectToControlParameter | ( | SimulatedObject * | pointerToObject, | |
const Name & | controlParameterName | |||
) | [inline, pure virtual] |
connect this input to the controlParameter of an other simulated object.
pointerToObject | the object owning controlParameterName | |
controlParameterName | the name of the output to be connected to |
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
Definition at line 427 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::connectToControlParameter(), OMERROR, and OMK::AbstractInput< Type >::printDebuggingInformation().
00430 { 00431 if( pointerToObject != 0 ) 00432 { 00433 return connectToControlParameter( *pointerToObject, outputName ) ; 00434 } 00435 else 00436 { 00437 OMERROR( "AbstractInput< Type >::connect : got null pointer" ) ; 00438 printDebuggingInformation( std::cerr ) ; 00439 return false ; 00440 } 00441 }
virtual bool OMK::AbstractInput< Type >::connectToControlParameter | ( | const Name & | objectName, | |
const Name & | controlParameterName, | |||
const Type & | initialValue | |||
) | [pure virtual] |
connect this input to a control parameter of an other object, and propose an initial value in case the controlParameter hasn't been initialised yet.
objectName | the object owning outputName | |
controlParameter | the name of the controlParameter to be connected to | |
initialValue | the proposed initial value to the output if it isn't initialised |
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
virtual bool OMK::AbstractInput< Type >::connectToControlParameter | ( | SimulatedObject & | object, | |
const Name & | controlParameterName, | |||
const Type & | initialValue | |||
) | [pure virtual] |
connect this input to a control parameter of an other object, and propose an initial value in case the controlParameter hasn't been initialised yet.
object | the object owning outputName | |
controlParameterName | the name of the control parameter to be connected to | |
initialValue | the proposed initial value to the output if it isn't initialised |
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
bool OMK::AbstractInput< Type >::connectToControlParameter | ( | SimulatedObject * | pointerToObject, | |
const Name & | controlParameterName, | |||
const Type & | initialValue | |||
) | [inline, pure virtual] |
connect this input to a control parameter of an other object, and propose an initial value in case the controlParameter hasn't been initialised yet.
pointerToObject | the object owning outputName | |
controlParameterName | the name of the control parameter to be connected to | |
initialValue | the proposed initial value to the output if it isn't initialised |
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
Definition at line 446 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::connectToControlParameter(), OMERROR, and OMK::AbstractInput< Type >::printDebuggingInformation().
00450 { 00451 if( pointerToObject != 0 ) 00452 { 00453 return connectToControlParameter( *pointerToObject, 00454 outputName, 00455 initialValue ) ; 00456 } 00457 else 00458 { 00459 OMERROR( "AbstractInput< Type >::connect : got null pointer" ) ; 00460 printDebuggingInformation( std::cerr ) ; 00461 return false ; 00462 } 00463 }
bool OMK::AbstractInput< Type >::isConnectable | ( | ) | const [inline, virtual] |
isConnectable.
find out if this input accepts connection requests from other simulated objects
Definition at line 348 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::_connectable.
00349 { 00350 return _connectable ; 00351 }
bool OMK::AbstractInput< Type >::isConnected | ( | ) | const [inline] |
To know if the input is connected to an output.
Definition at line 165 of file OMKAbstractInput.h.
00165 { return getConnectedOutput() != 0 ; }
void OMK::AbstractInput< Type >::setConnectable | ( | bool | nextConnectableState | ) | [virtual] |
setConnectable.
Definition at line 356 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::_connectable, OMK::KernelAttribute::_owner, OMK::SimulatedObject::getController(), OMK::CurrentActiveObject::getCurrentActiveObject(), OMK::KernelAttribute::getName(), OMK::SimulatedObject::getName(), and OMERROR.
00357 { 00358 if( CurrentActiveObject::getCurrentActiveObject() == & _owner || 00359 CurrentActiveObject::getCurrentActiveObject() == & _owner.getController() || 00360 CurrentActiveObject::getCurrentActiveObject() == 0 ) 00361 { 00362 _connectable = newConnectableState ; 00363 } 00364 else 00365 { 00366 OMERROR( "Warning: " << _owner.getName() << "::" << getName() 00367 << "only the owner can change the connectable state of an input" ) ; 00368 } 00369 }
virtual const OutputNT* OMK::AbstractInput< Type >::getConnectedOutput | ( | ) | const [pure virtual] |
get a pointer to output this input is connected to
Implements OMK::InputNT.
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
Referenced by OMK::InputAlias< T >::getConnectedOutput(), and OMK::AbstractInput< OMK::Type::SimpleTypeT< Type > >::isConnected().
const EventIdentifier & OMK::AbstractInput< Type >::getConnectionEventId | ( | ) | const [inline] |
get the connection event ID
Definition at line 374 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::_connectionEventId.
00375 { 00376 return _connectionEventId ; 00377 }
const EventIdentifier & OMK::AbstractInput< Type >::getConnectionToControlParameterEventId | ( | ) | const [inline] |
get the connection event ID, when the connection request comes from a control parameter
Definition at line 382 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::_connectionToControlParameterEventId.
00383 { 00384 return _connectionToControlParameterEventId ; 00385 }
virtual const Type& OMK::AbstractInput< Type >::get | ( | int | deltaT = 0 |
) | [pure virtual] |
get a value from this input
delta | the delay between the current date and the date of the value expected. If this delay is negative, a value in the future will be calculated. |
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
Referenced by OMK::InputAlias< T >::get().
virtual int OMK::AbstractInput< Type >::getDistanceToExactValue | ( | ) | const [pure virtual] |
get distance to exact value.
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
Referenced by OMK::InputAlias< T >::getDistanceToExactValue().
virtual const Type& OMK::AbstractInput< Type >::getLastExactValue | ( | ) | const [pure virtual] |
get the last exact value.
Using this member function garanties that a value produced is returned, but it should only be used for specific needs, as it prevents any optimisation by the kernel, and the date of production of the value isn't accessible
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
Referenced by OMK::InputAlias< T >::getLastExactValue().
virtual const Date& OMK::AbstractInput< Type >::getDateOfLastExactValue | ( | ) | const [pure virtual] |
get the date of the last exact value.
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
Referenced by OMK::InputAlias< T >::getDateOfLastExactValue().
virtual void OMK::AbstractInput< Type >::printDebuggingInformation | ( | std::ostream & | err | ) | const [pure virtual] |
print any usefull debugging information for this input
Implements OMK::KernelAttribute.
Implemented in OMK::Input< T >, OMK::InputAlias< T >, OMK::Input< ModelType >, OMK::Input< OMK::Type::SimpleTypeT< bool > >, OMK::Input< OMK::Type::SimpleTypeT< float > >, OMK::Input< OMK::Type::SimpleTypeT< T > >, OMK::Input< OMK::Type::SimpleTypeT< PrmType > >, OMK::Input< PrmType >, OMK::Input< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Input< OMK::Type::SimpleTypeT< HBT::PostureData > >, OMK::Input< OMK::Type::SimpleTypeT< Type > >, OMK::InputAlias< ModelType >, OMK::InputAlias< OMK::Type::SimpleTypeT< bool > >, OMK::InputAlias< OMK::Type::SimpleTypeT< float > >, OMK::InputAlias< OMK::Type::SimpleTypeT< T > >, OMK::InputAlias< OMK::Type::SimpleTypeT< PrmType > >, OMK::InputAlias< PrmType >, OMK::InputAlias< Type >, OMK::InputAlias< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::InputAlias< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >.
Referenced by OMK::AbstractInput< Type >::connect(), and OMK::AbstractInput< Type >::connectToControlParameter().
int OMK::AbstractInput< Type >::getPrecisionLevel | ( | ) | const [inline, virtual] |
get the polation level used by this input
Definition at line 306 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::_precisionLevel.
00307 { 00308 return _precisionLevel ; 00309 }
int OMK::AbstractInput< Type >::setPrecisionLevel | ( | const int | newValue | ) | [inline, virtual] |
change the polation level of this input
newValue | the new value |
Definition at line 314 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::_precisionLevel.
00315 { 00316 int oldValue = _precisionLevel ; 00317 _precisionLevel = newValue ; 00318 return oldValue ; 00319 }
void OMK::AbstractInput< Type >::notifyAliasing | ( | InputAlias< Type > * | aliasingInputAlias | ) | [inline, virtual] |
called when this input is aliased
aliasingInputAlias | : the input alias aliasing this input |
Definition at line 324 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::_listOfAliases.
Referenced by OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >::InputAlias().
00326 { 00327 if( aliasingInputAlias != 0 ) 00328 { 00329 _listOfAliases.push_back( aliasingInputAlias ) ; 00330 } 00331 }
void OMK::AbstractInput< Type >::notifyUnaliasing | ( | InputAlias< Type > * | aliasingInputAlias | ) | [inline, virtual] |
called when this input is no longer aliased
aliasingInputAlias | : the input alias aliasing this input |
Definition at line 336 of file OMKAbstractInput.h.
References OMK::AbstractInput< Type >::_listOfAliases.
Referenced by OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >::~InputAlias().
00338 { 00339 if( aliasingInputAlias != 0 ) 00340 { 00341 _listOfAliases.push_back( aliasingInputAlias ) ; 00342 } 00343 }
std::list<InputAlias<Type> *> OMK::AbstractInput< Type >::_listOfAliases [protected] |
list of aliases of this input
Definition at line 241 of file OMKAbstractInput.h.
Referenced by OMK::AbstractInput< Type >::notifyAliasing(), OMK::AbstractInput< Type >::notifyUnaliasing(), and OMK::AbstractInput< Type >::~AbstractInput().
int OMK::AbstractInput< Type >::_precisionLevel [protected] |
precision level asked for when a value is fetched from the connected output
Definition at line 244 of file OMKAbstractInput.h.
Referenced by OMK::AbstractInput< Type >::getPrecisionLevel(), and OMK::AbstractInput< Type >::setPrecisionLevel().
bool OMK::AbstractInput< Type >::_connectable [protected] |
can simulated objects other than the owner change the connection of this input
Definition at line 247 of file OMKAbstractInput.h.
Referenced by OMK::AbstractInput< Type >::isConnectable(), and OMK::AbstractInput< Type >::setConnectable().
const EventIdentifier OMK::AbstractInput< Type >::_connectionEventId [protected] |
the connection event Identifier
Definition at line 250 of file OMKAbstractInput.h.
Referenced by OMK::AbstractInput< Type >::getConnectionEventId().
const EventIdentifier OMK::AbstractInput< Type >::_connectionToControlParameterEventId [protected] |
the connection event Identifier
Definition at line 253 of file OMKAbstractInput.h.
Referenced by OMK::AbstractInput< Type >::getConnectionToControlParameterEventId().
Documentation generated on Mon Jun 9 11:46:01 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |