![]() |
VR-Forces 4.0.4 Class Documentation
|
The DtBaseConnection is an abstract class. More...

Public Member Functions | |
| DtBaseConnection (DtSharedSettingsManager &, DtAgentManagerInterface &) | |
| CTOR. | |
| virtual | ~DtBaseConnection () |
| DTOR MUST call clearInstances first. | |
| virtual void | clearInstances () |
| Clear and delete all instances rooted in the connection MUST be called before the connection is destroyed. | |
| DtSharedSettingsManager & | settingsManager () |
| Get the settings manager. | |
| virtual DtAgentManagerInterface & | sceneInterface () |
| Get the scene manager interface for creating drivers. | |
| const DtSharedSettingsManager & | settingsManager () const |
| Get the settings manager. | |
| void | reportElementCreated (DtElementID id, DtElementID parentId, unsigned int type) |
| Report an element created. | |
| void | reportElementAttribute (DtElementID id, DtElementAttribute *attribute) |
| void | reportElementDestroyed (DtElementID id) |
| Report an element destroyed. | |
| const DtElementChanges & | currentElementChanges () const |
| Look at the current element changes. | |
| DtElementChanges * | takeElementChanges () |
| Take the current changes and internally start a new set of changes. | |
| DtTemporaryAgentManager & | temporaryEffects () |
| Get the temporary effects manager. | |
| DtBlinkingObjectManager & | blinkManager () |
| Get the blinking manager. | |
| DtRandomNumberGenerator & | randomNumberGenerator () |
| Get the simulation's random number generator. | |
| virtual const std::string & | tag () |
| Get the tag identifying which type of connection this is. | |
| const DtUnicode & | emptyString () const |
| Allocated empty string. | |
| virtual DtVirtualBaseClass * | findInstance (const std::string &instanceName) |
| Find an instance with the given name. | |
| bool | destroyingInstances () const |
| Check to see if the simulation is destroying instances. | |
| virtual void | registerInstance (const std::string &instanceName, DtVirtualBaseClass *instance) |
| Register an object as an instance of instanceName, and transfer memory ownership of the instance to the DtConnection. | |
Protected Types | |
| typedef boost::unordered_map < std::string, DtVirtualBaseClass * > | InstanceMap |
Protected Attributes | |
| DtSharedSettingsManager & | mySettingsManagerCache |
| DtRandomNumberGenerator | myRandomNumberGenerator |
| DtAgentManagerInterface & | mySceneInterface |
| DtElementChanges * | myWorkingElementChanges |
| DtTemporaryAgentManager * | myTemporaryEffects |
| DtBlinkingObjectManager * | myBlinkManager |
| Manager for blinking objects. | |
| DtUnicode | myEmptyString |
| InstanceMap | myInstances |
| bool | myDestroyingInstanceFlag |
The DtBaseConnection is an abstract class.
typedef boost::unordered_map<std::string,DtVirtualBaseClass*> makVrv::DtBaseConnection::InstanceMap [protected] |
Reimplemented in makVrv::DtCigiConnection.
| makVrv::DtBaseConnection::DtBaseConnection | ( | DtSharedSettingsManager & | , |
| DtAgentManagerInterface & | |||
| ) |
CTOR.
| virtual makVrv::DtBaseConnection::~DtBaseConnection | ( | ) | [virtual] |
DTOR MUST call clearInstances first.
| virtual void makVrv::DtBaseConnection::clearInstances | ( | ) | [virtual] |
Clear and delete all instances rooted in the connection MUST be called before the connection is destroyed.
Get the settings manager.
| virtual DtAgentManagerInterface& makVrv::DtBaseConnection::sceneInterface | ( | ) | [virtual] |
Get the scene manager interface for creating drivers.
| const DtSharedSettingsManager& makVrv::DtBaseConnection::settingsManager | ( | ) | const |
Get the settings manager.
| void makVrv::DtBaseConnection::reportElementCreated | ( | DtElementID | id, |
| DtElementID | parentId, | ||
| unsigned int | type | ||
| ) |
Report an element created.
| void makVrv::DtBaseConnection::reportElementAttribute | ( | DtElementID | id, |
| DtElementAttribute * | attribute | ||
| ) |
Report an element destroyed.
| const DtElementChanges& makVrv::DtBaseConnection::currentElementChanges | ( | ) | const |
Look at the current element changes.
Take the current changes and internally start a new set of changes.
Get the temporary effects manager.
Get the blinking manager.
Get the simulation's random number generator.
| virtual const std::string& makVrv::DtBaseConnection::tag | ( | ) | [inline, virtual] |
Get the tag identifying which type of connection this is.
Reimplemented in makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.
| const DtUnicode& makVrv::DtBaseConnection::emptyString | ( | ) | const |
Allocated empty string.
| virtual DtVirtualBaseClass* makVrv::DtBaseConnection::findInstance | ( | const std::string & | instanceName | ) | [virtual] |
Find an instance with the given name.
If no instance is found than a null pointer is returned
Reimplemented in makVrv::DtIntervisibilityDriver::DtIntervisibilityConnection, and makVrv::DtCigiConnection.
Referenced by makVrv::DT_PROTOCOL_NAMESPACE::DtInteractionListener< InteractionClass >::instance(), and makVrf::VRF_PROTOCOL_NAMESPACE::DtVrfEntityStateInterceptorCreator::instance().
| bool makVrv::DtBaseConnection::destroyingInstances | ( | ) | const [inline] |
Check to see if the simulation is destroying instances.
This function is used in the destructor of objects which access instances via reference which may throw an exception.
TestClass::~TestClass()
{
if(!mySimulation.destroyingInstances())
{
//Safe to get instance now.
Singleton& anInstance = Singleton::instance(mySimulation);
...
}
Reimplemented in makVrv::DtCigiConnection.
| virtual void makVrv::DtBaseConnection::registerInstance | ( | const std::string & | instanceName, |
| DtVirtualBaseClass * | instance | ||
| ) | [virtual] |
Register an object as an instance of instanceName, and transfer memory ownership of the instance to the DtConnection.
Reimplemented in makVrv::DtIntervisibilityDriver::DtIntervisibilityConnection, and makVrv::DtCigiConnection.
Referenced by makVrv::DT_PROTOCOL_NAMESPACE::DtInteractionListener< InteractionClass >::instance(), and makVrf::VRF_PROTOCOL_NAMESPACE::DtVrfEntityStateInterceptorCreator::instance().
Manager for blinking objects.
DtUnicode makVrv::DtBaseConnection::myEmptyString [protected] |
InstanceMap makVrv::DtBaseConnection::myInstances [protected] |
Reimplemented in makVrv::DtCigiConnection.