#include <ObjectClassSet.hh>
Public Member Functions | |
ObjectClassSet (SecurityServer *theSecurityServer, bool isRootClassSet=false) | |
~ObjectClassSet () | |
Destructor. | |
void | addClass (ObjectClass *theClass, ObjectClass *parentClass) throw (RTIinternalError) |
Add an object class to the set. | |
AttributeHandle | getAttributeHandle (const char *the_name, ObjectClassHandle the_class) const throw (NameNotFound, ObjectClassNotDefined, RTIinternalError) |
getAttributeHandle. | |
const char * | getAttributeName (AttributeHandle the_handle, ObjectClassHandle the_class) const throw (AttributeNotDefined, ObjectClassNotDefined, RTIinternalError) |
getAttributeName. | |
ObjectClassHandle | getObjectClassHandle (std::string) const throw (NameNotFound) |
getObjectClassHandle. | |
std::string | getObjectClassName (ObjectClassHandle the_handle) const throw (ObjectClassNotDefined) |
getObjectClassName. | |
void | killFederate (FederateHandle theFederate) throw () |
killFederate. | |
void | publish (FederateHandle theFederateHandle, ObjectClassHandle theClassHandle, std::vector< AttributeHandle > &theAttributeList, UShort theListSize, bool PubOrUnpub) throw (ObjectClassNotDefined, AttributeNotDefined, RTIinternalError, SecurityError) |
publish | |
void | subscribe (FederateHandle, ObjectClassHandle, std::vector< AttributeHandle > &, int theListSize, const RTIRegion *=0) throw (ObjectClassNotDefined, AttributeNotDefined, RTIinternalError, SecurityError) |
Subscribes a federate to a set of attributes with a region. | |
void | deleteObject (FederateHandle theFederateHandle, ObjectHandle theObjectHandle, FederationTime theTime, std::string theTag) throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError) |
deleteObject with time. | |
void | deleteObject (FederateHandle theFederateHandle, ObjectHandle theObjectHandle, std::string theTag) throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError) |
deleteObject without time. | |
void | registerObjectInstance (FederateHandle, Object *, ObjectClassHandle) throw (InvalidObjectHandle, ObjectClassNotDefined, ObjectClassNotPublished, ObjectAlreadyRegistered, RTIinternalError) |
registerInstance. | |
void | updateAttributeValues (FederateHandle theFederateHandle, ObjectHandle theObjectHandle, std::vector< AttributeHandle > &theAttribArray, std::vector< AttributeValue_t > &theValueArray, UShort theArraySize, FederationTime theTime, const char *theUserTag) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError, InvalidObjectHandle) |
updateAttributeValues with time | |
void | updateAttributeValues (FederateHandle theFederateHandle, ObjectHandle theObjectHandle, std::vector< AttributeHandle > &theAttribArray, std::vector< AttributeValue_t > &theValueArray, UShort theArraySize, const char *theUserTag) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError, InvalidObjectHandle) |
updateAttributeValues without time | |
void | negotiatedAttributeOwnershipDivestiture (FederateHandle, ObjectHandle theObjectHandle, std::vector< AttributeHandle > &, UShort theListSize, const char *theTag) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, AttributeAlreadyBeingDivested, RTIinternalError) |
negotiatedAttributeOwnershipDivestiture. | |
void | attributeOwnershipAcquisitionIfAvailable (FederateHandle, ObjectHandle theObjectHandle, std::vector< AttributeHandle > &, UShort theListSize) throw (ObjectNotKnown, ObjectClassNotPublished, AttributeNotDefined, AttributeNotPublished, FederateOwnsAttributes, AttributeAlreadyBeingAcquired, RTIinternalError) |
attributeOwnershipAcquisitionIfAvailable. | |
void | unconditionalAttributeOwnershipDivestiture (FederateHandle, ObjectHandle, std::vector< AttributeHandle > &, UShort theListSize) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError) |
unconditionalAttributeOwnershipDivestiture | |
void | attributeOwnershipAcquisition (FederateHandle theFederateHandle, ObjectHandle theObjectHandle, std::vector< AttributeHandle > &theAttributeList, UShort theListSize, const char *theTag) throw (ObjectNotKnown, ObjectClassNotPublished, AttributeNotDefined, AttributeNotPublished, FederateOwnsAttributes, RTIinternalError) |
attributeOwnershipAcquisition. | |
AttributeHandleSet * | attributeOwnershipReleaseResponse (FederateHandle, ObjectHandle, std::vector< AttributeHandle > &, UShort) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, FederateWasNotAskedToReleaseAttribute, RTIinternalError) |
attributeOwnershipReleaseResponse. | |
void | cancelAttributeOwnershipAcquisition (FederateHandle theFederateHandle, ObjectHandle theObjectHandle, std::vector< AttributeHandle > &theAttributeList, UShort theListSize) throw (ObjectNotKnown, AttributeNotDefined, AttributeAlreadyOwned, AttributeAcquisitionWasNotRequested, RTIinternalError) |
cancelAttributeOwnershipAcquisition. | |
Object * | getObject (ObjectHandle) const throw (ObjectNotKnown) |
Get object. | |
Private Member Functions | |
ObjectClass * | getInstanceClass (ObjectHandle theObjectHandle) const throw (ObjectNotKnown) |
getInstanceClass. | |
Private Attributes | |
SecurityServer * | server |
This object will help to find the TCPLink associated with a Federate. |
Definition at line 49 of file ObjectClassSet.hh.
ObjectClassSet | ( | SecurityServer * | theSecurityServer, | |
bool | isRootClassSet = false | |||
) |
~ObjectClassSet | ( | ) |
void addClass | ( | ObjectClass * | theClass, | |
ObjectClass * | parentClass | |||
) | throw (RTIinternalError) |
Add an object class to the set.
[in] | theClass | the object class to be added |
[in] | parentClass | the parent class (may be NULL) |
Definition at line 64 of file ObjectClassSet.cc.
References certi::D, PrettyDebug::Out(), pdInit, and ObjectClassSet::server.
Referenced by RootObject::addObjectClass(), and ObjectClass::addSubClass().
AttributeHandle getAttributeHandle | ( | const char * | the_name, | |
ObjectClassHandle | the_class | |||
) | const throw (NameNotFound, ObjectClassNotDefined, RTIinternalError) |
getAttributeHandle.
Definition at line 163 of file ObjectClassSet.cc.
References certi::D, certi::G, ObjectClass::getAttributeHandle(), TreeNamedAndHandledSet::getObjectFromHandle(), PrettyDebug::Out(), pdGendoc, and pdRequest.
Referenced by ObjectManagement::getAttributeHandle().
const char * getAttributeName | ( | AttributeHandle | the_handle, | |
ObjectClassHandle | the_class | |||
) | const throw (AttributeNotDefined, ObjectClassNotDefined, RTIinternalError) |
getAttributeName.
Definition at line 198 of file ObjectClassSet.cc.
References certi::D, ObjectClass::getAttributeName(), TreeNamedAndHandledSet::getObjectFromHandle(), PrettyDebug::Out(), and pdRequest.
Referenced by ObjectManagement::getAttributeName().
ObjectClassHandle getObjectClassHandle | ( | std::string | class_name | ) | const throw (NameNotFound) |
getObjectClassHandle.
Definition at line 258 of file ObjectClassSet.cc.
References TreeNamedAndHandledSet::getHandleFromName().
Referenced by ObjectManagement::getObjectClassHandle().
string getObjectClassName | ( | ObjectClassHandle | the_handle | ) | const throw (ObjectClassNotDefined) |
getObjectClassName.
Definition at line 266 of file ObjectClassSet.cc.
References certi::D, TreeNamedAndHandledSet::getNameFromHandle(), PrettyDebug::Out(), and pdRequest.
Referenced by ObjectManagement::getObjectClassName().
void killFederate | ( | FederateHandle | theFederate | ) | throw () |
killFederate.
Definition at line 275 of file ObjectClassSet.cc.
References certi::D, TreeNamedAndHandledSet::fromHandle, TreeNamedAndHandledSet::getObjectFromHandle(), PrettyDebug::Out(), pdExcept, and pdRegister.
Referenced by RootObject::killFederate().
void publish | ( | FederateHandle | theFederateHandle, | |
ObjectClassHandle | theClassHandle, | |||
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize, | |||
bool | PubOrUnpub | |||
) | throw (ObjectClassNotDefined, AttributeNotDefined, RTIinternalError, SecurityError) |
publish
Definition at line 318 of file ObjectClassSet.cc.
References certi::D, TreeNamedAndHandledSet::getObjectFromHandle(), PrettyDebug::Out(), pdInit, pdTerm, and ObjectClass::publish().
Referenced by Federation::publishObject(), DeclarationManagement::publishObjectClass(), and DeclarationManagement::unpublishObjectClass().
void subscribe | ( | FederateHandle | federate, | |
ObjectClassHandle | class_handle, | |||
std::vector< AttributeHandle > & | attributes, | |||
int | nb, | |||
const RTIRegion * | region = 0 | |||
) | throw (ObjectClassNotDefined, AttributeNotDefined, RTIinternalError, SecurityError) |
Subscribes a federate to a set of attributes with a region.
Sends the discovery messages if necessary.
federate | Federate to subscribe | |
class_handle | Class to be subscribed | |
attributes | List of attributes to be subscribed | |
nb | Number of attributes | |
region | Subscription region (0 for default) |
Definition at line 402 of file ObjectClassSet.cc.
References certi::fedparser::federate, TreeNamedAndHandledSet::getObjectFromHandle(), ObjectClass::recursiveDiscovering(), and ObjectClass::subscribe().
Referenced by Federation::subscribeAttributesWR(), and Federation::subscribeObject().
void deleteObject | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
FederationTime | theTime, | |||
std::string | theTag | |||
) | throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError) |
deleteObject with time.
Definition at line 76 of file ObjectClassSet.cc.
References ObjectClass::broadcastClassMessage(), certi::D, ObjectClass::deleteInstance(), certi::fedparser::federate, ObjectClass::getHandle(), ObjectClassSet::getInstanceClass(), TreeNamedAndHandledSet::getObjectFromHandle(), ObjectClass::getSuperclass(), PrettyDebug::Out(), and pdRegister.
Referenced by RootObject::deleteObjectInstance().
void deleteObject | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::string | theTag | |||
) | throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError) |
deleteObject without time.
Definition at line 119 of file ObjectClassSet.cc.
References ObjectClass::broadcastClassMessage(), certi::D, ObjectClass::deleteInstance(), certi::fedparser::federate, ObjectClass::getHandle(), ObjectClassSet::getInstanceClass(), TreeNamedAndHandledSet::getObjectFromHandle(), ObjectClass::getSuperclass(), PrettyDebug::Out(), and pdRegister.
void registerObjectInstance | ( | FederateHandle | the_federate, | |
Object * | the_object, | |||
ObjectClassHandle | the_class | |||
) | throw (InvalidObjectHandle, ObjectClassNotDefined, ObjectClassNotPublished, ObjectAlreadyRegistered, RTIinternalError) |
registerInstance.
Definition at line 348 of file ObjectClassSet.cc.
References ObjectClass::broadcastClassMessage(), certi::D, TreeNamedAndHandledSet::getObjectFromHandle(), ObjectClass::getSuperclass(), PrettyDebug::Out(), pdRegister, and ObjectClass::registerObjectInstance().
Referenced by RootObject::registerObjectInstance().
void updateAttributeValues | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttribArray, | |||
std::vector< AttributeValue_t > & | theValueArray, | |||
UShort | theArraySize, | |||
FederationTime | theTime, | |||
const char * | theUserTag | |||
) | throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError, InvalidObjectHandle) |
updateAttributeValues with time
Definition at line 421 of file ObjectClassSet.cc.
References ObjectClass::broadcastClassMessage(), certi::D, certi::fedparser::federate, Object::getClass(), ObjectClass::getHandle(), ObjectClassSet::getObject(), TreeNamedAndHandledSet::getObjectFromHandle(), ObjectClass::getSuperclass(), PrettyDebug::Out(), pdProtocol, and ObjectClass::updateAttributeValues().
Referenced by Federation::updateAttributeValues().
void updateAttributeValues | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttribArray, | |||
std::vector< AttributeValue_t > & | theValueArray, | |||
UShort | theArraySize, | |||
const char * | theUserTag | |||
) | throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError, InvalidObjectHandle) |
updateAttributeValues without time
Definition at line 467 of file ObjectClassSet.cc.
References ObjectClass::broadcastClassMessage(), certi::D, certi::fedparser::federate, Object::getClass(), ObjectClass::getHandle(), ObjectClassSet::getObject(), TreeNamedAndHandledSet::getObjectFromHandle(), ObjectClass::getSuperclass(), PrettyDebug::Out(), pdProtocol, and ObjectClass::updateAttributeValues().
void negotiatedAttributeOwnershipDivestiture | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize, | |||
const char * | theTag | |||
) | throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, AttributeAlreadyBeingDivested, RTIinternalError) |
negotiatedAttributeOwnershipDivestiture.
Definition at line 513 of file ObjectClassSet.cc.
References ObjectClass::broadcastClassMessage(), certi::D, ObjectClass::getHandle(), ObjectClassSet::getInstanceClass(), TreeNamedAndHandledSet::getObjectFromHandle(), ObjectClass::getSuperclass(), ObjectClass::negotiatedAttributeOwnershipDivestiture(), PrettyDebug::Out(), and pdProtocol.
Referenced by Federation::negotiateDivestiture().
void attributeOwnershipAcquisitionIfAvailable | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize | |||
) | throw (ObjectNotKnown, ObjectClassNotPublished, AttributeNotDefined, AttributeNotPublished, FederateOwnsAttributes, AttributeAlreadyBeingAcquired, RTIinternalError) |
attributeOwnershipAcquisitionIfAvailable.
Definition at line 559 of file ObjectClassSet.cc.
References ObjectClass::attributeOwnershipAcquisitionIfAvailable(), and ObjectClassSet::getInstanceClass().
Referenced by Federation::acquireIfAvailable().
void unconditionalAttributeOwnershipDivestiture | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize | |||
) | throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError) |
unconditionalAttributeOwnershipDivestiture
Definition at line 585 of file ObjectClassSet.cc.
References ObjectClass::broadcastClassMessage(), certi::D, ObjectClass::getHandle(), ObjectClassSet::getInstanceClass(), TreeNamedAndHandledSet::getObjectFromHandle(), ObjectClass::getSuperclass(), PrettyDebug::Out(), and pdProtocol.
Referenced by Federation::divest().
void attributeOwnershipAcquisition | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize, | |||
const char * | theTag | |||
) | throw (ObjectNotKnown, ObjectClassNotPublished, AttributeNotDefined, AttributeNotPublished, FederateOwnsAttributes, RTIinternalError) |
attributeOwnershipAcquisition.
Definition at line 628 of file ObjectClassSet.cc.
References ObjectClass::attributeOwnershipAcquisition(), and ObjectClassSet::getInstanceClass().
Referenced by Federation::acquire().
AttributeHandleSet * attributeOwnershipReleaseResponse | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize | |||
) | throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, FederateWasNotAskedToReleaseAttribute, RTIinternalError) |
attributeOwnershipReleaseResponse.
Definition at line 654 of file ObjectClassSet.cc.
References ObjectClass::attributeOwnershipReleaseResponse(), and ObjectClassSet::getInstanceClass().
Referenced by Federation::respondRelease().
void cancelAttributeOwnershipAcquisition | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize | |||
) | throw (ObjectNotKnown, AttributeNotDefined, AttributeAlreadyOwned, AttributeAcquisitionWasNotRequested, RTIinternalError) |
cancelAttributeOwnershipAcquisition.
Definition at line 677 of file ObjectClassSet.cc.
References ObjectClass::cancelAttributeOwnershipAcquisition(), and ObjectClassSet::getInstanceClass().
Referenced by Federation::cancelAcquisition().
Object * getObject | ( | ObjectHandle | h | ) | const throw (ObjectNotKnown) |
Get object.
Definition at line 238 of file ObjectClassSet.cc.
References TreeNamedAndHandledSet::fromHandle.
Referenced by ObjectClassSet::updateAttributeValues().
ObjectClass * getInstanceClass | ( | ObjectHandle | theObjectHandle | ) | const throw (ObjectNotKnown) [private] |
getInstanceClass.
Definition at line 218 of file ObjectClassSet.cc.
References certi::D, TreeNamedAndHandledSet::fromHandle, PrettyDebug::Out(), and pdExcept.
Referenced by ObjectClassSet::attributeOwnershipAcquisition(), ObjectClassSet::attributeOwnershipAcquisitionIfAvailable(), ObjectClassSet::attributeOwnershipReleaseResponse(), ObjectClassSet::cancelAttributeOwnershipAcquisition(), ObjectClassSet::deleteObject(), ObjectClassSet::negotiatedAttributeOwnershipDivestiture(), and ObjectClassSet::unconditionalAttributeOwnershipDivestiture().
SecurityServer* server [private] |
This object will help to find the TCPLink associated with a Federate.
This reference is passed to all new ObjectClass.
Definition at line 187 of file ObjectClassSet.hh.
Referenced by ObjectClassSet::addClass(), and ObjectClassSet::ObjectClassSet().