#include <TreeNamedAndHandledSet.hh>
Public Types | |
typedef ObjectType::handle_t | HandleType |
The handle type should be defined embedded in the ObjectType itself. | |
typedef ObjectType::ObjectNotDefinedException | ObjectNotDefinedException |
In the same way the exception which may be thrown by most of the method should be defined embedded in the ObjectType itself. | |
typedef std::map< HandleType, ObjectType *, std::less < HandleType > > | Handle2ObjectMap_t |
Map from ObjectType::handle_t to ObjectType. | |
typedef Handle2ObjectMap_t::const_iterator | handled_const_iterator |
typedef Handle2ObjectMap_t::iterator | handled_iterator |
typedef std::map< std::string, ObjectType *, std::less < std::string > > | Name2ObjectMap_t |
Map from name to ObjectType::handle_t. | |
typedef Name2ObjectMap_t::const_iterator | named_const_iterator |
typedef Name2ObjectMap_t::const_iterator | const_iterator |
typedef Name2ObjectMap_t::iterator | iterator |
Public Member Functions | |
TreeNamedAndHandledSet (std::string setName, bool isRootSet=false) | |
~TreeNamedAndHandledSet () | |
std::string | getSetName () const |
void | add (ObjectType *child, ObjectType *parent=NULL) throw (RTIinternalError) |
Add an object to the set and build parent <--> child relationship. | |
HandleType | getHandleFromName (const std::string name) const throw (NameNotFound) |
Get the handle corresponding to the name. | |
std::string | getNameFromHandle (HandleType handle) const throw (ObjectNotDefinedException) |
Get the name corresponding to the handle. | |
ObjectType * | getObjectFromHandle (HandleType handle) const throw (ObjectNotDefinedException) |
Get the object corresponding to the handle. | |
handled_const_iterator | handled_begin () const |
handled_const_iterator | handled_end () const |
named_const_iterator | begin () const |
named_const_iterator | end () const |
const size_t | size () |
Return the size of the set, i.e. | |
Protected Attributes | |
Handle2ObjectMap_t | fromHandle |
Name2ObjectMap_t | fromName |
bool | isRootSet |
std::string | setName |
The ObjectType type must have the the following characteristics:
Definition at line 63 of file TreeNamedAndHandledSet.hh.
typedef ObjectType::handle_t HandleType |
The handle type should be defined embedded in the ObjectType itself.
Definition at line 70 of file TreeNamedAndHandledSet.hh.
typedef ObjectType::ObjectNotDefinedException ObjectNotDefinedException |
In the same way the exception which may be thrown by most of the method should be defined embedded in the ObjectType itself.
Definition at line 76 of file TreeNamedAndHandledSet.hh.
typedef std::map<HandleType,ObjectType*,std::less<HandleType> > Handle2ObjectMap_t |
Map from ObjectType::handle_t to ObjectType.
Definition at line 125 of file TreeNamedAndHandledSet.hh.
typedef Handle2ObjectMap_t::const_iterator handled_const_iterator |
Definition at line 126 of file TreeNamedAndHandledSet.hh.
typedef Handle2ObjectMap_t::iterator handled_iterator |
Definition at line 127 of file TreeNamedAndHandledSet.hh.
typedef std::map<std::string,ObjectType*,std::less<std::string> > Name2ObjectMap_t |
typedef Name2ObjectMap_t::const_iterator named_const_iterator |
Definition at line 140 of file TreeNamedAndHandledSet.hh.
typedef Name2ObjectMap_t::const_iterator const_iterator |
Definition at line 141 of file TreeNamedAndHandledSet.hh.
typedef Name2ObjectMap_t::iterator iterator |
Definition at line 142 of file TreeNamedAndHandledSet.hh.
TreeNamedAndHandledSet | ( | std::string | setName, | |
bool | isRootSet = false | |||
) | [inline] |
Definition at line 178 of file TreeNamedAndHandledSet.hh.
References TreeNamedAndHandledSet::isRootSet, and TreeNamedAndHandledSet::setName.
~TreeNamedAndHandledSet | ( | ) | [inline] |
Definition at line 184 of file TreeNamedAndHandledSet.hh.
References TreeNamedAndHandledSet::fromHandle, TreeNamedAndHandledSet::fromName, and TreeNamedAndHandledSet::isRootSet.
std::string getSetName | ( | ) | const [inline] |
Definition at line 81 of file TreeNamedAndHandledSet.hh.
void add | ( | ObjectType * | child, | |
ObjectType * | parent = NULL | |||
) | throw (RTIinternalError) [inline] |
Add an object to the set and build parent <--> child relationship.
[in,out] | child | the object to be added the child will be linked to his parent. |
[in,out] | parent | the parent object of the child the parent will get updated with a link to the new child. |
RTIinternalError | the object cannot be stored in the set may be because of a name collision |
Definition at line 207 of file TreeNamedAndHandledSet.hh.
References TreeNamedAndHandledSet::fromHandle, and TreeNamedAndHandledSet::fromName.
TreeNamedAndHandledSet< ObjectType >::HandleType getHandleFromName | ( | const std::string | name | ) | const throw (NameNotFound) [inline] |
Get the handle corresponding to the name.
[in] | name | the name of the object |
NameNotFound | the name was not found in the set |
Definition at line 256 of file TreeNamedAndHandledSet.hh.
References TreeNamedAndHandledSet::fromName, Named::getLeafClassName(), Named::getNextClassName(), and Named::isQualifiedClassName().
Referenced by InteractionSet::getInteractionClassHandle(), and ObjectClassSet::getObjectClassHandle().
std::string getNameFromHandle | ( | HandleType | handle | ) | const throw (ObjectNotDefinedException) [inline] |
Get the name corresponding to the handle.
[in] | handle | the handle of the object |
NameNotFound | the handle was not found in the set |
Definition at line 311 of file TreeNamedAndHandledSet.hh.
References TreeNamedAndHandledSet::getObjectFromHandle().
Referenced by InteractionSet::getInteractionClassName(), and ObjectClassSet::getObjectClassName().
ObjectType * getObjectFromHandle | ( | HandleType | handle | ) | const throw (ObjectNotDefinedException) [inline] |
Get the object corresponding to the handle.
[in] | handle | the handle of the object |
NameNotFound | the handle was not found in the set |
Definition at line 319 of file TreeNamedAndHandledSet.hh.
References TreeNamedAndHandledSet::fromHandle.
Referenced by InteractionSet::broadcastInteraction(), ObjectClassSet::deleteObject(), ObjectClassSet::getAttributeHandle(), ObjectClassSet::getAttributeName(), DataDistribution::getAttributeSpace(), RootObject::getInteractionClass(), DataDistribution::getInteractionSpace(), TreeNamedAndHandledSet::getNameFromHandle(), RootObject::getObjectClass(), InteractionSet::getParameterHandle(), InteractionSet::getParameterName(), InteractionSet::isReady(), ObjectClassSet::killFederate(), ObjectClassSet::negotiatedAttributeOwnershipDivestiture(), RTIA::processNetworkMessage(), ObjectClassSet::publish(), InteractionSet::publish(), ObjectClassSet::registerObjectInstance(), ObjectClassSet::subscribe(), InteractionSet::subscribe(), Federation::subscribeObject(), ObjectClassSet::unconditionalAttributeOwnershipDivestiture(), and ObjectClassSet::updateAttributeValues().
handled_const_iterator handled_begin | ( | ) | const [inline] |
Definition at line 129 of file TreeNamedAndHandledSet.hh.
Referenced by InteractionSet::killFederate().
handled_const_iterator handled_end | ( | ) | const [inline] |
Definition at line 133 of file TreeNamedAndHandledSet.hh.
Referenced by InteractionSet::killFederate().
named_const_iterator begin | ( | ) | const [inline] |
Definition at line 144 of file TreeNamedAndHandledSet.hh.
Referenced by ObjectClass::display(), certi::operator<<(), and ObjectClass::recursiveDiscovering().
named_const_iterator end | ( | ) | const [inline] |
Definition at line 148 of file TreeNamedAndHandledSet.hh.
Referenced by ObjectClass::display(), certi::operator<<(), and ObjectClass::recursiveDiscovering().
const size_t size | ( | ) | [inline] |
Return the size of the set, i.e.
the number of object in the set.
Definition at line 157 of file TreeNamedAndHandledSet.hh.
Referenced by ObjectClass::display(), and Interaction::display().
Handle2ObjectMap_t fromHandle [protected] |
Definition at line 160 of file TreeNamedAndHandledSet.hh.
Referenced by TreeNamedAndHandledSet::add(), ObjectClassSet::getInstanceClass(), ObjectClassSet::getObject(), TreeNamedAndHandledSet::getObjectFromHandle(), TreeNamedAndHandledSet< certi::ObjectClass >::handled_begin(), TreeNamedAndHandledSet< certi::ObjectClass >::handled_end(), ObjectClassSet::killFederate(), and TreeNamedAndHandledSet::~TreeNamedAndHandledSet().
Name2ObjectMap_t fromName [protected] |
Definition at line 161 of file TreeNamedAndHandledSet.hh.
Referenced by TreeNamedAndHandledSet::add(), TreeNamedAndHandledSet< certi::ObjectClass >::begin(), TreeNamedAndHandledSet< certi::ObjectClass >::end(), TreeNamedAndHandledSet::getHandleFromName(), TreeNamedAndHandledSet< certi::ObjectClass >::size(), and TreeNamedAndHandledSet::~TreeNamedAndHandledSet().
bool isRootSet [protected] |
Definition at line 167 of file TreeNamedAndHandledSet.hh.
Referenced by TreeNamedAndHandledSet::TreeNamedAndHandledSet(), and TreeNamedAndHandledSet::~TreeNamedAndHandledSet().
std::string setName [protected] |
Definition at line 172 of file TreeNamedAndHandledSet.hh.
Referenced by TreeNamedAndHandledSet< certi::ObjectClass >::getSetName(), and TreeNamedAndHandledSet::TreeNamedAndHandledSet().