#include <ObjectClass.hh>
Public Types | |
typedef ObjectClassHandle | handle_t |
The type of the handle of this class. | |
typedef ObjectClassNotDefined | ObjectNotDefinedException |
The type of the exception to when such object is not found. | |
typedef std::list < ObjectClassAttribute * > | AttributeList_t |
The type fot the attribute list. | |
Public Member Functions | |
ObjectClass (const std::string name, ObjectClassHandle handle) | |
Create an objectClass. | |
~ObjectClass () | |
Destroy an object class. | |
void | display () const |
Print the ObjectClasses tree to the standard output. | |
ObjectClassHandle | getHandle () const |
Get the handle for this object class. | |
ObjectClassHandle | getSuperclass () const |
Get the super class handle. | |
void | addSubClass (ObjectClass *child) |
Add a subclass to this object class. | |
ObjectClass * | getSubClassByName (const std::string subClassName) |
Retrieve a sub class by its name. | |
ObjectClassSet * | getSubClasses () |
Get the whole set of subclasses. | |
void | checkFederateAccess (FederateHandle, const char *) throw (SecurityError) |
SecurityLevelID | getSecurityLevelId () const |
void | setSecurityLevelId (SecurityLevelID newLevelID) throw (SecurityError) |
AttributeHandle | addAttribute (ObjectClassAttribute *the_attribute, bool is_inherited=false) |
To be used only by CRead, it returns the new Attribute's Handle. | |
void | publish (FederateHandle theFederateHandle, std::vector< AttributeHandle > &theAttributeList, UShort theListSize, bool PubOrUnpub) throw (AttributeNotDefined, RTIinternalError, SecurityError) |
publish. | |
bool | subscribe (FederateHandle, std::vector< AttributeHandle > &, int, const RTIRegion *) throw (AttributeNotDefined, RTIinternalError, SecurityError) |
Subscribes a federate to some of this class attributes, with a particular region. | |
void | unsubscribe (FederateHandle, const RTIRegion *) |
Unsubscribe this federate/region pair. | |
void | unsubscribe (FederateHandle) |
Unsubscribe this federate, for all regions currently subscribed. | |
ObjectClassBroadcastList * | negotiatedAttributeOwnershipDivestiture (FederateHandle theFederateHandle, ObjectHandle theObjectHandle, std::vector< AttributeHandle > &theAttributeList, UShort theListSize, const char *theTag) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, AttributeAlreadyBeingDivested, RTIinternalError) |
negotiatedAttributeOwnershipDivestiture. | |
void | attributeOwnershipAcquisitionIfAvailable (FederateHandle theFederateHandle, ObjectHandle theObjectHandle, std::vector< AttributeHandle > &theAttributeList, UShort theListSize) throw (ObjectNotKnown, ObjectClassNotPublished, AttributeNotDefined, AttributeNotPublished, FederateOwnsAttributes, AttributeAlreadyBeingAcquired, RTIinternalError) |
attributeOwnershipAcquisitionIfAvailable. | |
ObjectClassBroadcastList * | unconditionalAttributeOwnershipDivestiture (FederateHandle, ObjectHandle theObjectHandle, 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 theFederateHandle, ObjectHandle theObjectHandle, std::vector< AttributeHandle > &theAttributeList, UShort theListSize) 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. | |
AttributeHandle | getAttributeHandle (const char *theName) const throw (NameNotFound, RTIinternalError) |
getAttributeHandle. | |
const char * | getAttributeName (AttributeHandle theHandle) const throw (AttributeNotDefined, RTIinternalError) |
getAttributeName. | |
ObjectClassBroadcastList * | killFederate (FederateHandle theFederate) throw () |
killFederate. | |
ObjectClassAttribute * | getAttribute (AttributeHandle the_handle) const throw (AttributeNotDefined) |
Get attribute. | |
ObjectClassBroadcastList * | deleteInstance (FederateHandle theFederateHandle, ObjectHandle theObjectHandle, FederationTime theTime, std::string theUserTag) throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError) |
ObjectClassBroadcastList * | deleteInstance (FederateHandle theFederateHandle, ObjectHandle theObjectHandle, std::string theUserTag) throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError) |
bool | isInstanceInClass (ObjectHandle theID) |
ObjectClassBroadcastList * | registerObjectInstance (FederateHandle, Object *, ObjectClassHandle) throw (ObjectClassNotPublished, ObjectAlreadyRegistered, RTIinternalError) |
void | broadcastClassMessage (ObjectClassBroadcastList *ocb_list, const Object *=NULL) |
ObjectClassBroadcastList * | updateAttributeValues (FederateHandle, Object *, std::vector< AttributeHandle > &, std::vector< AttributeValue_t > &, int, FederationTime, const char *) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError, InvalidObjectHandle) |
update Attribute Values with time. | |
ObjectClassBroadcastList * | updateAttributeValues (FederateHandle, Object *, std::vector< AttributeHandle > &, std::vector< AttributeValue_t > &, int, const char *) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError, InvalidObjectHandle) |
update Attribute Values without time. | |
void | recursiveDiscovering (FederateHandle, ObjectClassHandle) throw (ObjectClassNotDefined) |
Recursively start discovery of existing objects. | |
Object * | getInstanceWithID (ObjectHandle the_id) const throw (ObjectNotKnown) |
Get Object. | |
AttributeList_t | getAttributeList (void) |
Getter for the attribute list of the object class. | |
Public Attributes | |
SecurityServer * | server |
This Object help to find a TCPLink from a Federate Handle. | |
Private Member Functions | |
ObjectClass () | |
void | addInheritedClassAttributes (ObjectClass *child) |
Add the class' attributes to the 'Child' Class. | |
void | sendToFederate (NetworkMessage *msg, FederateHandle theFederate) |
sendToFederate. | |
void | sendToOwners (CDiffusion *diffusionList, ObjectHandle theObjectHandle, FederateHandle theFederate, const char *theTag, NetworkMessage::Type type) |
sendToOwners. | |
void | sendMessage (NetworkMessage *msg, FederateHandle theDest) |
bool | isFederatePublisher (FederateHandle the_federate) const |
Return true if the Federate is publishing any attribute of this class. | |
bool | isSubscribed (FederateHandle) const |
Indicates whether a federate subscribed to this class, with any attribute and any region. | |
bool | sendDiscoverMessages (FederateHandle, ObjectClassHandle) |
Send a "Discover Object" message to a federate for each object of this class, if the federate was not already subscribed. | |
Private Attributes | |
ObjectClassHandle | handle |
FederateHandle | maxSubscriberHandle |
SecurityLevelID | securityLevelId |
greatest subscriber handle | |
std::list< ObjectClassAttribute * > | attributeSet |
std::list< Object * > | objectSet |
ObjectClassHandle | superClass |
The super class handle. | |
ObjectClassSet * | subClasses |
The set of object classes sub classes of this object class. | |
MessageBuffer | NM_msgBufSend |
It also contains:
Definition at line 74 of file ObjectClass.hh.
typedef ObjectClassHandle handle_t |
typedef ObjectClassNotDefined ObjectNotDefinedException |
The type of the exception to when such object is not found.
Definition at line 85 of file ObjectClass.hh.
typedef std::list<ObjectClassAttribute*> AttributeList_t |
ObjectClass | ( | const std::string | name, | |
ObjectClassHandle | handle | |||
) |
Create an objectClass.
[in] | name | the object class name |
[in] | handle | the object class handle value |
Definition at line 289 of file ObjectClass.cc.
References ObjectClass::subClasses.
~ObjectClass | ( | ) |
Destroy an object class.
ObjectClass destructor (frees allocated memory).
Definition at line 298 of file ObjectClass.cc.
References ObjectClass::attributeSet, certi::D, ObjectClass::handle, ObjectClass::objectSet, PrettyDebug::Out(), pdError, and ObjectClass::subClasses.
ObjectClass | ( | ) | [private] |
void display | ( | ) | const |
Print the ObjectClasses tree to the standard output.
Definition at line 453 of file ObjectClass.cc.
References ObjectClass::attributeSet, TreeNamedAndHandledSet::begin(), TreeNamedAndHandledSet::end(), ObjectClass::handle, Named::name, ObjectClass::objectSet, ObjectClass::securityLevelId, TreeNamedAndHandledSet::size(), ObjectClass::subClasses, and ObjectClass::superClass.
ObjectClassHandle getHandle | ( | ) | const |
Get the handle for this object class.
Definition at line 1736 of file ObjectClass.cc.
References ObjectClass::handle.
Referenced by ObjectClass::addInheritedClassAttributes(), ObjectClassSet::deleteObject(), ObjectClassSet::negotiatedAttributeOwnershipDivestiture(), ObjectClassSet::unconditionalAttributeOwnershipDivestiture(), and ObjectClassSet::updateAttributeValues().
ObjectClassHandle getSuperclass | ( | ) | const [inline] |
Get the super class handle.
Definition at line 116 of file ObjectClass.hh.
Referenced by ObjectClassSet::deleteObject(), ObjectClassSet::negotiatedAttributeOwnershipDivestiture(), ObjectClassSet::registerObjectInstance(), ObjectClassSet::unconditionalAttributeOwnershipDivestiture(), and ObjectClassSet::updateAttributeValues().
void addSubClass | ( | ObjectClass * | child | ) |
Add a subclass to this object class.
[in] | child | the new child object class |
Definition at line 1773 of file ObjectClass.cc.
References ObjectClassSet::addClass(), ObjectClass::addInheritedClassAttributes(), ObjectClass::handle, ObjectClass::securityLevelId, ObjectClass::server, ObjectClass::setSecurityLevelId(), ObjectClass::subClasses, and ObjectClass::superClass.
ObjectClass* getSubClassByName | ( | const std::string | subClassName | ) |
Retrieve a sub class by its name.
[in] | subClassName | the name of the subclass |
ObjectClassSet* getSubClasses | ( | ) | [inline] |
void checkFederateAccess | ( | FederateHandle | the_federate, | |
const char * | reason | |||
) | throw (SecurityError) |
Throw SecurityError if the Federate is not allowed to access the Object Class, and print an Audit message containing reason.
Definition at line 267 of file ObjectClass.cc.
References SecurityServer::canFederateAccessData(), certi::D, ObjectClass::handle, PrettyDebug::Out(), pdInit, ObjectClass::securityLevelId, and ObjectClass::server.
Referenced by ObjectClass::publish(), and ObjectClass::subscribe().
SecurityLevelID getSecurityLevelId | ( | ) | const [inline] |
Definition at line 139 of file ObjectClass.hh.
void setSecurityLevelId | ( | SecurityLevelID | newLevelID | ) | throw (SecurityError) |
Definition at line 832 of file ObjectClass.cc.
References SecurityServer::dominates(), ObjectClass::securityLevelId, and ObjectClass::server.
Referenced by ObjectClass::addSubClass().
AttributeHandle addAttribute | ( | ObjectClassAttribute * | the_attribute, | |
bool | is_inherited = false | |||
) |
To be used only by CRead, it returns the new Attribute's Handle.
Definition at line 62 of file ObjectClass.cc.
References ObjectClass::attributeSet, certi::D, ObjectClassAttribute::getHandle(), ObjectClass::handle, ObjectClassAttribute::level, PrettyDebug::Out(), pdProtocol, ObjectClass::securityLevelId, ObjectClass::server, ObjectClassAttribute::server, and ObjectClassAttribute::setHandle().
Referenced by ObjectClass::addInheritedClassAttributes().
void publish | ( | FederateHandle | theFederateHandle, | |
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize, | |||
bool | PubOrUnpub | |||
) | throw (AttributeNotDefined, RTIinternalError, SecurityError) |
publish.
Definition at line 656 of file ObjectClass.cc.
References certi::fedparser::attribute, ObjectClass::attributeSet, ObjectClass::checkFederateAccess(), certi::D, ObjectClass::getAttribute(), ObjectClass::handle, PrettyDebug::Out(), pdInit, ObjectClassAttribute::publish(), and ObjectClassAttribute::unpublish().
Referenced by ObjectClass::killFederate(), and ObjectClassSet::publish().
bool subscribe | ( | FederateHandle | fed, | |
std::vector< AttributeHandle > & | attributes, | |||
int | nb_attributes, | |||
const RTIRegion * | region | |||
) | throw (AttributeNotDefined, RTIinternalError, SecurityError) |
Subscribes a federate to some of this class attributes, with a particular region.
fed | Federate to subscribe | |
attributes | Begining of the attribute-handle list | |
nb_attributes | Number of attributes in the list | |
region | Subscription region. Use 0 for default region. |
Definition at line 851 of file ObjectClass.cc.
References ObjectClass::checkFederateAccess(), certi::D, ObjectClass::getAttribute(), ObjectClass::handle, ObjectClass::isSubscribed(), ObjectClass::maxSubscriberHandle, pdTrace, Subscribable::subscribe(), and ObjectClass::unsubscribe().
Referenced by ObjectClassSet::subscribe().
void unsubscribe | ( | FederateHandle | fed, | |
const RTIRegion * | region | |||
) |
Unsubscribe this federate/region pair.
Definition at line 1745 of file ObjectClass.cc.
References ObjectClass::attributeSet, certi::D, Handled::getHandle(), and pdTrace.
Referenced by ObjectClass::killFederate(), ObjectClass::subscribe(), and Federation::unsubscribeAttributesWR().
void unsubscribe | ( | FederateHandle | fed | ) |
Unsubscribe this federate, for all regions currently subscribed.
Definition at line 1762 of file ObjectClass.cc.
References ObjectClass::attributeSet.
ObjectClassBroadcastList * negotiatedAttributeOwnershipDivestiture | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize, | |||
const char * | theTag | |||
) | throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, AttributeAlreadyBeingDivested, RTIinternalError) |
negotiatedAttributeOwnershipDivestiture.
Definition at line 1012 of file ObjectClass.cc.
References NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION, ObjectClass::attributeSet, ObjectAttribute::beingDivested(), ObjectClass::broadcastClassMessage(), NM_Factory::create(), certi::D, CDiffusion::DiffArray, certi::e_NO_EXCEPTION, NetworkMessage::federate, SecurityServer::federation(), NetworkMessage::federation, ObjectClass::getAttribute(), ObjectAttribute::getCandidate(), ObjectAttribute::getHandle(), ObjectClass::getInstanceWithID(), Named::getName(), ObjectAttribute::getOwner(), ObjectClass::handle, NetworkMessage::handleArray, NetworkMessage::handleArraySize, ObjectAttribute::hasCandidates(), Named::isNamed(), NetworkMessage::object, PrettyDebug::Out(), pdDebug, pdExcept, pdProtocol, ObjectAttribute::removeCandidate(), NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION, ObjectClass::sendToFederate(), ObjectClass::sendToOwners(), ObjectClass::server, ObjectAttribute::setDivesting(), NetworkMessage::setLabel(), ObjectAttribute::setOwner(), and CDiffusion::size.
Referenced by ObjectClassSet::negotiatedAttributeOwnershipDivestiture().
void attributeOwnershipAcquisitionIfAvailable | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize | |||
) | throw (ObjectNotKnown, ObjectClassNotPublished, AttributeNotDefined, AttributeNotPublished, FederateOwnsAttributes, AttributeAlreadyBeingAcquired, RTIinternalError) |
attributeOwnershipAcquisitionIfAvailable.
Definition at line 1163 of file ObjectClass.cc.
References ObjectAttribute::addCandidate(), NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION, NetworkMessage::ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION, NetworkMessage::ATTRIBUTE_OWNERSHIP_UNAVAILABLE, ObjectAttribute::beingDivested(), NM_Factory::create(), certi::D, CDiffusion::DiffArray, certi::e_NO_EXCEPTION, NetworkMessage::federate, SecurityServer::federation(), NetworkMessage::federation, ObjectClass::getAttribute(), ObjectAttribute::getHandle(), ObjectClass::getInstanceWithID(), ObjectAttribute::getOwner(), NetworkMessage::handleArray, NetworkMessage::handleArraySize, ObjectAttribute::isCandidate(), ObjectClass::isFederatePublisher(), Named::isNamed(), ObjectClassAttribute::isPublishing(), NetworkMessage::object, PrettyDebug::Out(), pdDebug, pdExcept, ObjectClass::sendToFederate(), ObjectClass::sendToOwners(), ObjectClass::server, ObjectAttribute::setDivesting(), Object::setOwner(), ObjectAttribute::setOwner(), and CDiffusion::size.
Referenced by ObjectClassSet::attributeOwnershipAcquisitionIfAvailable().
ObjectClassBroadcastList * unconditionalAttributeOwnershipDivestiture | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize | |||
) | throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError) |
unconditionalAttributeOwnershipDivestiture.
Definition at line 1306 of file ObjectClass.cc.
References NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION, ObjectClass::attributeSet, ObjectClass::broadcastClassMessage(), certi::D, CDiffusion::DiffArray, certi::e_NO_EXCEPTION, NetworkMessage::federate, SecurityServer::federation(), NetworkMessage::federation, ObjectClass::getAttribute(), ObjectAttribute::getCandidate(), ObjectAttribute::getHandle(), ObjectClass::getInstanceWithID(), ObjectAttribute::getOwner(), ObjectClass::handle, NetworkMessage::handleArray, NetworkMessage::handleArraySize, ObjectAttribute::hasCandidates(), Named::isNamed(), NetworkMessage::object, PrettyDebug::Out(), pdExcept, pdProtocol, ObjectAttribute::removeCandidate(), ObjectClass::sendToOwners(), ObjectClass::server, ObjectAttribute::setDivesting(), NetworkMessage::setLabel(), ObjectAttribute::setOwner(), and CDiffusion::size.
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 1428 of file ObjectClass.cc.
References ObjectAttribute::addCandidate(), NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION, NetworkMessage::ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION, ObjectAttribute::beingDivested(), NM_Factory::create(), certi::D, CDiffusion::DiffArray, certi::e_NO_EXCEPTION, NetworkMessage::federate, SecurityServer::federation(), NetworkMessage::federation, ObjectClass::getAttribute(), ObjectAttribute::getHandle(), ObjectClass::getInstanceWithID(), ObjectAttribute::getOwner(), NetworkMessage::handleArray, NetworkMessage::handleArraySize, ObjectAttribute::isCandidate(), ObjectClass::isFederatePublisher(), Named::isNamed(), ObjectClassAttribute::isPublishing(), NetworkMessage::object, PrettyDebug::Out(), pdExcept, ObjectAttribute::removeCandidate(), NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE, ObjectClass::sendToFederate(), ObjectClass::sendToOwners(), ObjectClass::server, ObjectAttribute::setDivesting(), Object::setOwner(), ObjectAttribute::setOwner(), and CDiffusion::size.
Referenced by ObjectClassSet::attributeOwnershipAcquisition().
AttributeHandleSet * attributeOwnershipReleaseResponse | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize | |||
) | throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, FederateWasNotAskedToReleaseAttribute, RTIinternalError) |
attributeOwnershipReleaseResponse.
Definition at line 1566 of file ObjectClass.cc.
References AttributeHandleSet::add(), NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION, certi::D, CDiffusion::DiffArray, ObjectClass::getAttribute(), ObjectAttribute::getCandidate(), ObjectAttribute::getHandle(), ObjectClass::getInstanceWithID(), ObjectAttribute::getOwner(), ObjectAttribute::hasCandidates(), Named::isNamed(), PrettyDebug::Out(), pdDebug, pdExcept, ObjectAttribute::removeCandidate(), ObjectClass::sendToOwners(), ObjectClass::server, ObjectAttribute::setDivesting(), Object::setOwner(), ObjectAttribute::setOwner(), and CDiffusion::size.
Referenced by ObjectClassSet::attributeOwnershipReleaseResponse().
void cancelAttributeOwnershipAcquisition | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::vector< AttributeHandle > & | theAttributeList, | |||
UShort | theListSize | |||
) | throw (ObjectNotKnown, AttributeNotDefined, AttributeAlreadyOwned, AttributeAcquisitionWasNotRequested, RTIinternalError) |
cancelAttributeOwnershipAcquisition.
Definition at line 1658 of file ObjectClass.cc.
References NetworkMessage::CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION, NM_Factory::create(), certi::D, certi::e_NO_EXCEPTION, NetworkMessage::federate, SecurityServer::federation(), NetworkMessage::federation, ObjectClass::getAttribute(), ObjectClass::getInstanceWithID(), ObjectAttribute::getOwner(), NetworkMessage::handleArray, NetworkMessage::handleArraySize, ObjectAttribute::isCandidate(), NetworkMessage::object, PrettyDebug::Out(), pdDebug, pdExcept, ObjectAttribute::removeCandidate(), ObjectClass::sendToFederate(), and ObjectClass::server.
Referenced by ObjectClassSet::cancelAttributeOwnershipAcquisition().
AttributeHandle getAttributeHandle | ( | const char * | theName | ) | const throw (NameNotFound, RTIinternalError) |
getAttributeHandle.
Definition at line 486 of file ObjectClass.cc.
References ObjectClass::attributeSet, certi::D, certi::G, ObjectClass::handle, PrettyDebug::Out(), pdExcept, and pdGendoc.
Referenced by ObjectClassSet::getAttributeHandle().
const char * getAttributeName | ( | AttributeHandle | theHandle | ) | const throw (AttributeNotDefined, RTIinternalError) |
getAttributeName.
Definition at line 508 of file ObjectClass.cc.
References ObjectClass::getAttribute(), and Named::getCName().
Referenced by ObjectClassSet::getAttributeName().
ObjectClassBroadcastList * killFederate | ( | FederateHandle | theFederate | ) | throw () |
killFederate.
Definition at line 611 of file ObjectClass.cc.
References certi::D, ObjectClass::deleteInstance(), ObjectClass::handle, ObjectClass::isFederatePublisher(), ObjectClass::isSubscribed(), ObjectClass::objectSet, PrettyDebug::Out(), pdRegister, ObjectClass::publish(), and ObjectClass::unsubscribe().
ObjectClassAttribute * getAttribute | ( | AttributeHandle | the_handle | ) | const throw (AttributeNotDefined) |
Get attribute.
the_handle | Attribute's handle |
Definition at line 522 of file ObjectClass.cc.
References ObjectClass::attributeSet, certi::D, ObjectClass::handle, PrettyDebug::Out(), and pdExcept.
Referenced by ObjectClass::attributeOwnershipAcquisition(), ObjectClass::attributeOwnershipAcquisitionIfAvailable(), ObjectClass::attributeOwnershipReleaseResponse(), ObjectClass::broadcastClassMessage(), ObjectClass::cancelAttributeOwnershipAcquisition(), ObjectClass::getAttributeName(), ObjectClass::negotiatedAttributeOwnershipDivestiture(), ObjectClass::publish(), ObjectClass::subscribe(), and ObjectClass::unconditionalAttributeOwnershipDivestiture().
ObjectClassBroadcastList * deleteInstance | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
FederationTime | theTime, | |||
std::string | theUserTag | |||
) | throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError) |
Definition at line 325 of file ObjectClass.cc.
References ObjectClass::broadcastClassMessage(), NM_Factory::create(), certi::D, certi::e_NO_EXCEPTION, NetworkMessage::federate, SecurityServer::federation(), NetworkMessage::federation, ObjectClass::getInstanceWithID(), Object::getOwner(), ObjectClass::handle, NetworkMessage::object, NetworkMessage::objectClass, ObjectClass::objectSet, PrettyDebug::Out(), pdExcept, pdRegister, NetworkMessage::REMOVE_OBJECT, ObjectClass::server, NetworkMessage::setDate(), and NetworkMessage::setLabel().
Referenced by ObjectClassSet::deleteObject(), and ObjectClass::killFederate().
ObjectClassBroadcastList * deleteInstance | ( | FederateHandle | theFederateHandle, | |
ObjectHandle | theObjectHandle, | |||
std::string | theUserTag | |||
) | throw (DeletePrivilegeNotHeld, ObjectNotKnown, RTIinternalError) |
Definition at line 394 of file ObjectClass.cc.
References ObjectClass::broadcastClassMessage(), NM_Factory::create(), certi::D, NetworkMessage::federate, SecurityServer::federation(), NetworkMessage::federation, ObjectClass::getInstanceWithID(), Object::getOwner(), ObjectClass::handle, NetworkMessage::object, NetworkMessage::objectClass, ObjectClass::objectSet, PrettyDebug::Out(), pdExcept, pdRegister, NetworkMessage::REMOVE_OBJECT, ObjectClass::server, and NetworkMessage::setLabel().
bool isInstanceInClass | ( | ObjectHandle | theID | ) |
Return 'true' if the object instance designated by 'theID' is present in that class.
Definition at line 597 of file ObjectClass.cc.
References ObjectClass::getInstanceWithID().
Referenced by ObjectClass::registerObjectInstance().
ObjectClassBroadcastList * registerObjectInstance | ( | FederateHandle | the_federate, | |
Object * | the_object, | |||
ObjectClassHandle | classHandle | |||
) | throw (ObjectClassNotPublished, ObjectAlreadyRegistered, RTIinternalError) |
Register a new object instance, and start to broadcast the DiscoverObject Message to class subscribers. Return a Broadcast List of Federates, in order to allow our ObjectClassSet to go on with the message broadcasting, by giving the list to our parent class.
Definition at line 704 of file ObjectClass.cc.
References ObjectClass::attributeSet, ObjectClass::broadcastClassMessage(), certi::D, certi::e_NO_EXCEPTION, NetworkMessage::federate, SecurityServer::federation(), NetworkMessage::federation, ObjectClass::handle, ObjectClass::isFederatePublisher(), ObjectClass::isInstanceInClass(), NetworkMessage::object, NetworkMessage::objectClass, ObjectClass::objectSet, PrettyDebug::Out(), pdExcept, pdRegister, pdTrace, ObjectClass::server, NetworkMessage::setLabel(), and ObjectAttribute::setOwner().
Referenced by ObjectClassSet::registerObjectInstance().
void broadcastClassMessage | ( | ObjectClassBroadcastList * | ocbList, | |
const Object * | source = NULL | |||
) |
Take a Broadcast List and continue to send messages. You should take a look at ObjectClassSet::RegisterObject to understand what is going on...
Definition at line 116 of file ObjectClass.cc.
References ObjectClassBroadcastList::addFederate(), ObjectClass::attributeSet, certi::D, NetworkMessage::DISCOVER_OBJECT, NetworkMessage::federate, certi::fedparser::federate, certi::G, Object::getAttribute(), ObjectClass::getAttribute(), Handled::getHandle(), ObjectAttribute::getRegion(), NetworkMessage::getType(), ObjectClass::handle, NetworkMessage::handleArray, NetworkMessage::handleArraySize, ObjectClass::isSubscribed(), ObjectClass::maxSubscriberHandle, ObjectClassBroadcastList::message, NetworkMessage::objectClass, PrettyDebug::Out(), pdGendoc, pdTrace, NetworkMessage::REFLECT_ATTRIBUTE_VALUES, NetworkMessage::REMOVE_OBJECT, NetworkMessage::removeAttribute(), NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION, ObjectClassBroadcastList::sendPendingMessage(), and ObjectClass::server.
Referenced by ObjectClass::deleteInstance(), ObjectClassSet::deleteObject(), ObjectClassSet::negotiatedAttributeOwnershipDivestiture(), ObjectClass::negotiatedAttributeOwnershipDivestiture(), ObjectClassSet::registerObjectInstance(), ObjectClass::registerObjectInstance(), ObjectClassSet::unconditionalAttributeOwnershipDivestiture(), ObjectClass::unconditionalAttributeOwnershipDivestiture(), ObjectClassSet::updateAttributeValues(), and ObjectClass::updateAttributeValues().
ObjectClassBroadcastList * updateAttributeValues | ( | FederateHandle | the_federate, | |
Object * | object, | |||
std::vector< AttributeHandle > & | the_attributes, | |||
std::vector< AttributeValue_t > & | the_values, | |||
int | the_size, | |||
FederationTime | the_time, | |||
const char * | the_tag | |||
) | throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError, InvalidObjectHandle) |
update Attribute Values with time.
Definition at line 884 of file ObjectClass.cc.
References ObjectClass::attributeSet, ObjectClass::broadcastClassMessage(), NM_Factory::create(), certi::D, certi::e_NO_EXCEPTION, NetworkMessage::federate, SecurityServer::federation(), NetworkMessage::federation, ObjectAttribute::getOwner(), ObjectClass::handle, NetworkMessage::handleArray, NetworkMessage::handleArraySize, NetworkMessage::object, PrettyDebug::Out(), pdExcept, pdProtocol, NetworkMessage::REFLECT_ATTRIBUTE_VALUES, ObjectClass::server, NetworkMessage::setDate(), NetworkMessage::setLabel(), NetworkMessage::sizeValueArray(), and NetworkMessage::valueArray.
Referenced by ObjectClassSet::updateAttributeValues().
ObjectClassBroadcastList * updateAttributeValues | ( | FederateHandle | the_federate, | |
Object * | object, | |||
std::vector< AttributeHandle > & | the_attributes, | |||
std::vector< AttributeValue_t > & | the_values, | |||
int | the_size, | |||
const char * | the_tag | |||
) | throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError, InvalidObjectHandle) |
update Attribute Values without time.
Definition at line 948 of file ObjectClass.cc.
References ObjectClass::attributeSet, ObjectClass::broadcastClassMessage(), NM_Factory::create(), certi::D, certi::e_NO_EXCEPTION, NetworkMessage::federate, SecurityServer::federation(), NetworkMessage::federation, ObjectAttribute::getOwner(), ObjectClass::handle, NetworkMessage::handleArray, NetworkMessage::handleArraySize, NetworkMessage::object, PrettyDebug::Out(), pdExcept, pdProtocol, NetworkMessage::REFLECT_ATTRIBUTE_VALUES, ObjectClass::server, NetworkMessage::setLabel(), NetworkMessage::sizeValueArray(), and NetworkMessage::valueArray.
void recursiveDiscovering | ( | FederateHandle | federate, | |
ObjectClassHandle | subscription | |||
) | throw (ObjectClassNotDefined) |
Recursively start discovery of existing objects.
federate | FederateHandle to send the discovery message to | |
subscription | ObjectClassHandle of the class actually subscribed by the federate |
Definition at line 1796 of file ObjectClass.cc.
References TreeNamedAndHandledSet::begin(), certi::D, TreeNamedAndHandledSet::end(), certi::fedparser::federate, ObjectClass::handle, pdInit, ObjectClass::sendDiscoverMessages(), and ObjectClass::subClasses.
Referenced by ObjectClassSet::subscribe().
Object * getInstanceWithID | ( | ObjectHandle | the_id | ) | const throw (ObjectNotKnown) |
Get Object.
Definition at line 540 of file ObjectClass.cc.
References certi::D, ObjectClass::handle, ObjectClass::objectSet, and pdError.
Referenced by ObjectClass::attributeOwnershipAcquisition(), ObjectClass::attributeOwnershipAcquisitionIfAvailable(), ObjectClass::attributeOwnershipReleaseResponse(), ObjectClass::cancelAttributeOwnershipAcquisition(), ObjectClass::deleteInstance(), ObjectClass::isInstanceInClass(), ObjectClass::negotiatedAttributeOwnershipDivestiture(), and ObjectClass::unconditionalAttributeOwnershipDivestiture().
ObjectClass::AttributeList_t getAttributeList | ( | void | ) |
Getter for the attribute list of the object class.
Apply a visitor object to the class hierarchy.
param[out] AttributeList_t
v | Visitor, its execute() function is called with current object, and is expected to return 'true' if the process should continue on subclasses |
Definition at line 1832 of file ObjectClass.cc.
References ObjectClass::attributeSet.
Referenced by Federation::subscribeObject().
void addInheritedClassAttributes | ( | ObjectClass * | child | ) | [private] |
Add the class' attributes to the 'Child' Class.
Definition at line 87 of file ObjectClass.cc.
References ObjectClass::addAttribute(), ObjectClass::attributeSet, certi::D, ObjectClassAttribute::getHandle(), ObjectClass::getHandle(), ObjectClass::handle, PrettyDebug::Out(), and pdProtocol.
Referenced by ObjectClass::addSubClass().
void sendToFederate | ( | NetworkMessage * | msg, | |
FederateHandle | theFederate | |||
) | [private] |
sendToFederate.
Definition at line 200 of file ObjectClass.cc.
References certi::BEST_EFFORT, certi::D, SecurityServer::getSocketLink(), ObjectClass::NM_msgBufSend, PrettyDebug::Out(), pdExcept, NetworkMessage::send(), and ObjectClass::server.
Referenced by ObjectClass::attributeOwnershipAcquisition(), ObjectClass::attributeOwnershipAcquisitionIfAvailable(), ObjectClass::cancelAttributeOwnershipAcquisition(), ObjectClass::negotiatedAttributeOwnershipDivestiture(), and ObjectClass::sendToOwners().
void sendToOwners | ( | CDiffusion * | diffusionList, | |
ObjectHandle | theObjectHandle, | |||
FederateHandle | theFederate, | |||
const char * | theTag, | |||
NetworkMessage::Type | type | |||
) | [private] |
sendToOwners.
Definition at line 225 of file ObjectClass.cc.
References NM_Factory::create(), certi::D, CDiffusion::DiffArray, SecurityServer::federation(), PrettyDebug::Out(), pdDebug, ObjectClass::sendToFederate(), ObjectClass::server, and CDiffusion::size.
Referenced by ObjectClass::attributeOwnershipAcquisition(), ObjectClass::attributeOwnershipAcquisitionIfAvailable(), ObjectClass::attributeOwnershipReleaseResponse(), ObjectClass::negotiatedAttributeOwnershipDivestiture(), and ObjectClass::unconditionalAttributeOwnershipDivestiture().
void sendMessage | ( | NetworkMessage * | msg, | |
FederateHandle | theDest | |||
) | [private] |
bool isFederatePublisher | ( | FederateHandle | the_federate | ) | const [private] |
Return true if the Federate is publishing any attribute of this class.
Definition at line 563 of file ObjectClass.cc.
References ObjectClass::attributeSet, certi::D, PrettyDebug::Out(), and pdRegister.
Referenced by ObjectClass::attributeOwnershipAcquisition(), ObjectClass::attributeOwnershipAcquisitionIfAvailable(), ObjectClass::killFederate(), and ObjectClass::registerObjectInstance().
bool isSubscribed | ( | FederateHandle | fed | ) | const [private] |
Indicates whether a federate subscribed to this class, with any attribute and any region.
fed | federate to check for subscription |
Definition at line 582 of file ObjectClass.cc.
References ObjectClass::attributeSet.
Referenced by ObjectClass::broadcastClassMessage(), ObjectClass::killFederate(), ObjectClass::sendDiscoverMessages(), and ObjectClass::subscribe().
bool sendDiscoverMessages | ( | FederateHandle | federate, | |
ObjectClassHandle | super_handle | |||
) | [private] |
Send a "Discover Object" message to a federate for each object of this class, if the federate was not already subscribed.
Subclass objects are not considered. Objects may actually be of a superclass.
federate | Federate to send discovery messages to | |
super_handle | Handle of the class of objects to be discovered |
Definition at line 787 of file ObjectClass.cc.
References certi::D, certi::e_NO_EXCEPTION, NetworkMessage::federate, SecurityServer::federation(), NetworkMessage::federation, NetworkMessage::getLabel(), SecurityServer::getSocketLink(), ObjectClass::handle, ObjectClass::isSubscribed(), ObjectClass::NM_msgBufSend, NetworkMessage::object, NetworkMessage::objectClass, ObjectClass::objectSet, PrettyDebug::Out(), pdExcept, pdInit, NetworkMessage::send(), ObjectClass::server, and NetworkMessage::setLabel().
Referenced by ObjectClass::recursiveDiscovering().
This Object help to find a TCPLink from a Federate Handle.
Definition at line 275 of file ObjectClass.hh.
Referenced by ObjectClass::addAttribute(), ObjectClass::addSubClass(), ObjectClass::attributeOwnershipAcquisition(), ObjectClass::attributeOwnershipAcquisitionIfAvailable(), ObjectClass::attributeOwnershipReleaseResponse(), ObjectClass::broadcastClassMessage(), ObjectClass::cancelAttributeOwnershipAcquisition(), ObjectClass::checkFederateAccess(), ObjectClass::deleteInstance(), ObjectClass::negotiatedAttributeOwnershipDivestiture(), ObjectClass::registerObjectInstance(), ObjectClass::sendDiscoverMessages(), ObjectClass::sendToFederate(), ObjectClass::sendToOwners(), ObjectClass::setSecurityLevelId(), ObjectClass::unconditionalAttributeOwnershipDivestiture(), and ObjectClass::updateAttributeValues().
ObjectClassHandle handle [private] |
Definition at line 311 of file ObjectClass.hh.
Referenced by ObjectClass::addAttribute(), ObjectClass::addInheritedClassAttributes(), ObjectClass::addSubClass(), ObjectClass::broadcastClassMessage(), ObjectClass::checkFederateAccess(), ObjectClass::deleteInstance(), ObjectClass::display(), ObjectClass::getAttribute(), ObjectClass::getAttributeHandle(), ObjectClass::getHandle(), ObjectClass::getInstanceWithID(), ObjectClass::killFederate(), ObjectClass::negotiatedAttributeOwnershipDivestiture(), ObjectClass::publish(), ObjectClass::recursiveDiscovering(), ObjectClass::registerObjectInstance(), ObjectClass::sendDiscoverMessages(), ObjectClass::subscribe(), ObjectClass::unconditionalAttributeOwnershipDivestiture(), ObjectClass::updateAttributeValues(), and ObjectClass::~ObjectClass().
FederateHandle maxSubscriberHandle [private] |
Definition at line 312 of file ObjectClass.hh.
Referenced by ObjectClass::broadcastClassMessage(), and ObjectClass::subscribe().
SecurityLevelID securityLevelId [private] |
greatest subscriber handle
The security level ID attached to this object class. default level for non inherited attributes.
Definition at line 317 of file ObjectClass.hh.
Referenced by ObjectClass::addAttribute(), ObjectClass::addSubClass(), ObjectClass::checkFederateAccess(), ObjectClass::display(), and ObjectClass::setSecurityLevelId().
std::list<ObjectClassAttribute *> attributeSet [private] |
Definition at line 318 of file ObjectClass.hh.
Referenced by ObjectClass::addAttribute(), ObjectClass::addInheritedClassAttributes(), ObjectClass::broadcastClassMessage(), ObjectClass::display(), ObjectClass::getAttribute(), ObjectClass::getAttributeHandle(), ObjectClass::getAttributeList(), ObjectClass::isFederatePublisher(), ObjectClass::isSubscribed(), ObjectClass::negotiatedAttributeOwnershipDivestiture(), ObjectClass::publish(), ObjectClass::registerObjectInstance(), ObjectClass::unconditionalAttributeOwnershipDivestiture(), ObjectClass::unsubscribe(), ObjectClass::updateAttributeValues(), and ObjectClass::~ObjectClass().
Definition at line 319 of file ObjectClass.hh.
Referenced by ObjectClass::deleteInstance(), ObjectClass::display(), ObjectClass::getInstanceWithID(), ObjectClass::killFederate(), ObjectClass::registerObjectInstance(), ObjectClass::sendDiscoverMessages(), and ObjectClass::~ObjectClass().
ObjectClassHandle superClass [private] |
The super class handle.
0 if they aren't any.
Definition at line 324 of file ObjectClass.hh.
Referenced by ObjectClass::addSubClass(), and ObjectClass::display().
ObjectClassSet* subClasses [private] |
The set of object classes sub classes of this object class.
Definition at line 328 of file ObjectClass.hh.
Referenced by ObjectClass::addSubClass(), ObjectClass::display(), ObjectClass::ObjectClass(), ObjectClass::recursiveDiscovering(), and ObjectClass::~ObjectClass().
MessageBuffer NM_msgBufSend [private] |
Definition at line 330 of file ObjectClass.hh.
Referenced by ObjectClass::sendDiscoverMessages(), and ObjectClass::sendToFederate().