OMK::OutputNT Class Reference

abstract definition of an output. More...

#include <OMKOutputNT.h>

Inheritance diagram for OMK::OutputNT:

Inheritance graph
[legend]
Collaboration diagram for OMK::OutputNT:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OutputNT (SimulatedObject &owner, const Name &outputName)
 Constructeur.
virtual ~OutputNT ()
 Destructor.
virtual void connectedMyself (InputNT *)=0
 used by an input to notify is has connected itself
virtual void disconnectedMyself (InputNT *)=0
 used by an input to notify is has disconnected itself
virtual bool connect (const Name &objectName, const Name &inputName)
 connect the output to a public input of another object
virtual bool connect (SimulatedObject &object, const Name &inputName)
 connect the output to a public input of another object
virtual bool connect (SimulatedObject *pointerToObject, const Name &inputName)
 connect the output to a public input of another object
virtual void packAllValues (OutgoingSynchronisationMessage &out) const=0
 pack in a message for an original message
virtual void unpackAllValues (IncomingSynchronisationMessage &out)=0
 unpack from a complete message

Detailed Description

abstract definition of an output.

Author:
Thierry Duval (version 1.0 by Siames, last revision by $author$)
Version:
2.3 (revision $revision$)

Definition at line 36 of file OMKOutputNT.h.


Constructor & Destructor Documentation

OutputNT::OutputNT ( SimulatedObject owner,
const Name outputName 
)

Constructeur.

Parameters:
owner the owner of this output
outputName the name of the output as known by the owner

Definition at line 26 of file OMKOutputNT.cpp.

00027   : KernelAttribute( owner, outputName )
00028 {
00029 }

OutputNT::~OutputNT (  )  [virtual]

Destructor.

Definition at line 33 of file OMKOutputNT.cpp.

00034 {
00035 }


Member Function Documentation

virtual void OMK::OutputNT::connectedMyself ( InputNT  )  [pure virtual]

used by an input to notify is has connected itself

Implemented in OMK::Output< T >, OMK::Output< ModelType >, OMK::Output< OMK::Type::SimpleTypeT< bool > >, OMK::Output< OMK::Type::SimpleTypeT< float > >, OMK::Output< OMK::Type::SimpleTypeT< T > >, OMK::Output< OMK::Type::SimpleTypeT< PrmType > >, OMK::Output< PrmType >, OMK::Output< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Output< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::Output< OMK::Type::SimpleTypeT< Type > >.

virtual void OMK::OutputNT::disconnectedMyself ( InputNT  )  [pure virtual]

used by an input to notify is has disconnected itself

Implemented in OMK::Output< T >, OMK::Output< ModelType >, OMK::Output< OMK::Type::SimpleTypeT< bool > >, OMK::Output< OMK::Type::SimpleTypeT< float > >, OMK::Output< OMK::Type::SimpleTypeT< T > >, OMK::Output< OMK::Type::SimpleTypeT< PrmType > >, OMK::Output< PrmType >, OMK::Output< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Output< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::Output< OMK::Type::SimpleTypeT< Type > >.

bool OutputNT::connect ( const Name objectName,
const Name inputName 
) [virtual]

connect the output to a public input of another object

Parameters:
objectName the object owning inputName
inputName the name of the input to be connected to
Returns:
bool connecting successfull

Definition at line 39 of file OMKOutputNT.cpp.

References OMK::KernelAttribute::_owner, OMK::debugMsg(), OMK::SimulatedObject::getController(), OMK::KernelAttribute::getName(), OMK::Controller::getPointerToSimulatedObjectNamed(), OMK_DEBUG_OMK_EXEC, and OMTRACEID.

Referenced by connect().

00040 {
00041   SimulatedObject * object =
00042     _owner.getController().getPointerToSimulatedObjectNamed( objectName ) ;
00043   if( object != 0 )
00044   {
00045     return connect( *object, inputName ) ;
00046   }
00047   else 
00048   {
00049     OMTRACEID( OMK_DEBUG_OMK_EXEC,
00050                "For output \"" << getName() << "\" of "
00051                << OMK::debugMsg( &_owner ) << std::endl
00052                << "OutputNT::unable to connect because object \""
00053                << objectName << "\" cannot be found" ) ;
00054     return false ;
00055   }
00056 }

bool OutputNT::connect ( SimulatedObject object,
const Name inputName 
) [virtual]

connect the output to a public input of another object

Parameters:
objectthe object owning inputName
inputName the name of the input to be connected to
Returns:
bool connecting successfull

Definition at line 60 of file OMKOutputNT.cpp.

References OMK::KernelAttribute::_owner, OMK::debugMsg(), OMK::SimulatedObject::getName(), OMK::KernelAttribute::getName(), OMK::SimulatedObject::getPointerToInputNamed(), OMK_DEBUG_OMK_EXEC, OMTRACEID, and OMK::InputNT::realConnect().

00061 {
00062   InputNT * input = object.getPointerToInputNamed( inputName ) ;
00063   if( input != 0 )
00064   {
00065     return input->realConnect( this ) ;
00066   }
00067   else
00068   {
00069     OMTRACEID( OMK_DEBUG_OMK_EXEC,
00070                "For output \"" << getName() << "\" of "
00071                << OMK::debugMsg( &_owner ) << std::endl
00072                << "OutputNT::unable to connect because input \""
00073                << inputName << "\" of object \"" << object.getName()
00074                << "\" doesn't exist" ) ;
00075     return false ;
00076   }
00077 }

bool OutputNT::connect ( SimulatedObject pointerToObject,
const Name inputName 
) [virtual]

connect the output to a public input of another object

Parameters:
pointerToObject the object owning inputName
inputName the name of the input to be connected to
Returns:
bool connecting successfull

Definition at line 81 of file OMKOutputNT.cpp.

References OMK::KernelAttribute::_owner, connect(), OMK::debugMsg(), OMK::KernelAttribute::getName(), OMK_DEBUG_OMK_EXEC, and OMTRACEID.

00083 {
00084   if( pointerToObject != 0 )
00085   {
00086     return connect( *pointerToObject, inputName ) ;
00087   }
00088   else
00089   {
00090     OMTRACEID( OMK_DEBUG_OMK_EXEC,
00091                "For output \"" << getName() << "\" of "
00092                << OMK::debugMsg( &_owner ) << std::endl
00093                <<"OutputNT::unable to connect because the pointer to the owner of the input is nil" ) ;
00094     return false ;
00095   }
00096 }

virtual void OMK::OutputNT::packAllValues ( OutgoingSynchronisationMessage out  )  const [pure virtual]

pack in a message for an original message

Implemented in OMK::Output< T >, OMK::Output< ModelType >, OMK::Output< OMK::Type::SimpleTypeT< bool > >, OMK::Output< OMK::Type::SimpleTypeT< float > >, OMK::Output< OMK::Type::SimpleTypeT< T > >, OMK::Output< OMK::Type::SimpleTypeT< PrmType > >, OMK::Output< PrmType >, OMK::Output< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Output< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::Output< OMK::Type::SimpleTypeT< Type > >.

virtual void OMK::OutputNT::unpackAllValues ( IncomingSynchronisationMessage out  )  [pure virtual]

unpack from a complete message

Implemented in OMK::Output< T >, OMK::Output< ModelType >, OMK::Output< OMK::Type::SimpleTypeT< bool > >, OMK::Output< OMK::Type::SimpleTypeT< float > >, OMK::Output< OMK::Type::SimpleTypeT< T > >, OMK::Output< OMK::Type::SimpleTypeT< PrmType > >, OMK::Output< PrmType >, OMK::Output< OMK::Type::SimpleTypeT< OMK::Type::Transform > >, OMK::Output< OMK::Type::SimpleTypeT< HBT::PostureData > >, and OMK::Output< OMK::Type::SimpleTypeT< Type > >.


logo OpenMask

Documentation generated on Mon Jun 9 11:46:02 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007