#include <OMKVisBase.h>
Inheritance diagram for OMK::Vis::VisBase:
Event ids and types declaration. | |
static EventIdentifier | ADD_VISUAL_OBJECT_EVENT_ID |
static EventIdentifier | DELETE_VISUAL_OBJECT_EVENT_ID |
static EventIdentifier | ADD_ANIMATOR_EVENT_ID |
static EventIdentifier | DELETE_ANIMATOR_EVENT_ID |
typedef std::pair< Name, Name > | DeleteAnimatorPrm |
DECLARE_EVENT_LISTENER (OMK::Type::AddVisualObjectPrm, AddVisualObject, VisBase) | |
DECLARE_EVENT_LISTENER (Name, DeleteVisualObject, VisBase) | |
DECLARE_EVENT_LISTENER (OMK::Type::AddAnimatorPrm, AddAnimator, VisBase) | |
DECLARE_TYPE_EVENT_LISTENER (DeleteAnimatorPrm, DeleteAnimator, VisBase) | |
Public Member Functions | |
template<typename T> | |
Input< T > * | createInput (const Name &object, const Name &output) |
Creates a new input and returns it. | |
void | registerEventPlug (const EventIdentifier &eventId, const std::string &emitter, OMK::Vis::IAnimatorEventPlug *plug) |
Register a pair of event identifier and its plug. | |
void | removeEventPlug (const EventIdentifier &eventId, OMK::Vis::IAnimatorEventPlug *plug) |
Remove the event plug of the list. | |
OMK::Vis::VisualObject * | getVisualObject (const Name &id) const |
Returns the visual object named namespace. | |
Inherited methods | |
virtual bool | processEvent (Event *e) |
Processing the events. | |
virtual void | init () |
Init method inherited from SimulatedObject useful for Signal. | |
virtual void | finish () |
Init method inherited from SimulatedObject useful for destruction. | |
virtual void | computeParameters () |
Compute the new picture to display. | |
Private Types | |
typedef std::map< Name, std::vector< OMK::Type::AddAnimatorPrm > > | AnimatorsToCreateMap |
typedef std::map< Name, OMK::Vis::VisualObject * > | VisualObjectMap |
typedef std::list< OMK::Vis::IAnimatorEventPlug * > | EventPlugList |
typedef std::map< EventIdentifier, EventPlugList > | EventPlugMap |
Private Member Functions | |
bool | processAddVisualObjectEvent (AddVisualObjectEvent *e) |
bool | processDeleteVisualObjectEvent (DeleteVisualObjectEvent *e) |
bool | processAddAnimatorEvent (AddAnimatorEvent *e) |
bool | processDeleteAnimatorEvent (DeleteAnimatorEvent *e) |
void | addNewVisualObject (OMK::Vis::VisualObject *visualObject) |
void | deleteVisualObject (const Name &id) |
Private Attributes | |
VisualObjectMap | _visualObjects |
Visual objects list. | |
EventPlugMap | _eventIdAndPlug |
Event identifier and plug which get the value of the event for its animator. | |
AnimatorsToCreateMap | _animatorsToCreate |
Definition at line 48 of file OMKVisBase.h.
typedef std::pair< Name, Name > OMK::Vis::VisBase::DeleteAnimatorPrm |
Definition at line 95 of file OMKVisBase.h.
typedef std::map< Name, std::vector< OMK::Type::AddAnimatorPrm > > OMK::Vis::VisBase::AnimatorsToCreateMap [private] |
Definition at line 140 of file OMKVisBase.h.
typedef std::map< Name, OMK::Vis::VisualObject* > OMK::Vis::VisBase::VisualObjectMap [private] |
Definition at line 141 of file OMKVisBase.h.
typedef std::list< OMK::Vis::IAnimatorEventPlug* > OMK::Vis::VisBase::EventPlugList [private] |
Definition at line 142 of file OMKVisBase.h.
typedef std::map< EventIdentifier, EventPlugList > OMK::Vis::VisBase::EventPlugMap [private] |
Definition at line 143 of file OMKVisBase.h.
VisBase::~VisBase | ( | ) | [virtual] |
VisBase::VisBase | ( | Controller & | ctrl, | |
const ObjectDescriptor & | objectDescriptor | |||
) | [protected] |
Protected default constructor of VisBase call by creator.
Definition at line 44 of file OMKVisBase.cpp.
00045 : ExtensibleSimulatedObject( ctrl, objectDescriptor ) 00046 { 00047 new VisObjectExtension( this, "visualOjectLoader" ) ; 00048 new VisServiceExtension(this, "VisServiceExtension" ) ; 00049 }
VisBase::~VisBase | ( | ) | [virtual] |
VisBase::VisBase | ( | Controller & | ctrl, | |
const ObjectDescriptor & | objectDescriptor | |||
) | [protected] |
Protected default constructor of VisBase call by creator.
Definition at line 44 of file OMKVisBase.cpp.
00045 : ExtensibleSimulatedObject( ctrl, objectDescriptor ) 00046 { 00047 new VisObjectExtension( this, "visualOjectLoader" ) ; 00048 new VisServiceExtension(this, "VisServiceExtension" ) ; 00049 }
Processing the events.
Dispatch the events according to the registered event identifiers and their associated plug.
Reimplemented from OMK::SimulatedObject.
Definition at line 94 of file OMKVisBase.cpp.
References _eventIdAndPlug, OMK::Event::eventId, OMK::Name::getString(), OMK_DEBUG_VIS_EXEC, OMTRACEID, and OMK::SimulatedObject::processEvent().
00095 { 00096 OMTRACEID( OMK_DEBUG_VIS_EXEC, ">>> eventId to process \"" << e->eventId.getString()<< "\"" << std::endl ) ; 00097 // Return value 00098 bool ok = false ; 00099 00100 // Scan all the registered events to find the good ones 00101 EventPlugMap::iterator eventPlugs =_eventIdAndPlug.find( e->eventId ) ; 00102 if( eventPlugs != _eventIdAndPlug.end() ) 00103 { 00104 for( EventPlugList::iterator i = eventPlugs->second.begin() ; 00105 i != eventPlugs->second.end() ; 00106 ++i ) 00107 { 00108 ok = true ; 00109 (*i)->setEvent( e ) ; 00110 } 00111 } 00112 OMTRACEID( OMK_DEBUG_VIS_EXEC, ">>> :-| End " << ( ok ? "ok" : "not ok => default processing" ) << std::endl ) ; 00113 return ok || SimulatedObject::processEvent( e ) ; 00114 }
void VisBase::init | ( | ) | [virtual] |
Init method inherited from SimulatedObject useful for Signal.
Reimplemented from OMK::ExtensibleSimulatedObject.
Definition at line 79 of file OMKVisBase.cpp.
References ADD_ANIMATOR_EVENT_ID, ADD_VISUAL_OBJECT_EVENT_ID, DELETE_ANIMATOR_EVENT_ID, DELETE_VISUAL_OBJECT_EVENT_ID, OMK::ExtensibleSimulatedObject::init(), processAddAnimatorEvent(), processAddVisualObjectEvent(), processDeleteAnimatorEvent(), processDeleteVisualObjectEvent(), and OMK::SimulatedObject::registerForSignal().
00080 { 00081 ExtensibleSimulatedObject::init (); 00082 new AddVisualObjectEventListener( *this, &VisBase::processAddVisualObjectEvent, ADD_VISUAL_OBJECT_EVENT_ID ) ; 00083 new DeleteVisualObjectEventListener( *this, &VisBase::processDeleteVisualObjectEvent, DELETE_VISUAL_OBJECT_EVENT_ID ) ; 00084 new AddAnimatorEventListener( *this, &VisBase::processAddAnimatorEvent, ADD_ANIMATOR_EVENT_ID ) ; 00085 new DeleteAnimatorEventListener( *this, &VisBase::processDeleteAnimatorEvent, DELETE_ANIMATOR_EVENT_ID ) ; 00086 registerForSignal ( ADD_VISUAL_OBJECT_EVENT_ID ); 00087 registerForSignal ( DELETE_VISUAL_OBJECT_EVENT_ID ); 00088 registerForSignal ( ADD_ANIMATOR_EVENT_ID ); 00089 registerForSignal ( DELETE_ANIMATOR_EVENT_ID ); 00090 }
void VisBase::finish | ( | ) | [virtual] |
Init method inherited from SimulatedObject useful for destruction.
Reimplemented from OMK::ExtensibleSimulatedObject.
Definition at line 62 of file OMKVisBase.cpp.
References _visualObjects, ADD_ANIMATOR_EVENT_ID, ADD_VISUAL_OBJECT_EVENT_ID, OMK::SimulatedObject::cancelRegistrationForSignal(), OMK::ExtensibleSimulatedObject::finish(), OMK::SimulatedObject::getName(), OMK_DEBUG_VIS_EXEC, and OMTRACEID.
00063 { 00064 cancelRegistrationForSignal ( ADD_VISUAL_OBJECT_EVENT_ID ); 00065 cancelRegistrationForSignal ( ADD_ANIMATOR_EVENT_ID ); 00066 00067 OMTRACEID( OMK_DEBUG_VIS_EXEC, " Destruction " << getName().getCString() ); 00068 for ( VisualObjectMap::iterator i = _visualObjects.begin() ; 00069 i != _visualObjects.end() ; 00070 i++ ) 00071 { 00072 delete i->second ; 00073 } 00074 ExtensibleSimulatedObject::finish(); 00075 }
void VisBase::computeParameters | ( | ) | [virtual] |
Compute the new picture to display.
This method loops in the list of visual objects to ask to them to update their display.
Reimplemented from OMK::ExtensibleSimulatedObject.
Reimplemented in OMK::Vis::OgreVis.
Definition at line 366 of file OMKVisBase.cpp.
References _visualObjects.
Referenced by OMK::Vis::OgreVis::computeParameters().
00367 { 00368 for ( VisualObjectMap::iterator i = _visualObjects.begin() ; 00369 i != _visualObjects.end() ; 00370 ++i ) 00371 { 00372 i->second->update() ; 00373 } 00374 }
OMK::Vis::VisBase::DECLARE_EVENT_LISTENER | ( | OMK::Type::AddVisualObjectPrm | , | |
AddVisualObject | , | |||
VisBase | ||||
) |
OMK::Vis::VisBase::DECLARE_EVENT_LISTENER | ( | OMK::Type::AddAnimatorPrm | , | |
AddAnimator | , | |||
VisBase | ||||
) |
OMK::Vis::VisBase::DECLARE_TYPE_EVENT_LISTENER | ( | DeleteAnimatorPrm | , | |
DeleteAnimator | , | |||
VisBase | ||||
) |
Input< T > * OMK::Vis::VisBase::createInput | ( | const Name & | object, | |
const Name & | output | |||
) | [inline] |
Creates a new input and returns it.
Used by VisualObject to create a animator plugged on an output
Definition at line 157 of file OMKVisBase.h.
References OMK::Name::getCString(), OMK::SimulatedObject::getName(), OMK::SimulatedObject::getObjectDescriptor(), OMK_DEBUG_VIS, and OMTRACEID.
00158 { 00159 // Create a name for the input 00160 // :-( must use a temporary string because + operator doesn't work 00161 Name inputName( std::string( object.getCString() ) + output.getCString() ) ; 00162 // add an input, if it already defined => will display an error message and 00163 // returns the previous input 00164 Input< T >* input = &addInput< T >( inputName ) ; 00165 // connection to the output 00166 if( !input || !input->connect( object, output ) ) 00167 { // unable to connect => display a message 00168 OMTRACEID( OMK_DEBUG_VIS, "Error in VisBase::createInput() " 00169 << "for object \"" << getName().getCString() << "\" (class " 00170 << getObjectDescriptor().getClass().getCString() << ")" << std::endl 00171 << ">>> :-( Invalid connection parameters, unable to connect to the output \"" 00172 << output.getCString() << "\" of the object \"" << object.getCString() 00173 << "\"." ) ; 00174 input = 0 ; // will return null pointer if the input cannot be connected 00175 } 00176 // returns the result 00177 return input ; 00178 }
void VisBase::registerEventPlug | ( | const EventIdentifier & | eventId, | |
const std::string & | emitter, | |||
OMK::Vis::IAnimatorEventPlug * | plug | |||
) |
Register a pair of event identifier and its plug.
Used by AnimatorT to create a animator plugged on an event
[in] | eventId | the id (name) of the listened event |
[in] | emitter | the id (name) of the listened object |
[in] | plug | the plug which listen the event If the emitter is a valid simulated object, the visualisation listens only this emitter. If the emitter is not found the visualisation listen event coming from anywhere. Needed by visualisation to know which plug must receive an event |
Definition at line 285 of file OMKVisBase.cpp.
References OMK::SimulatedObject::_controller, _eventIdAndPlug, OMK::Controller::getPointerToSimulatedObjectNamed(), OMASSERT, OMK::SimulatedObject::registerForSignal(), and OMK::SimulatedObject::registerForSignalBy().
Referenced by OMK::Vis::Animator::Animator(), and OMK::Vis::AnimatorT< T >::AnimatorT().
00288 { 00289 // Find the list 00290 EventPlugMap::iterator eventPlugs =_eventIdAndPlug.find( eventId ) ; 00291 if( eventPlugs == _eventIdAndPlug.end() ) 00292 { 00293 _eventIdAndPlug[ eventId ] = EventPlugList() ; 00294 } 00295 eventPlugs =_eventIdAndPlug.find( eventId ) ; 00296 OMASSERT( eventPlugs != _eventIdAndPlug.end() ) ; 00297 // Register the plug associated to the event in the list 00298 eventPlugs->second.push_back( plug ) ; 00299 // Register the visualisation as a listener 00300 SimulatedObject* emitterPtr = _controller.getPointerToSimulatedObjectNamed ( emitter ); 00301 if( emitterPtr ) 00302 { // The emitter exists => register for the signal form this emitter 00303 registerForSignalBy( eventId, emitterPtr, eventId ) ; 00304 } 00305 else 00306 { // The emitter doesn't exist => register for the signal from any objectDescriptor 00307 registerForSignal( eventId ) ; 00308 } 00309 }
void VisBase::removeEventPlug | ( | const EventIdentifier & | eventId, | |
OMK::Vis::IAnimatorEventPlug * | plug | |||
) |
Remove the event plug of the list.
[in] | eventId | the id of the plug event. |
[in] | plug | the plug to remove. |
Definition at line 314 of file OMKVisBase.cpp.
References _eventIdAndPlug, and OMERROR.
Referenced by OMK::Vis::IAnimatorEventPlug::~IAnimatorEventPlug().
00315 { 00316 // Find the list 00317 EventPlugMap::iterator eventPlugs =_eventIdAndPlug.find( eventId ) ; 00318 if( eventPlugs != _eventIdAndPlug.end() ) 00319 { 00320 _eventIdAndPlug[ eventId ].remove( plug ) ; 00321 } 00322 else 00323 { 00324 OMERROR( ">>> :-( The event id \"" << eventId << "\" is not present => cannot delete the plug " << plug ) ; 00325 } 00326 }
VisualObject * VisBase::getVisualObject | ( | const Name & | id | ) | const |
Returns the visual object named namespace.
[in] | id | the id (name) of the searched object. if none object with this name is in the list will return 0 if more than one object is named name in the list will return the first one |
Definition at line 356 of file OMKVisBase.cpp.
References _visualObjects.
Referenced by processAddAnimatorEvent(), and processAddVisualObjectEvent().
00357 { 00358 VisualObjectMap::const_iterator i = _visualObjects.find( id ) ; 00359 return i != _visualObjects.end() ? i->second : 0 ; 00360 }
bool VisBase::processAddVisualObjectEvent | ( | AddVisualObjectEvent * | e | ) | [private] |
Definition at line 119 of file OMKVisBase.cpp.
References _animatorsToCreate, _visualObjects, ADD_ANIMATOR_EVENT_ID, ADD_VISUAL_OBJECT_EVENT_ID, addNewVisualObject(), OMK::SimulatedObject::fireValuedSignal(), OMK::Vis::VisualObject::getId(), OMK::SimulatedObject::getName(), OMK::ConfigurationParameterDescriptor::getNumberOfSubItems(), OMK::SimulatedObject::getObjectDescriptor(), getVisualObject(), OMK::Vis::VisObjectExtension::loadAnimatorParameters(), OMASSERTM, OMK_DEBUG_VIS_EXEC, OMMESSAGE, OMTRACE, OMTRACEID, and OMK::SimulatedObject::sendValuedEvent().
Referenced by init().
00120 { 00121 OMASSERTM( event->eventId == ADD_VISUAL_OBJECT_EVENT_ID, "Not the good event" ) ; 00122 std::string errorMsg ; 00123 // Get the visual object 00124 VisualObject* visualObject = 0 ; 00125 // return value 00126 bool ok = false ; 00127 OMTRACEID( OMK_DEBUG_VIS_EXEC, " Event value: " << event->value ); 00128 visualObject = getVisualObject( event->value.getObjectName() ); 00129 if ( visualObject ) 00130 { 00131 OMMESSAGE (" VisualObject already exists : " 00132 << visualObject->getId() << " send by " << event->sender 00133 << " Event " << *event); 00134 } 00135 else 00136 visualObject = VisualObjectFactory::getInstance().create( event->value.getClassId() ) 00137 ( *this, event->value.getObjectName(), event->value.getConfigParam() ) ; 00138 00139 if( visualObject ) 00140 { // Add the new visual object to the visualisation 00141 addNewVisualObject( visualObject ) ; 00142 OMTRACEID( OMK_DEBUG_VIS_EXEC, ">>> New size " << _visualObjects.size() << std::endl ) ; 00143 ok = true ; 00144 00145 // Read the parameters for animators 00146 const ConfigurationParameterDescriptor * animatorNode = event->value.getConfigParam() ? event->value.getConfigParam()->getSubDescriptorByName( "Animator" ) : 0 ; 00147 00148 AnimatorsToCreateMap::iterator entry = _animatorsToCreate.find( event->value.getObjectName() ) ; 00149 if( entry != _animatorsToCreate.end() ) 00150 { 00151 for( std::vector< AddAnimatorPrm >::iterator prm = entry->second.begin() ; 00152 prm != entry->second.end() ; 00153 ++prm ) 00154 { 00155 // sends the appropriate event to create the visual objects 00156 if( prm->getVisualObjectName() != Name() ) 00157 { // A name was in arg or was found in parameters node 00158 // Send directly to the visualisation 00159 sendValuedEvent( prm->getVisualObjectName(), VisBase::ADD_ANIMATOR_EVENT_ID, *prm ) ; 00160 OMTRACEID( OMK_DEBUG_VIS_EXEC, ">>> :-) Send again the event to create the animator to \"" << prm->getVisualObjectName() << "\"" ) ; 00161 } 00162 else 00163 { // No name was found 00164 // Fire signal to any visualisation which listens 00165 // => each will creates its own visual object 00166 fireValuedSignal( VisBase::ADD_ANIMATOR_EVENT_ID, *prm ) ; 00167 OMTRACEID( OMK_DEBUG_VIS_EXEC, ">>> :-) Fire again the signal to create the animator" ) ; 00168 } 00169 } 00170 } 00171 00172 if( animatorNode ) 00173 { 00174 int nbItems = animatorNode->getNumberOfSubItems() ; 00175 for( int i = 0 ; i < nbItems ; ++i ) 00176 { 00177 // Retrieve parameters sets for each animator 00178 std::string name = dynamic_cast<const MultipleConfigurationParameter *>( animatorNode )->getNameOfSubDescriptor( i ) ; 00179 const ConfigurationParameterDescriptor * param = animatorNode->getSubDescriptorByPosition( i ) ; 00180 OMTRACEID( OMK_DEBUG_VIS_EXEC, ">>> item #" << i << "/" << nbItems << std::endl 00181 << ">>> " << name << std::endl ) ; 00182 ok = VisObjectExtension::loadAnimatorParameters( name, param, this, getName(), &event->value.getObjectName() ) && ok ; 00183 OMTRACEID( OMK_DEBUG_VIS_EXEC, ">>> :-) " << name << " loaded" ) ; 00184 } 00185 } 00186 else 00187 { 00188 OMTRACEID( OMK_DEBUG_VIS_EXEC, "Warning for visualisation \"" << getName().getString() << "\" (class " 00189 << getObjectDescriptor().getClass().getString() << ")" << std::endl 00190 << ">>> :-| No Animator to create !" ) ; 00191 } 00192 } 00193 else if( errorMsg == "" ) 00194 { 00195 errorMsg = "Unable to create the visual object" ; 00196 } 00197 // Unable to process event => error message 00198 if( !ok ) 00199 { 00200 OMTRACE( "Error for object \"" << getName().getString() << "\" (class " 00201 << getObjectDescriptor().getClass().getString() << ")" << std::endl 00202 << ">>> :-( " << errorMsg << "." << std::endl ) ; 00203 } 00204 // allow ProcessEvent by other listener 00205 return false ; 00206 }
bool VisBase::processDeleteVisualObjectEvent | ( | DeleteVisualObjectEvent * | e | ) | [private] |
Definition at line 210 of file OMKVisBase.cpp.
References DELETE_VISUAL_OBJECT_EVENT_ID, deleteVisualObject(), and OMASSERTM.
Referenced by init().
00211 { 00212 OMASSERTM( event->eventId == DELETE_VISUAL_OBJECT_EVENT_ID, "Not the good event" ) ; 00213 deleteVisualObject( event->value ) ; 00214 // allow ProcessEvent by other listener 00215 return false ; 00216 }
bool VisBase::processAddAnimatorEvent | ( | AddAnimatorEvent * | e | ) | [private] |
Definition at line 221 of file OMKVisBase.cpp.
References _animatorsToCreate, ADD_ANIMATOR_EVENT_ID, OMK::Vis::debugMsg(), getVisualObject(), OMASSERTM, OMK_DEBUG_VIS_EXEC, and OMTRACEID.
Referenced by init().
00222 { 00223 OMASSERTM( event->eventId == ADD_ANIMATOR_EVENT_ID, "Not the good event" ) ; 00224 std::string errorMsg ; 00225 // Get the visual object 00226 Name visualObjectName( event->value.getVisualObjectName() ) ; 00227 VisualObject* visualObject = getVisualObject( visualObjectName ) ; 00228 Animator* animator = 0 ; 00229 // return value 00230 bool ok = false ; 00231 if( !visualObject ) 00232 { 00233 AnimatorsToCreateMap::iterator entry = _animatorsToCreate.find( visualObjectName ) ; 00234 if( entry == _animatorsToCreate.end() ) 00235 { 00236 _animatorsToCreate[ visualObjectName ] = std::vector< AddAnimatorPrm >() ; 00237 entry = _animatorsToCreate.find( visualObjectName ) ; 00238 } 00239 entry->second.push_back( event->value ) ; 00240 errorMsg += "Cannot find the visual object named \"" + event->value.getVisualObjectName().getString() + "\" for the moment, stores the event for later" ; 00241 } 00242 else 00243 { // Parameters are ok => Create the animator 00244 animator = AnimatorFactory::getInstance().create( event->value.getClassId() ) 00245 ( *visualObject, event->value.getObjectName(), *event->value.getConfigParam()->clone() ) ; 00246 } 00247 00248 if( animator ) 00249 { // Add the new animator to the visual object 00250 visualObject->addAnimator( animator ) ; 00251 ok = true ; 00252 } 00253 else 00254 { 00255 errorMsg += " so unable to create the animator now" ; 00256 OMTRACEID( OMK_DEBUG_VIS_EXEC, "Warning for " << debugMsg( this ) << std::endl 00257 << ">>> :-| " << errorMsg << "." << std::endl 00258 << " Event : " << * event ) ; 00259 } 00260 // Unable to process event => error message 00261 // allow ProcessEvent by other listener 00262 return false ; 00263 }
bool VisBase::processDeleteAnimatorEvent | ( | DeleteAnimatorEvent * | e | ) | [private] |
Definition at line 268 of file OMKVisBase.cpp.
References _visualObjects, DELETE_ANIMATOR_EVENT_ID, and OMASSERTM.
Referenced by init().
00269 { 00270 OMASSERTM( event->eventId == DELETE_ANIMATOR_EVENT_ID, "Not the good event" ) ; 00271 const DeleteAnimatorPrm& prm = event->value.getValue() ; 00272 VisualObjectMap::iterator i = _visualObjects.find( prm.first ) ; 00273 if( i != _visualObjects.end() ) 00274 { 00275 i->second->deleteAnimator( prm.second ) ; 00276 } 00277 // allow ProcessEvent by other listener 00278 return false; 00279 }
void VisBase::addNewVisualObject | ( | OMK::Vis::VisualObject * | visualObject | ) | [private] |
Definition at line 332 of file OMKVisBase.cpp.
References _visualObjects, OMK::Vis::VisualObject::getId(), and OMASSERTM.
Referenced by processAddVisualObjectEvent().
00333 { 00334 OMASSERTM( visualObject, "Must be a valid pointer" ) ; 00335 // Add the partner in the list 00336 _visualObjects[ visualObject->getId() ] = visualObject ; 00337 }
void VisBase::deleteVisualObject | ( | const Name & | id | ) | [private] |
Definition at line 342 of file OMKVisBase.cpp.
References _visualObjects, OMASSERTM, OMK_DEBUG_VIS_EXEC, and OMTRACEID.
Referenced by processDeleteVisualObjectEvent().
00343 { 00344 VisualObjectMap::iterator i = _visualObjects.find( id ) ; 00345 OMASSERTM( i != _visualObjects.end(), "The visual object named \"" << id << "\" is not present !" ) ; 00346 // delete the visual object 00347 delete i->second ; 00348 _visualObjects.erase( i ) ; 00349 OMTRACEID( OMK_DEBUG_VIS_EXEC, ">>> :-) The visual object named \"" << id << "\" is deleted" ) ; 00350 }
Definition at line 88 of file OMKVisBase.h.
Referenced by finish(), init(), OMK::Vis::VisObjectExtension::loadObjectParameters(), and processAddVisualObjectEvent().
Definition at line 89 of file OMKVisBase.h.
Referenced by init(), and processDeleteVisualObjectEvent().
Definition at line 90 of file OMKVisBase.h.
Referenced by finish(), init(), OMK::IAttributeAnimatorT< PrmType, ModelType, AccessorType >::initAnimator(), OMK::Vis::VisObjectExtension::loadAnimatorParameters(), processAddAnimatorEvent(), and processAddVisualObjectEvent().
Visual objects list.
The list which stores the visualised objects
Definition at line 148 of file OMKVisBase.h.
Referenced by addNewVisualObject(), computeParameters(), deleteVisualObject(), finish(), getVisualObject(), processAddVisualObjectEvent(), and processDeleteAnimatorEvent().
Event identifier and plug which get the value of the event for its animator.
Definition at line 151 of file OMKVisBase.h.
Referenced by processEvent(), registerEventPlug(), and removeEventPlug().
Definition at line 153 of file OMKVisBase.h.
Referenced by processAddAnimatorEvent(), and processAddVisualObjectEvent().
Documentation generated on Mon Jun 9 11:46:05 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |