#include <PsAbstractInput.h>
Inheritance diagram for PsAbstractInput< Type >:


Public Methods | |
| PsAbstractInput (const PsName &inputName, PsSimulatedObject &owner, bool makeConnectable, const int precisionLevel=PsPolatorNT::defaultPrecisionLevel) | |
| Constructor. | |
| virtual | ~PsAbstractInput (void) |
| Destructor. | |
| virtual bool | connect (const PsName &objectName, const PsName &outputName)=0 |
| connect this input to the output of an other simulated object. | |
| virtual bool | connect (PsSimulatedObject &object, const PsName &outputName)=0 |
| connect this input to the output of an other simulated object. | |
| virtual bool | connect (PsSimulatedObject *pointerToObject, const PsName &outputName)=0 |
| connect this input to the output of an other simulated object. | |
| virtual bool | connect (const PsName &objectName, const PsName &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 (PsSimulatedObject &object, const PsName &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 (PsSimulatedObject *pointerToObject, const PsName &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 PsName &objectName, const PsName &controlParameterName)=0 |
| connect this input to a control parameter of an other simulated object. | |
| virtual bool | connectToControlParameter (PsSimulatedObject &object, const PsName &controlParameterName)=0 |
| connect this input to the controlParameter of an other simulated object. | |
| virtual bool | connectToControlParameter (PsSimulatedObject *pointerToObject, const PsName &controlParameterName)=0 |
| connect this input to the controlParameter of an other simulated object. | |
| virtual bool | connectToControlParameter (const PsName &objectName, const PsName &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 (PsSimulatedObject &object, const PsName &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 (PsSimulatedObject *pointerToObject, const PsName &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. | |
| virtual void | setConnectable (bool nextConnectableState) |
| setConnectable. | |
| virtual const PsOutputNT * | getConnectedOutput () const=0 |
| get a pointer to output this input is connected to | |
| const PsEventIdentifier & | getConnectionEventId () const |
| get the connection event ID | |
| const PsEventIdentifier & | 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 PsDate & | getDateOfLastExactValue () const=0 |
| get the date of the last exact value. | |
| virtual void | printDebuggingInformation (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 (PsInputAlias< Type > *aliasingInputAlias) |
| called when this input is aliased | |
| virtual void | notifyUnaliasing (PsInputAlias< Type > *aliasingInputAlias) |
| called when this input is no longer aliased | |
Protected Attributes | |
| list< PsInputAlias< 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 PsEventIdentifier | _connectionEventId |
| the connection event Identifier | |
| const PsEventIdentifier | _connectionToControlParameterEventId |
| the connection event Identifier | |
Definition at line 36 of file PsAbstractInput.h.
|
||||||||||||||||||||||||
|
Constructor.
Definition at line 257 of file PsAbstractInput.h. References PsInputNT::registerMe().
00262 : PsInputNT ( owner, inputName ), 00263 _precisionLevel ( precisionLevel ), 00264 _connectable ( makeConnectable ), 00265 _connectionEventId ( PsString("newConnection ") + inputName ), 00266 _connectionToControlParameterEventId ( PsString("newConnectionToControlParameter ") + inputName ) 00267 { 00268 #ifdef _DEBUGTYPEUTIL 00269 cout << "PsAbstractInput<Type>::PsAbstractInput --> constructeur " << endl; 00270 #endif 00271 registerMe () ; |
|
||||||||||
|
Destructor.
Definition at line 276 of file PsAbstractInput.h. References PsAbstractInput< Type >::_listOfAliases, list< PsInputAlias< Type > * >::begin(), and list< PsInputAlias< Type > * >::end().
00278 {
00279 #ifdef _TYPENAMENOTIMPLICIT
00280 typename
00281 #endif
00282 list<PsInputAlias<Type> *>::iterator i;
00283 for (i=_listOfAliases.begin();i!=_listOfAliases.end();i++)
00284 {
00285 (*i)->inputAliasedDeleted();
00286 }
|
|
||||||||||||||||||||
|
connect this input to the output of an other object, and propose an initial value in case the output hasn't been initialised yet.
Implemented in PsInput< Type >, and PsInputAlias< Type >. Definition at line 389 of file PsAbstractInput.h. References PsAbstractInput< Type >::connect(), and PsAbstractInput< Type >::printDebuggingInformation().
00393 {
00394 if ( pointerToObject != NULL )
00395 {
00396 return connect (*pointerToObject, outputName, initialValue) ;
00397 }
00398 else
00399 {
00400 cerr<<"PsAbstractInput<Type>::connect : got NULL pointer"<<endl;
00401 printDebuggingInformation ( cerr ) ;
00402 return false ;
00403 }
|
|
||||||||||||||||||||
|
connect this input to the output of an other object, and propose an initial value in case the output hasn't been initialised yet.
Implemented in PsInput< Type >, and PsInputAlias< Type >. |
|
||||||||||||||||||||
|
connect this input to the output of an other object, and propose an initial value in case the output hasn't been initialised yet.
Implemented in PsInput< Type >, and PsInputAlias< Type >. |
|
||||||||||||||||
|
connect this input to the output of an other simulated object.
Implements PsInputNT. Implemented in PsInput< Type >, and PsInputAlias< Type >. Definition at line 371 of file PsAbstractInput.h. References PsAbstractInput< Type >::connect(), and PsAbstractInput< Type >::printDebuggingInformation().
00374 {
00375 if ( pointerToObject != NULL )
00376 {
00377 return connect (*pointerToObject, outputName) ;
00378 }
00379 else
00380 {
00381 cerr<<"PsAbstractInput<Type>::connect : got NULL pointer"<<endl;
00382 printDebuggingInformation ( cerr ) ;
00383 return false ;
00384 }
|
|
||||||||||||||||
|
connect this input to the output of an other simulated object.
Implements PsInputNT. Implemented in PsInput< Type >, and PsInputAlias< Type >. |
|
||||||||||||||||
|
connect this input to the output of an other simulated object.
Implements PsInputNT. Implemented in PsInput< Type >, and PsInputAlias< Type >. Referenced by PsInputAlias< Type >::connect(), PsInput< Type >::connect(), and PsAbstractInput< Type >::connect(). |
|
||||||||||||||||||||
|
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.
Implemented in PsInput< Type >, and PsInputAlias< Type >. Definition at line 426 of file PsAbstractInput.h. References PsAbstractInput< Type >::connectToControlParameter(), and PsAbstractInput< Type >::printDebuggingInformation().
00430 {
00431 if ( pointerToObject != NULL )
00432 {
00433 return connectToControlParameter (*pointerToObject, outputName, initialValue) ;
00434 }
00435 else
00436 {
00437 cerr<<"PsAbstractInput<Type>::connect : got NULL pointer"<<endl;
00438 printDebuggingInformation ( cerr ) ;
00439 return false ;
00440 }
|
|
||||||||||||||||||||
|
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.
Implemented in PsInput< Type >, and PsInputAlias< Type >. |
|
||||||||||||||||||||
|
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.
Implemented in PsInput< Type >, and PsInputAlias< Type >. |
|
||||||||||||||||
|
connect this input to the controlParameter of an other simulated object.
Implemented in PsInput< Type >, and PsInputAlias< Type >. Definition at line 408 of file PsAbstractInput.h. References PsAbstractInput< Type >::connectToControlParameter(), and PsAbstractInput< Type >::printDebuggingInformation().
00411 {
00412 if ( pointerToObject != NULL )
00413 {
00414 return connectToControlParameter (*pointerToObject, outputName) ;
00415 }
00416 else
00417 {
00418 cerr<<"PsAbstractInput<Type>::connect : got NULL pointer"<<endl;
00419 printDebuggingInformation ( cerr ) ;
00420 return false ;
00421 }
|
|
||||||||||||||||
|
connect this input to the controlParameter of an other simulated object.
Implemented in PsInput< Type >, and PsInputAlias< Type >. |
|
||||||||||||||||
|
connect this input to a control parameter of an other simulated object.
Implemented in PsInput< Type >, and PsInputAlias< Type >. Referenced by PsInputAlias< Type >::connectToControlParameter(), PsInput< Type >::connectToControlParameter(), and PsAbstractInput< Type >::connectToControlParameter(). |
|
||||||||||
|
get a value from this input
Implemented in PsInput< Type >, and PsInputAlias< Type >. |
|
|||||||||
|
get a pointer to output this input is connected to
Implements PsInputNT. Implemented in PsInput< Type >, and PsInputAlias< Type >. |
|
|||||||||
|
get the connection event ID
Definition at line 357 of file PsAbstractInput.h. References PsAbstractInput< Type >::_connectionEventId. Referenced by PsInput< Type >::realConnect().
00359 {
00360 return _connectionEventId ;
|
|
|||||||||
|
get the connection event ID, when the connection request comes from a control parameter
Definition at line 364 of file PsAbstractInput.h. References PsAbstractInput< Type >::_connectionToControlParameterEventId. Referenced by PsInput< Type >::realConnect().
00366 {
00367 return _connectionToControlParameterEventId ;
|
|
|||||||||
|
get the date of the last exact value.
Implemented in PsInput< Type >, and PsInputAlias< Type >. |
|
|||||||||
|
get distance to exact value.
Implemented in PsInput< Type >, and PsInputAlias< Type >. |
|
|||||||||
|
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 PsInput< Type >, and PsInputAlias< Type >. |
|
|||||||||
|
get the polation level used by this input
Definition at line 291 of file PsAbstractInput.h. References PsAbstractInput< Type >::_precisionLevel.
00293 {
00294 return _precisionLevel ;
|
|
|||||||||
|
isConnectable. find out if this input accepts connection requests from other simulated objects Definition at line 329 of file PsAbstractInput.h. References PsAbstractInput< Type >::_connectable. Referenced by PsInputAlias< Type >::PsInputAlias(), and PsInput< Type >::realConnect().
00331 {
00332 return _connectable ;
|
|
||||||||||
|
called when this input is aliased
Definition at line 307 of file PsAbstractInput.h. References PsAbstractInput< Type >::_listOfAliases, and list< PsInputAlias< Type > * >::push_back().
00309 {
00310 if ( aliasingInputAlias != NULL )
00311 {
00312 _listOfAliases.push_back( aliasingInputAlias );
00313 }
|
|
||||||||||
|
called when this input is no longer aliased
Definition at line 318 of file PsAbstractInput.h. References PsAbstractInput< Type >::_listOfAliases, and list< PsInputAlias< Type > * >::push_back().
00320 {
00321 if ( aliasingInputAlias != NULL )
00322 {
00323 _listOfAliases.push_back( aliasingInputAlias );
00324 }
|
|
||||||||||
|
print any usefull debugging information for this input
Implements PsAttribute. Implemented in PsInput< Type >, and PsInputAlias< Type >. Referenced by PsAbstractInput< Type >::connect(), and PsAbstractInput< Type >::connectToControlParameter(). |
|
||||||||||
|
setConnectable.
Definition at line 337 of file PsAbstractInput.h. References PsAbstractInput< Type >::_connectable, PsAttribute::_owner, PsSimulatedObject::getController(), PsnCurrentActiveObject::getCurrentActiveObject(), PsAttribute::getName(), and PsSimulatedObject::getName().
00339 {
00340 if ( PsnCurrentActiveObject::getCurrentActiveObject() == & _owner ||
00341 PsnCurrentActiveObject::getCurrentActiveObject() == & _owner.getController() ||
00342 PsnCurrentActiveObject::getCurrentActiveObject() == NULL )
00343 {
00344 _connectable = newConnectableState ;
00345 }
00346 else
00347 {
00348 cerr<<"Warning: "
00349 <<_owner.getName()
00350 <<"::"
00351 <<getName()
00352 <<"only the owner can change the the connectable state of an input"<<endl;
00353 }
|
|
||||||||||
|
change the polation level of this input
Definition at line 299 of file PsAbstractInput.h. References PsAbstractInput< Type >::_precisionLevel.
00301 {
00302 int oldValue = _precisionLevel ;
00303 _precisionLevel = newValue ;
00304 return oldValue ;
|
|
|||||
|
can simulated objects other than the owner change the connection of this input
Definition at line 241 of file PsAbstractInput.h. Referenced by PsAbstractInput< Type >::isConnectable(), and PsAbstractInput< Type >::setConnectable(). |
|
|||||
|
the connection event Identifier
Definition at line 244 of file PsAbstractInput.h. Referenced by PsAbstractInput< Type >::getConnectionEventId(). |
|
|||||
|
the connection event Identifier
Definition at line 247 of file PsAbstractInput.h. Referenced by PsAbstractInput< Type >::getConnectionToControlParameterEventId(). |
|
|||||
|
list of aliases of this input
Definition at line 235 of file PsAbstractInput.h. Referenced by PsAbstractInput< Type >::notifyAliasing(), PsAbstractInput< Type >::notifyUnaliasing(), PsSensitiveInputAlias< Type >::signalChange(), PsSensitiveInput< Type >::signalChange(), and PsAbstractInput< Type >::~PsAbstractInput(). |
|
|||||
|
precision level asked for when a value is fetched from the connected output
Definition at line 238 of file PsAbstractInput.h. Referenced by PsInput< Type >::get(), PsAbstractInput< Type >::getPrecisionLevel(), PsInputAlias< Type >::printDebuggingInformation(), PsInput< Type >::printDebuggingInformation(), and PsAbstractInput< Type >::setPrecisionLevel(). |
| Documentation generated on Mon Nov 25 15:25:52 2002 |
Generated with doxygen 1.2.12 by Dimitri van Heesch , 1997-2001 |