#include <PsNullOutputCreator.h>
Collaboration diagram for PsNullOutputCreator:

Static Public Methods | |
| void | setController (PsController *) |
| template<typename Type> PsOutput< Type > * | getNullOutput () |
Static Protected Methods | |
| PsController & | getController () |
| PsSimulatedObject & | getSimulatedObject () |
Static Protected Attributes | |
| PsController * | _theController = 0 |
| PsSimulatedObject * | _theEmptyObject = 0 |
| map< const char *, PsOutputNT * > | _theNullOutputs |
|
|
Definition at line 35 of file PsNullOutputCreator.cxx. References _theController. Referenced by getSimulatedObject().
00036 {
00037 assert ( _theController != 0 ) ;
00038 return *_theController ;
00039 }
|
|
|||||||||
|
Definition at line 44 of file PsNullOutputCreator.h. References _theNullOutputs, map< const char *, PsOutputNT * >::end(), map< const char *, PsOutputNT * >::find(), pair< iterator, bool >::first, getSimulatedObject(), and map< const char *, PsOutputNT * >::insert().
00046 {
00047 PsOutput<Type> * result ;
00048 map <const char *, PsOutputNT *>::iterator i = _theNullOutputs.find ( typeid(Type).name() ) ;
00049 if ( i == _theNullOutputs.end() )
00050 {
00051 result = new PsNullOutput<Type>( PsNullOutputCreator::getSimulatedObject() ) ;
00052 i = _theNullOutputs.insert(map <const char *, PsOutputNT *>::value_type (typeid(Type).name(),
00053 result ) ).first ;
00054 }
00055 else
00056 {
00057 result = dynamic_cast <PsNullOutput<Type> *> (i->second) ;
00058 assert ( result != NULL );
00059 }
00060 return result ;
|
|
|
Definition at line 41 of file PsNullOutputCreator.cxx. References _theEmptyObject, and getController(). Referenced by getNullOutput().
00042 {
00043 static const PsObjectDescriptor emptyObjectDescriptor("NullObject",
00044 "BaseSimulatedObject",
00045 "NoProcess",
00046 0,
00047 NULL) ;
00048 if ( _theEmptyObject == 0 )
00049 {
00050 _theEmptyObject = new PsSimulatedObject (getController(), emptyObjectDescriptor ) ;
00051 }
00052 return *_theEmptyObject ;
00053 }
|
|
|
Definition at line 27 of file PsNullOutputCreator.cxx. References _theController. Referenced by PsController::PsController().
00028 {
00029 if ( _theController == 0 )
00030 {
00031 _theController = ctrl ;
00032 }
00033 }
|
|
|
Definition at line 23 of file PsNullOutputCreator.cxx. Referenced by getController(), and setController(). |
|
|
Definition at line 24 of file PsNullOutputCreator.cxx. Referenced by getSimulatedObject(). |
|
|
Definition at line 25 of file PsNullOutputCreator.cxx. Referenced by getNullOutput(). |
| Documentation generated on Mon Nov 25 15:26:16 2002 |
Generated with doxygen 1.2.12 by Dimitri van Heesch , 1997-2001 |