#include <OMKInputAlias.h>
Inheritance diagram for OMK::InputAlias< T >:
Public Member Functions | |
InputAlias (const Name &inputName, SimulatedObject &owner, AbstractInput< T > *aliasedInput, const int requestedPrecisionLevel=OMK::Type::PolatorNT::defaultPrecisionLevel) | |
Constructor. | |
virtual | ~InputAlias () |
Destructor. | |
virtual const T & | get (int deltaT=0) |
get the value of the connected output a certain date. | |
virtual int | getDistanceToExactValue () const |
get distance to exact value. | |
virtual const T & | getLastExactValue () const |
get the last exact value. | |
virtual const Date & | getDateOfLastExactValue () const |
get the date of the last exact value. | |
virtual bool | connect (const Name &objectName, const Name &outputName) |
connect the aliased input to the output of an other simulated object. | |
virtual bool | connect (SimulatedObject &object, const Name &outputName) |
connect the aliased input to the output of an other simulated object. | |
virtual bool | connect (SimulatedObject *pointerToObject, const Name &outputName) |
connect this input to the output of an other simulated object. | |
virtual bool | connect (const Name &objectName, const Name &outputName, const T &initialValue) |
connect the aliased 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 T &initialValue) |
connect the aliased 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 T &initialValue) |
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) |
connect this input to a control parameter of an other simulated object. | |
virtual bool | connectToControlParameter (SimulatedObject &object, const Name &controlParameterName) |
connect this input to the controlParameter of an other simulated object. | |
virtual bool | connectToControlParameter (SimulatedObject *pointerToObject, const Name &controlParameterName) |
connect this input to the controlParameter of an other simulated object. | |
virtual bool | connectToControlParameter (const Name &objectName, const Name &controlParameterName, const T &initialValue) |
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 T &initialValue) |
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 T &initialValue) |
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 const OutputNT * | getConnectedOutput () const |
get a pointer to output this input is connected to | |
virtual void | disconnect () |
disconnect the input from the connected output | |
virtual void | extract (std::istream &=std::cin) |
extraction from an input stream (input stream) no real semantic has yet been defined for this operation | |
virtual void | insertInStream (std::ostream &=std::cout) const |
insert in an output stream no real semantic has yet been defined for this operation | |
virtual void | printDebuggingInformation (std::ostream &err) const |
print any usefull debugging information for this input | |
virtual bool | realConnect (OutputNT *output) |
the real connecting member function | |
virtual void | inputAliasedDeleted () |
called when the aliased input is deleted | |
Protected Attributes | |
AbstractInput< T > * | _aliasedInput |
pointer to the aliases input |
an alias to an input
Definition at line 36 of file OMKInputAlias.h.
OMK::InputAlias< T >::InputAlias | ( | const Name & | inputName, | |
SimulatedObject & | owner, | |||
AbstractInput< T > * | aliasedInput, | |||
const int | requestedPrecisionLevel = OMK::Type::PolatorNT::defaultPrecisionLevel | |||
) | [inline] |
Constructor.
attributeName | the name of the input as known by it's owner | |
owner | the owner of the attribute | |
aliasedInput | the aliased input | |
requestedPrecisionLevel | the polation level asked for when the connected output is queried |
Definition at line 50 of file OMKInputAlias.h.
00054 : AbstractInput< T >( inputName, 00055 owner, 00056 aliasedInput->isConnectable(), 00057 requestedPrecisionLevel ), 00058 _aliasedInput( aliasedInput ) 00059 { 00060 if( _aliasedInput != 0 ) 00061 { 00062 _aliasedInput->notifyAliasing( this ) ; 00063 } 00064 else 00065 { 00066 OMERROR( "WARNING: InputAlias::InputAlias : aliased input is null " ) ; 00067 } 00068 }
virtual OMK::InputAlias< T >::~InputAlias | ( | ) | [inline, virtual] |
Destructor.
Definition at line 71 of file OMKInputAlias.h.
00072 { 00073 if( _aliasedInput != 0 ) 00074 { 00075 _aliasedInput->notifyUnaliasing( this ) ; 00076 } 00077 }
const T & OMK::InputAlias< T >::get | ( | int | deltaT = 0 |
) | [inline, virtual] |
get the value of the connected output a certain date.
deltaT | the time decrement use : the value return is the one the would have be produced at current date - deltaT |
Implements OMK::AbstractInput< T >.
Definition at line 259 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::get().
00260 { 00261 #ifdef _DEBUGTYPEUTIL 00262 std::cout << "InputAlias< T >::localGet calling get of _aliasedInput " 00263 << std::endl ; 00264 #endif 00265 return _aliasedInput->get( deltaT ) ; 00266 }
int OMK::InputAlias< T >::getDistanceToExactValue | ( | ) | const [inline, virtual] |
get distance to exact value.
Implements OMK::AbstractInput< T >.
Definition at line 271 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::getDistanceToExactValue().
00272 { 00273 return _aliasedInput->getDistanceToExactValue() ; 00274 }
const T & OMK::InputAlias< T >::getLastExactValue | ( | ) | const [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
Implements OMK::AbstractInput< T >.
Definition at line 309 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::getLastExactValue().
00310 { 00311 return _aliasedInput->getLastExactValue() ; 00312 }
const Date & OMK::InputAlias< T >::getDateOfLastExactValue | ( | ) | const [virtual] |
get the date of the last exact value.
Implements OMK::AbstractInput< T >.
Definition at line 317 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::getDateOfLastExactValue().
00318 { 00319 return _aliasedInput->getDateOfLastExactValue() ; 00320 }
bool OMK::InputAlias< T >::connect | ( | const Name & | objectName, | |
const Name & | outputName | |||
) | [virtual] |
connect the aliased 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::AbstractInput< T >.
Definition at line 325 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::connect().
00327 { 00328 return _aliasedInput->connect( objectName, outputName ) ; 00329 }
bool OMK::InputAlias< T >::connect | ( | SimulatedObject & | object, | |
const Name & | outputName | |||
) | [virtual] |
connect the aliased input to the output of an other simulated object.
object | the object owning outputName | |
outputName | the name of the output to be connected to |
Implements OMK::AbstractInput< T >.
Definition at line 334 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::connect().
00336 { 00337 return _aliasedInput->connect( object, outputName ) ; 00338 }
bool OMK::InputAlias< T >::connect | ( | SimulatedObject * | pointerToObject, | |
const Name & | outputName | |||
) | [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::AbstractInput< T >.
Definition at line 343 of file OMKInputAlias.h.
00345 { 00346 return AbstractInput< T >::connect( object, outputName ) ; 00347 }
bool OMK::InputAlias< T >::connect | ( | const Name & | objectName, | |
const Name & | outputName, | |||
const T & | initialValue | |||
) | [virtual] |
connect the aliased 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 |
Implements OMK::AbstractInput< T >.
Definition at line 352 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::connect().
00355 { 00356 return _aliasedInput->connect( objectName, outputName, initialValue ) ; 00357 }
bool OMK::InputAlias< T >::connect | ( | SimulatedObject & | object, | |
const Name & | outputName, | |||
const T & | initialValue | |||
) | [virtual] |
connect the aliased 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 |
Implements OMK::AbstractInput< T >.
Definition at line 362 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::connect().
00365 { 00366 return _aliasedInput->connect( object, outputName, initialValue ) ; 00367 }
bool OMK::InputAlias< T >::connect | ( | SimulatedObject * | pointerToObject, | |
const Name & | outputName, | |||
const T & | initialValue | |||
) | [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 |
Implements OMK::AbstractInput< T >.
Definition at line 372 of file OMKInputAlias.h.
00375 { 00376 return AbstractInput< T >::connect( object, outputName, initialValue ) ; 00377 }
bool OMK::InputAlias< T >::connectToControlParameter | ( | const Name & | objectName, | |
const Name & | controlParameterName | |||
) | [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 |
Implements OMK::AbstractInput< T >.
Definition at line 382 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::connectToControlParameter().
00385 { 00386 return _aliasedInput->connectToControlParameter( 00387 objectName, controlParameterName ) ; 00388 }
bool OMK::InputAlias< T >::connectToControlParameter | ( | SimulatedObject & | object, | |
const Name & | controlParameterName | |||
) | [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 |
Implements OMK::AbstractInput< T >.
Definition at line 393 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::connectToControlParameter().
00396 { 00397 return _aliasedInput->connectToControlParameter( 00398 object, controlParameterName ) ; 00399 }
bool OMK::InputAlias< T >::connectToControlParameter | ( | SimulatedObject * | pointerToObject, | |
const Name & | controlParameterName | |||
) | [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 |
Implements OMK::AbstractInput< T >.
Definition at line 404 of file OMKInputAlias.h.
00407 { 00408 return AbstractInput< T >::connectToControlParameter( 00409 object, controlParameterName ) ; 00410 }
bool OMK::InputAlias< T >::connectToControlParameter | ( | const Name & | objectName, | |
const Name & | controlParameterName, | |||
const T & | initialValue | |||
) | [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 |
Implements OMK::AbstractInput< T >.
Definition at line 415 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::connectToControlParameter().
00419 { 00420 return _aliasedInput->connectToControlParameter( 00421 objectName, controlParameterName, initialValue ) ; 00422 }
bool OMK::InputAlias< T >::connectToControlParameter | ( | SimulatedObject & | object, | |
const Name & | controlParameterName, | |||
const T & | initialValue | |||
) | [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 |
Implements OMK::AbstractInput< T >.
Definition at line 427 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::connectToControlParameter().
00431 { 00432 return _aliasedInput->connectToControlParameter( 00433 object, controlParameterName, initialValue ) ; 00434 }
bool OMK::InputAlias< T >::connectToControlParameter | ( | SimulatedObject * | pointerToObject, | |
const Name & | controlParameterName, | |||
const T & | initialValue | |||
) | [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 |
Implements OMK::AbstractInput< T >.
Definition at line 439 of file OMKInputAlias.h.
00443 { 00444 return AbstractInput< T >::connectToControlParameter( 00445 object, controlParameterName, initialValue ) ; 00446 }
const OutputNT * OMK::InputAlias< T >::getConnectedOutput | ( | ) | const [virtual] |
get a pointer to output this input is connected to
Implements OMK::AbstractInput< T >.
Definition at line 459 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::AbstractInput< Type >::getConnectedOutput().
00460 { 00461 return _aliasedInput->getConnectedOutput() ; 00462 }
void OMK::InputAlias< T >::disconnect | ( | ) | [virtual] |
disconnect the input from the connected output
Implements OMK::InputNT.
Definition at line 451 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::InputNT::disconnect().
00452 { 00453 _aliasedInput->disconnect() ; 00454 }
void OMK::InputAlias< T >::extract | ( | std::istream & | = std::cin |
) | [inline, virtual] |
extraction from an input stream (input stream) no real semantic has yet been defined for this operation
Implements OMK::KernelAttribute.
Definition at line 279 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::KernelAttribute::extract().
00280 { 00281 _aliasedInput->extract( in ) ; 00282 }
void OMK::InputAlias< T >::insertInStream | ( | std::ostream & | = std::cout |
) | const [inline, virtual] |
insert in an output stream no real semantic has yet been defined for this operation
Implements OMK::KernelAttribute.
Definition at line 287 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput, and OMK::KernelAttribute::insertInStream().
00288 { 00289 _aliasedInput->insertInStream( out ) ; 00290 }
void OMK::InputAlias< T >::printDebuggingInformation | ( | std::ostream & | err | ) | const [inline, virtual] |
print any usefull debugging information for this input
err | the output stream on which to print the debugging information |
Implements OMK::AbstractInput< T >.
Definition at line 295 of file OMKInputAlias.h.
References OMK::KernelAttribute::_owner, OMK::AbstractInput< T >::_precisionLevel, OMK::SimulatedObject::getName(), and OMMESSAGE.
00297 { 00298 OMMESSAGE( std::endl 00299 << "**********************************************************" 00300 << std::endl 00301 << "Class InputAlias" << std::endl 00302 << "Owner : " << _owner.getName() << std::endl 00303 << "polation precision level : " << _precisionLevel ) ; 00304 }
virtual bool OMK::InputAlias< T >::realConnect | ( | OutputNT * | output | ) | [inline, virtual] |
the real connecting member function
output | a pointer to the real output to connect to |
Implements OMK::InputNT.
Definition at line 231 of file OMKInputAlias.h.
00232 { 00233 return _aliasedInput->realConnect( output ) ; 00234 }
void OMK::InputAlias< T >::inputAliasedDeleted | ( | ) | [inline, virtual] |
called when the aliased input is deleted
Definition at line 251 of file OMKInputAlias.h.
References OMK::InputAlias< T >::_aliasedInput.
00252 { 00253 _aliasedInput = 0 ; 00254 }
AbstractInput< T >* OMK::InputAlias< T >::_aliasedInput [protected] |
pointer to the aliases input
Definition at line 241 of file OMKInputAlias.h.
Referenced by OMK::InputAlias< T >::connect(), OMK::InputAlias< T >::connectToControlParameter(), OMK::InputAlias< T >::disconnect(), OMK::InputAlias< T >::extract(), OMK::InputAlias< T >::get(), OMK::InputAlias< T >::getConnectedOutput(), OMK::InputAlias< T >::getDateOfLastExactValue(), OMK::InputAlias< T >::getDistanceToExactValue(), OMK::InputAlias< T >::getLastExactValue(), OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >::InputAlias(), OMK::InputAlias< T >::inputAliasedDeleted(), OMK::InputAlias< T >::insertInStream(), OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >::realConnect(), and OMK::InputAlias< OMK::Type::SimpleTypeT< Type > >::~InputAlias().
Documentation generated on Mon Jun 9 11:46:02 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |