#include <RootObject.hh>
Public Member Functions | |
RootObject (SecurityServer *security_server) | |
RootObject constructor. | |
~RootObject () | |
RootObject destructor. | |
void | display () const |
Print the Root Object tree to the standard output. | |
SecurityLevelID | getSecurityLevelID (const std::string &levelName) |
Return the security LevelID corresponding to a security level name. | |
void | registerFederate (const std::string &the_federate, SecurityLevelID the_level_id) |
registerFederate. | |
void | addRoutingSpace (const RoutingSpace &) |
Add a routing space. | |
RoutingSpace & | getRoutingSpace (SpaceHandle) throw (SpaceNotDefined) |
get a routing space | |
SpaceHandle | getRoutingSpaceHandle (std::string) throw (NameNotFound) |
get a routing space handle | |
std::string | getRoutingSpaceName (SpaceHandle) throw (SpaceNotDefined) |
get a routing space name | |
void | addRegion (RTIRegion *) |
add a region | |
RegionHandle | createRegion (SpaceHandle, unsigned long) throw (SpaceNotDefined) |
create (and add) a region | |
void | deleteRegion (RegionHandle) throw (RegionNotKnown, RegionInUse) |
Delete a region. | |
RTIRegion * | getRegion (RegionHandle) throw (RegionNotKnown) |
Get a region. | |
void | modifyRegion (RegionHandle, const std::vector< Extent > &) throw (RegionNotKnown, InvalidExtents) |
void | registerObjectInstance (FederateHandle, ObjectClassHandle, ObjectHandle, const char *) throw (InvalidObjectHandle, ObjectClassNotDefined, ObjectClassNotPublished, ObjectAlreadyRegistered, RTIinternalError) |
FederateHandle | requestObjectOwner (FederateHandle theFederateHandle, ObjectHandle theObject) throw (ObjectNotKnown) |
void | deleteObjectInstance (FederateHandle, ObjectHandle, FederationTime theTime, std::string theTag) throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError) |
void | deleteObjectInstance (FederateHandle, ObjectHandle, std::string theTag) throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError) |
void | killFederate (FederateHandle) throw (RTIinternalError) |
ObjectAttribute * | getObjectAttribute (ObjectHandle, AttributeHandle) |
ObjectClass * | getObjectClass (ObjectClassHandle) |
Interaction * | getInteractionClass (InteractionClassHandle) |
Object * | getObject (ObjectHandle) |
ObjectClassAttribute * | getObjectClassAttribute (ObjectHandle, AttributeHandle) |
void | addObjectClass (ObjectClass *currentOC, ObjectClass *parentOC) |
Add an object class to the ObjectRoot. | |
void | addInteractionClass (Interaction *currentIC, Interaction *parentIC) |
Add an interaction class to the ObjectRoot. | |
Public Attributes | |
ObjectClassSet * | ObjectClasses |
The set of object classes. | |
InteractionSet * | Interactions |
The set of interactions classes found This is created when parsing the FOM. | |
ObjectSet * | objects |
The set of registered object instance. | |
Private Attributes | |
std::vector< RoutingSpace > | spaces |
SecurityServer * | server |
The associated socket server. | |
std::list< RTIRegion * > | regions |
HandleManager< RegionHandle > | regionHandles |
One RootObject is created for each federation both on the RTIG and on each RTIA instance of corresponding federate which has joined the federation. It contains the object (resp. interaction) classes hierarchy with the attached attributes (resp. parameters). It contains the object instances which has been registered by all federate (if on RTIG) or by local federate (if on RTIA).
Definition at line 62 of file RootObject.hh.
RootObject | ( | SecurityServer * | security_server | ) |
RootObject constructor.
[in] | security_server | the SocketServer proxy which is used to retrieve the socket link between RTIG and RTIA. This may be NULL on the RTIA. |
Definition at line 58 of file RootObject.cc.
References RootObject::Interactions, RootObject::ObjectClasses, RootObject::objects, and RootObject::server.
~RootObject | ( | ) |
RootObject destructor.
Will delete all object or interaction classes.
Definition at line 68 of file RootObject.cc.
References RootObject::Interactions, RootObject::ObjectClasses, and RootObject::objects.
void display | ( | void | ) | const |
Print the Root Object tree to the standard output.
Definition at line 78 of file RootObject.cc.
References RootObject::Interactions, RootObject::ObjectClasses, and RootObject::spaces.
SecurityLevelID getSecurityLevelID | ( | const std::string & | levelName | ) |
Return the security LevelID corresponding to a security level name.
[in] | levelName | the security level name |
Definition at line 93 of file RootObject.cc.
References SecurityServer::getLevelIDWithName(), PublicLevelID, and RootObject::server.
Referenced by certi::fedparser::addInteractionSecurityLevel(), certi::fedparser::addObjectSecLevel(), certi::fedparser::addObjectSecurityLevel(), and certi::fedparser::endFederate().
void registerFederate | ( | const std::string & | the_federate, | |
SecurityLevelID | the_level_id | |||
) |
registerFederate.
Definition at line 101 of file RootObject.cc.
References SecurityServer::registerFederate(), and RootObject::server.
Referenced by certi::fedparser::endFederate().
void addRoutingSpace | ( | const RoutingSpace & | rs | ) |
Add a routing space.
The actual routing space is a copy of the one provided as parameter, and the handle may be modified.
rs | Routing space to add |
Definition at line 114 of file RootObject.cc.
References RootObject::spaces.
Referenced by certi::fedparser::endSpace().
RoutingSpace & getRoutingSpace | ( | SpaceHandle | handle | ) | throw (SpaceNotDefined) |
get a routing space
Definition at line 150 of file RootObject.cc.
References RootObject::spaces.
Referenced by RTIA::chooseFederateProcessing(), RootObject::createRegion(), DataDistribution::createRegion(), DataDistribution::getDimensionHandle(), and DataDistribution::getDimensionName().
SpaceHandle getRoutingSpaceHandle | ( | std::string | rs | ) | throw (NameNotFound) |
get a routing space handle
Definition at line 123 of file RootObject.cc.
References RootObject::spaces.
Referenced by DataDistribution::getRoutingSpaceHandle().
string getRoutingSpaceName | ( | SpaceHandle | handle | ) | throw (SpaceNotDefined) |
get a routing space name
Definition at line 138 of file RootObject.cc.
References RootObject::spaces.
Referenced by DataDistribution::getRoutingSpaceName().
void addRegion | ( | RTIRegion * | region | ) |
add a region
Definition at line 162 of file RootObject.cc.
References RootObject::regions.
Referenced by RootObject::createRegion(), and DataDistribution::createRegion().
RegionHandle createRegion | ( | SpaceHandle | handle, | |
unsigned long | nb_extents | |||
) | throw (SpaceNotDefined) |
create (and add) a region
Definition at line 170 of file RootObject.cc.
References RootObject::addRegion(), Handled::getHandle(), BaseRegion::getNumberOfExtents(), RootObject::getRoutingSpace(), and RootObject::regionHandles.
Referenced by Federation::createRegion().
void deleteRegion | ( | RegionHandle | region_handle | ) | throw (RegionNotKnown, RegionInUse) |
Delete a region.
region_handle | Region to delete |
Definition at line 197 of file RootObject.cc.
References RootObject::regionHandles, and RootObject::regions.
Referenced by Federation::deleteRegion(), and DataDistribution::deleteRegion().
RTIRegion * getRegion | ( | RegionHandle | handle | ) | throw (RegionNotKnown) |
Get a region.
handle | RegionHandle to get |
Definition at line 220 of file RootObject.cc.
References RootObject::regions.
Referenced by Federation::associateRegion(), DataDistribution::associateRegion(), Federation::broadcastInteraction(), DataDistribution::deleteRegion(), RootObject::modifyRegion(), DataDistribution::modifyRegion(), DataDistribution::registerObject(), Federation::registerObjectWithRegion(), DataDistribution::subscribe(), Federation::subscribeAttributesWR(), DataDistribution::subscribeInteraction(), Federation::subscribeInteractionWR(), Federation::unassociateRegion(), DataDistribution::unassociateRegion(), DataDistribution::unsubscribeAttributes(), Federation::unsubscribeAttributesWR(), DataDistribution::unsubscribeInteraction(), and Federation::unsubscribeInteractionWR().
void modifyRegion | ( | RegionHandle | handle, | |
const std::vector< Extent > & | extents | |||
) | throw (RegionNotKnown, InvalidExtents) |
Definition at line 185 of file RootObject.cc.
References RootObject::getRegion(), and BaseRegion::replaceExtents().
Referenced by Federation::modifyRegion().
void registerObjectInstance | ( | FederateHandle | the_federate, | |
ObjectClassHandle | the_class, | |||
ObjectHandle | the_object, | |||
const char * | the_object_name | |||
) | throw (InvalidObjectHandle, ObjectClassNotDefined, ObjectClassNotPublished, ObjectAlreadyRegistered, RTIinternalError) |
Definition at line 234 of file RootObject.cc.
References certi::D, RootObject::ObjectClasses, RootObject::objects, PrettyDebug::Out(), pdRegister, ObjectClassSet::registerObjectInstance(), and ObjectSet::registerObjectInstance().
Referenced by ObjectManagement::discoverObject(), ObjectManagement::registerObject(), Federation::registerObject(), DataDistribution::registerObject(), and Federation::registerObjectWithRegion().
FederateHandle requestObjectOwner | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObject | |||
) | throw (ObjectNotKnown) |
Definition at line 333 of file RootObject.cc.
References certi::G, RootObject::objects, PrettyDebug::Out(), pdGendoc, and ObjectSet::requestObjectOwner().
Referenced by Federation::requestObjectOwner().
void deleteObjectInstance | ( | FederateHandle | the_federate, | |
ObjectHandle | the_object, | |||
FederationTime | theTime, | |||
std::string | theTag | |||
) | throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError) |
Definition at line 257 of file RootObject.cc.
References ObjectClassSet::deleteObject(), ObjectSet::deleteObjectInstance(), RootObject::ObjectClasses, and RootObject::objects.
Referenced by ObjectManagement::deleteObject(), Federation::deleteObject(), and ObjectManagement::removeObject().
void deleteObjectInstance | ( | FederateHandle | the_federate, | |
ObjectHandle | the_object, | |||
std::string | theTag | |||
) | throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError) |
Definition at line 269 of file RootObject.cc.
References ObjectClassSet::deleteObject(), ObjectSet::deleteObjectInstance(), RootObject::ObjectClasses, and RootObject::objects.
void killFederate | ( | FederateHandle | the_federate | ) | throw (RTIinternalError) |
Definition at line 280 of file RootObject.cc.
References RootObject::Interactions, ObjectSet::killFederate(), InteractionSet::killFederate(), ObjectClassSet::killFederate(), RootObject::ObjectClasses, and RootObject::objects.
Referenced by Federation::kill().
ObjectAttribute * getObjectAttribute | ( | ObjectHandle | object, | |
AttributeHandle | attribute | |||
) |
Definition at line 301 of file RootObject.cc.
References Object::getAttribute(), ObjectSet::getObject(), and RootObject::objects.
Referenced by Federation::associateRegion(), DataDistribution::associateRegion(), DataDistribution::registerObject(), and Federation::registerObjectWithRegion().
ObjectClass * getObjectClass | ( | ObjectClassHandle | class_handle | ) |
Definition at line 318 of file RootObject.cc.
References TreeNamedAndHandledSet::getObjectFromHandle(), and RootObject::ObjectClasses.
Referenced by Federation::unsubscribeAttributesWR().
Interaction * getInteractionClass | ( | InteractionClassHandle | the_class | ) |
Definition at line 326 of file RootObject.cc.
References TreeNamedAndHandledSet::getObjectFromHandle(), and RootObject::Interactions.
Referenced by Federation::subscribeInteractionWR(), and Federation::unsubscribeInteractionWR().
Object * getObject | ( | ObjectHandle | object | ) |
Definition at line 310 of file RootObject.cc.
References ObjectSet::getObject(), and RootObject::objects.
Referenced by Federation::associateRegion(), DataDistribution::associateRegion(), Federation::registerObjectWithRegion(), Federation::unassociateRegion(), and DataDistribution::unassociateRegion().
ObjectClassAttribute * getObjectClassAttribute | ( | ObjectHandle | object, | |
AttributeHandle | attribute | |||
) |
Definition at line 291 of file RootObject.cc.
References Object::getAttribute(), ObjectSet::getObject(), ObjectAttribute::getObjectClassAttribute(), and RootObject::objects.
void addObjectClass | ( | ObjectClass * | currentOC, | |
ObjectClass * | parentOC | |||
) |
Add an object class to the ObjectRoot.
[in,out] | currentOC | the object class to be added |
[in,out] | parentOC | the parent object class of currentOC this may be NULL. |
Definition at line 343 of file RootObject.cc.
References ObjectClassSet::addClass(), and RootObject::ObjectClasses.
Referenced by certi::fedparser::startObject().
void addInteractionClass | ( | Interaction * | currentIC, | |
Interaction * | parentIC | |||
) |
Add an interaction class to the ObjectRoot.
[in] | currentIC | the interaction class to be added. |
[in] | parentIC | the parent interaction class of currentIC this may be NULL. |
Definition at line 348 of file RootObject.cc.
References InteractionSet::addClass(), and RootObject::Interactions.
Referenced by certi::fedparser::startInteraction().
The set of object classes.
This is created when parsing the FOM.
Definition at line 156 of file RootObject.hh.
Referenced by Federation::acquire(), Federation::acquireIfAvailable(), RootObject::addObjectClass(), Federation::cancelAcquisition(), RootObject::deleteObjectInstance(), RootObject::display(), Federation::divest(), ObjectManagement::getAttributeHandle(), ObjectManagement::getAttributeName(), DataDistribution::getAttributeSpace(), RootObject::getObjectClass(), ObjectManagement::getObjectClassHandle(), ObjectManagement::getObjectClassName(), RootObject::killFederate(), Federation::negotiateDivestiture(), RTIA::processNetworkMessage(), Federation::publishObject(), DeclarationManagement::publishObjectClass(), RootObject::registerObjectInstance(), Federation::respondRelease(), RootObject::RootObject(), Federation::subscribeAttributesWR(), Federation::subscribeObject(), DeclarationManagement::unpublishObjectClass(), Federation::updateAttributeValues(), and RootObject::~RootObject().
The set of interactions classes found This is created when parsing the FOM.
Definition at line 162 of file RootObject.hh.
Referenced by RootObject::addInteractionClass(), Federation::broadcastInteraction(), RootObject::display(), RootObject::getInteractionClass(), ObjectManagement::getInteractionClassHandle(), ObjectManagement::getInteractionClassName(), DataDistribution::getInteractionSpace(), ObjectManagement::getParameterHandle(), ObjectManagement::getParameterName(), RootObject::killFederate(), RTIA::processNetworkMessage(), Federation::publishInteraction(), DeclarationManagement::publishInteractionClass(), RootObject::RootObject(), ObjectManagement::sendInteraction(), Federation::subscribeInteraction(), DeclarationManagement::subscribeInteractionClass(), DeclarationManagement::unpublishInteractionClass(), DeclarationManagement::unsubscribeInteractionClass(), and RootObject::~RootObject().
The set of registered object instance.
Definition at line 167 of file RootObject.hh.
Referenced by Federation::cancelDivestiture(), RootObject::deleteObjectInstance(), RootObject::getObject(), RootObject::getObjectAttribute(), ObjectManagement::getObjectClass(), RootObject::getObjectClassAttribute(), ObjectManagement::getObjectInstanceHandle(), ObjectManagement::getObjectInstanceName(), Federation::isOwner(), RootObject::killFederate(), Federation::queryAttributeOwnership(), RootObject::registerObjectInstance(), RootObject::requestObjectOwner(), RootObject::RootObject(), and RootObject::~RootObject().
std::vector<RoutingSpace> spaces [private] |
Definition at line 171 of file RootObject.hh.
Referenced by RootObject::addRoutingSpace(), RootObject::display(), RootObject::getRoutingSpace(), RootObject::getRoutingSpaceHandle(), and RootObject::getRoutingSpaceName().
SecurityServer* server [private] |
The associated socket server.
Definition at line 175 of file RootObject.hh.
Referenced by RootObject::getSecurityLevelID(), RootObject::registerFederate(), and RootObject::RootObject().
Definition at line 178 of file RootObject.hh.
Referenced by RootObject::addRegion(), RootObject::deleteRegion(), and RootObject::getRegion().
HandleManager<RegionHandle> regionHandles [private] |
Definition at line 179 of file RootObject.hh.
Referenced by RootObject::createRegion(), and RootObject::deleteRegion().