RootObject Class Reference

The RootObject is literally the "root" object of the HLA object class hierarchy. More...

#include <RootObject.hh>

List of all members.

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.
RoutingSpacegetRoutingSpace (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.
RTIRegiongetRegion (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)
ObjectAttributegetObjectAttribute (ObjectHandle, AttributeHandle)
ObjectClassgetObjectClass (ObjectClassHandle)
InteractiongetInteractionClass (InteractionClassHandle)
ObjectgetObject (ObjectHandle)
ObjectClassAttributegetObjectClassAttribute (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

ObjectClassSetObjectClasses
 The set of object classes.
InteractionSetInteractions
 The set of interactions classes found This is created when parsing the FOM.
ObjectSetobjects
 The set of registered object instance.

Private Attributes

std::vector< RoutingSpacespaces
SecurityServerserver
 The associated socket server.
std::list< RTIRegion * > regions
HandleManager< RegionHandleregionHandles


Detailed Description

The RootObject is literally the "root" object of the HLA object class hierarchy.

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.


Constructor & Destructor Documentation

RootObject ( SecurityServer security_server  ) 

RootObject constructor.

Parameters:
[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.


Member Function Documentation

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.

Parameters:
[in] levelName the security level name
Returns:
the LevelID of the level whose name is levelName if a security server exists PublicLevelID if no security server exists.

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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.

Parameters:
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)

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().

Here is the call graph for this function:

void deleteRegion ( RegionHandle  region_handle  )  throw (RegionNotKnown, RegionInUse)

Delete a region.

Parameters:
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)

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().

Here is the call graph for this function:

void registerObjectInstance ( FederateHandle  the_federate,
ObjectClassHandle  the_class,
ObjectHandle  the_object,
const char *  the_object_name 
) throw (InvalidObjectHandle, ObjectClassNotDefined, ObjectClassNotPublished, ObjectAlreadyRegistered, RTIinternalError)

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().

Here is the call graph for this function:

void deleteObjectInstance ( FederateHandle  the_federate,
ObjectHandle  the_object,
FederationTime  theTime,
std::string  theTag 
) throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError)

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.

Here is the call graph for this function:

void killFederate ( FederateHandle  the_federate  )  throw (RTIinternalError)

ObjectAttribute * getObjectAttribute ( ObjectHandle  object,
AttributeHandle  attribute 
)

ObjectClass * getObjectClass ( ObjectClassHandle  class_handle  ) 

Definition at line 318 of file RootObject.cc.

References TreeNamedAndHandledSet::getObjectFromHandle(), and RootObject::ObjectClasses.

Referenced by Federation::unsubscribeAttributesWR().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Object * getObject ( ObjectHandle  object  ) 

ObjectClassAttribute * getObjectClassAttribute ( ObjectHandle  object,
AttributeHandle  attribute 
)

Definition at line 291 of file RootObject.cc.

References Object::getAttribute(), ObjectSet::getObject(), ObjectAttribute::getObjectClassAttribute(), and RootObject::objects.

Here is the call graph for this function:

void addObjectClass ( ObjectClass currentOC,
ObjectClass parentOC 
)

Add an object class to the ObjectRoot.

Parameters:
[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().

Here is the call graph for this function:

void addInteractionClass ( Interaction currentIC,
Interaction parentIC 
)

Add an interaction class to the ObjectRoot.

Parameters:
[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().

Here is the call graph for this function:


Member Data Documentation

std::vector<RoutingSpace> spaces [private]

SecurityServer* server [private]

The associated socket server.

Definition at line 175 of file RootObject.hh.

Referenced by RootObject::getSecurityLevelID(), RootObject::registerFederate(), and RootObject::RootObject().

std::list<RTIRegion *> regions [private]

Definition at line 179 of file RootObject.hh.

Referenced by RootObject::createRegion(), and RootObject::deleteRegion().


The documentation for this class was generated from the following files:

Generated on Thu Apr 30 15:58:36 2009 for CERTIDeveloperDocumentation by doxygen 1.5.5