# ObjectClassAttribute Class Reference

`#include <ObjectClassAttribute.hh>`

Inheritance diagram for ObjectClassAttribute:

[legend]

List of all members.

## Public Types
typedef std::set< FederateHandle > | PublishersList_t
| A set of federate handles.
## Public Member Functions
| ObjectClassAttribute (const std::string theName, TransportType theTransport, OrderType theOrder)
| ObjectClassAttribute (ObjectClassAttribute *source)
| Constructor : Copy Handle, Name, Space, Order and Transport.
virtual | ~ObjectClassAttribute ()
| Destructor.
void | display () const
| Displays the attribute information (handle, name and level id).
void | setHandle (AttributeHandle h)
AttributeHandle | getHandle () const
void | setSpace (SpaceHandle)
SpaceHandle | getSpace () const
virtual void | checkFederateAccess (FederateHandle the_federate, const char *reason) const
bool | isPublishing (FederateHandle) const
| returns true if federate is publishing this attribute
void | publish (FederateHandle) throw (RTIinternalError, SecurityError)
| publish
void | unpublish (FederateHandle) throw (RTIinternalError, SecurityError)
| unpublish
void | updateBroadcastList (ObjectClassBroadcastList *ocb_list, const RTIRegion *region=0)
| Add all attribute's subscribers to the broadcast list.
PublishersList_t | getPublishers (void)
| Getter for the attributes publisher list.
## Public Attributes
SecurityLevelID | level
OrderType | order
TransportType | transport
SecurityServer * | server
## Private Member Functions
| ObjectClassAttribute ()
| No parameters constructor.
void | deletePublisher (FederateHandle)
| Removes a publishing federate.
## Private Attributes
AttributeHandle | handle
| The attribute handle.
SpaceHandle | space
| Routing space.
PublishersList_t | publishers
| The publisher's list.

## Detailed Description

This class descrives an object class attribute (handle, level id, ordering, transportation mode and name). This class also keeps track of published and subscribed federates.

Definition at line 48 of file ObjectClassAttribute.hh.

## Member Typedef Documentation

typedef std::set<FederateHandle> PublishersList_t

A set of federate handles.

The corresponding federates are publishers of the object class attribute.

Definition at line 55 of file ObjectClassAttribute.hh.

## Constructor & Destructor Documentation

ObjectClassAttribute | ( | const std::string | theName,
|  | TransportType | theTransport,
|  | OrderType | theOrder |
| ) |  |  |

Definition at line 43 of file ObjectClassAttribute.cc.

References Named::setName().

Here is the call graph for this function:

ObjectClassAttribute | ( | ObjectClassAttribute * | source | ) |

Constructor : Copy Handle, Name, Space, Order and Transport.

Definition at line 60 of file ObjectClassAttribute.cc.

References ObjectClassAttribute::getHandle(), Named::getName(), ObjectClassAttribute::getSpace(), ObjectClassAttribute::handle, ObjectClassAttribute::level, ObjectClassAttribute::order, ObjectClassAttribute::server, Named::setName(), ObjectClassAttribute::space, and ObjectClassAttribute::transport.

Here is the call graph for this function:

~ObjectClassAttribute | ( |  | ) | `[virtual]`

Destructor.

Definition at line 76 of file ObjectClassAttribute.cc.

ObjectClassAttribute | ( |  | ) | `[private]`

No parameters constructor.

This constructor initialize the attribute with default parameters.

Definition at line 52 of file ObjectClassAttribute.cc.

## Member Function Documentation

void display | ( |  | ) | const

Displays the attribute information (handle, name and level id).

Definition at line 108 of file ObjectClassAttribute.cc.

References ObjectClassAttribute::handle, ObjectClassAttribute::level, and Named::name.

void setHandle | ( | AttributeHandle | h | ) |

Definition at line 166 of file ObjectClassAttribute.cc.

References ObjectClassAttribute::handle.

Referenced by ObjectClass::addAttribute().

AttributeHandle getHandle | ( |  | ) | const`[virtual]`

Implements Subscribable.

Definition at line 173 of file ObjectClassAttribute.cc.

References ObjectClassAttribute::handle.

Referenced by ObjectClass::addAttribute(), certi::fedparser::addAttribute(), ObjectClass::addInheritedClassAttributes(), and ObjectClassAttribute::ObjectClassAttribute().

void setSpace | ( | SpaceHandle | h | ) |

Definition at line 180 of file ObjectClassAttribute.cc.

References ObjectClassAttribute::space.

SpaceHandle getSpace | ( |  | ) | const

Definition at line 187 of file ObjectClassAttribute.cc.

References ObjectClassAttribute::space.

Referenced by ObjectClassAttribute::ObjectClassAttribute().

void checkFederateAccess | ( | FederateHandle | fed,
|  | const char * | reason |
| ) |  |  | const`[virtual]`

Throw SecurityError if the Federate is not allowed to access the Object Class, and print an Audit message containing Reason.

Implements Subscribable.

Definition at line 85 of file ObjectClassAttribute.cc.

References SecurityServer::canFederateAccessData(), ObjectClassAttribute::handle, ObjectClassAttribute::level, and ObjectClassAttribute::server.

Referenced by ObjectClassAttribute::publish().

Here is the call graph for this function:

bool isPublishing | ( | FederateHandle | fed | ) | const

returns true if federate is publishing this attribute

Definition at line 123 of file ObjectClassAttribute.cc.

References ObjectClassAttribute::publishers.

Referenced by ObjectClass::attributeOwnershipAcquisition(), ObjectClass::attributeOwnershipAcquisitionIfAvailable(), ObjectClassAttribute::publish(), and ObjectClassAttribute::unpublish().

void publish | ( | FederateHandle | fed | ) | throw (RTIinternalError, SecurityError)

publish

Definition at line 131 of file ObjectClassAttribute.cc.

References ObjectClassAttribute::checkFederateAccess(), certi::D, ObjectClassAttribute::handle, ObjectClassAttribute::isPublishing(), pdError, pdInit, and ObjectClassAttribute::publishers.

Referenced by ObjectClass::publish().

Here is the call graph for this function:

void unpublish | ( | FederateHandle | fed | ) | throw (RTIinternalError, SecurityError)

unpublish

Definition at line 149 of file ObjectClassAttribute.cc.

References certi::D, ObjectClassAttribute::deletePublisher(), ObjectClassAttribute::handle, ObjectClassAttribute::isPublishing(), pdError, and pdTerm.

Referenced by ObjectClass::publish().

Here is the call graph for this function:

void updateBroadcastList | ( | ObjectClassBroadcastList * | ocb_list,
|  | const RTIRegion * | region = `0` |
| ) |  |  |

Add all attribute's subscribers to the broadcast list.

Definition at line 196 of file ObjectClassAttribute.cc.

References ObjectClassBroadcastList::addFederate(), Subscribable::addFederatesIfOverlap(), NetworkMessage::getType(), ObjectClassAttribute::handle, ObjectClassBroadcastList::message, ObjectClassAttribute::publishers, NetworkMessage::REFLECT_ATTRIBUTE_VALUES, and NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION.

Here is the call graph for this function:

ObjectClassAttribute::PublishersList_t getPublishers | ( | void |  | ) |

Getter for the attributes publisher list.

param[out] PublishersList_t

See also:
  ObjectClassAttribute::PublisherList_t

Definition at line 216 of file ObjectClassAttribute.cc.

References ObjectClassAttribute::publishers.

void deletePublisher | ( | FederateHandle | fed | ) | `[private]`

Removes a publishing federate.

Definition at line 98 of file ObjectClassAttribute.cc.

References ObjectClassAttribute::publishers.

Referenced by ObjectClassAttribute::unpublish().

## Member Data Documentation

SecurityLevelID level

Definition at line 88 of file ObjectClassAttribute.hh.

Referenced by ObjectClass::addAttribute(), ObjectClassAttribute::checkFederateAccess(), ObjectClassAttribute::display(), and ObjectClassAttribute::ObjectClassAttribute().

OrderType order

Definition at line 89 of file ObjectClassAttribute.hh.

Referenced by ObjectClassAttribute::ObjectClassAttribute().

TransportType transport

Definition at line 90 of file ObjectClassAttribute.hh.

Referenced by ObjectClassAttribute::ObjectClassAttribute().

SecurityServer* server

Definition at line 91 of file ObjectClassAttribute.hh.

Referenced by ObjectClass::addAttribute(), ObjectClassAttribute::checkFederateAccess(), and ObjectClassAttribute::ObjectClassAttribute().

AttributeHandle handle`[private]`

The attribute handle.

Definition at line 101 of file ObjectClassAttribute.hh.

Referenced by ObjectClassAttribute::checkFederateAccess(), ObjectClassAttribute::display(), ObjectClassAttribute::getHandle(), ObjectClassAttribute::ObjectClassAttribute(), ObjectClassAttribute::publish(), ObjectClassAttribute::setHandle(), ObjectClassAttribute::unpublish(), and ObjectClassAttribute::updateBroadcastList().

SpaceHandle space`[private]`

Routing space.

Definition at line 102 of file ObjectClassAttribute.hh.

Referenced by ObjectClassAttribute::getSpace(), ObjectClassAttribute::ObjectClassAttribute(), and ObjectClassAttribute::setSpace().

PublishersList_t publishers`[private]`

The publisher's list.

Definition at line 104 of file ObjectClassAttribute.hh.

Referenced by ObjectClassAttribute::deletePublisher(), ObjectClassAttribute::getPublishers(), ObjectClassAttribute::isPublishing(), ObjectClassAttribute::publish(), and ObjectClassAttribute::updateBroadcastList().

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

- ObjectClassAttribute.hh
- ObjectClassAttribute.cc