Class for managing objects. More...
#include <ObjectManager.h>
Classes | |
struct | Objects |
The structure for object management. More... | |
Public Types | |
typedef coil::Guard< coil::Mutex > | Guard |
typedef coil::Guard< coil::Mutex > | Guard |
typedef coil::Mutex | Mutex |
typedef coil::Mutex | Mutex |
typedef std::vector< Object * > | ObjectVector |
typedef std::vector< Object * > | ObjectVector |
typedef ObjectVector::const_iterator | ObjectVectorConstItr |
typedef ObjectVector::const_iterator | ObjectVectorConstItr |
typedef ObjectVector::iterator | ObjectVectorItr |
typedef ObjectVector::iterator | ObjectVectorItr |
Public Member Functions | |
Object * | find (const Identifier &id) const |
Find the object. | |
Object * | find (const Identifier &id) const |
Find the object. | |
template<class Pred > | |
Pred | for_each (Pred p) |
Functor for searching object. | |
template<class Pred > | |
Pred | for_each (Pred p) |
Functor for searching object. | |
template<class Pred > | |
Pred | for_each (Pred p) const |
Functor for searching object. | |
template<class Pred > | |
Pred | for_each (Pred p) const |
Functor for searching object. | |
std::vector< Object * > | getObjects () const |
Get a list of obejects that are registerd. | |
std::vector< Object * > | getObjects () const |
Get a list of obejects that are registerd. | |
ObjectManager () | |
Constructor. | |
ObjectManager () | |
Constructor. | |
bool | registerObject (Object *obj) |
Register the specified object. | |
bool | registerObject (Object *obj) |
Register the specified object. | |
Object * | unregisterObject (const Identifier &id) |
Unregister the specified object. | |
Object * | unregisterObject (const Identifier &id) |
Unregister the specified object. | |
~ObjectManager (void) | |
Destructor. | |
~ObjectManager () | |
Destructor. | |
Protected Attributes | |
Objects | m_objects |
The list of registered objects. |
Class for managing objects.
This is a class for managing various objects.
Definition at line 49 of file doil/ObjectManager.h.
typedef coil::Guard<coil::Mutex> ObjectManager< Identifier, Object, Predicate >::Guard |
Definition at line 56 of file doil/ObjectManager.h.
typedef coil::Guard<coil::Mutex> ObjectManager< Identifier, Object, Predicate >::Guard |
Definition at line 58 of file rtm/ObjectManager.h.
typedef coil::Mutex ObjectManager< Identifier, Object, Predicate >::Mutex |
Definition at line 55 of file doil/ObjectManager.h.
typedef coil::Mutex ObjectManager< Identifier, Object, Predicate >::Mutex |
Definition at line 57 of file rtm/ObjectManager.h.
typedef std::vector<Object*> ObjectManager< Identifier, Object, Predicate >::ObjectVector |
Definition at line 52 of file doil/ObjectManager.h.
typedef std::vector<Object*> ObjectManager< Identifier, Object, Predicate >::ObjectVector |
Definition at line 54 of file rtm/ObjectManager.h.
typedef ObjectVector::const_iterator ObjectManager< Identifier, Object, Predicate >::ObjectVectorConstItr |
Definition at line 54 of file doil/ObjectManager.h.
typedef ObjectVector::const_iterator ObjectManager< Identifier, Object, Predicate >::ObjectVectorConstItr |
Definition at line 56 of file rtm/ObjectManager.h.
typedef ObjectVector::iterator ObjectManager< Identifier, Object, Predicate >::ObjectVectorItr |
Definition at line 53 of file doil/ObjectManager.h.
typedef ObjectVector::iterator ObjectManager< Identifier, Object, Predicate >::ObjectVectorItr |
Definition at line 55 of file rtm/ObjectManager.h.
ObjectManager< Identifier, Object, Predicate >::ObjectManager | ( | ) | [inline] |
ObjectManager< Identifier, Object, Predicate >::~ObjectManager | ( | ) | [inline] |
ObjectManager< Identifier, Object, Predicate >::ObjectManager | ( | ) | [inline] |
ObjectManager< Identifier, Object, Predicate >::~ObjectManager | ( | void | ) | [inline] |
Object* ObjectManager< Identifier, Object, Predicate >::find | ( | const Identifier & | id | ) | const [inline] |
Find the object.
Find the object that matches the specified condition among the registered objects and get it. This operation returns NULL if the object that does matches the specified condition is not registered.
id | ID of the target object for finding |
Definition at line 202 of file doil/ObjectManager.h.
Object* ObjectManager< Identifier, Object, Predicate >::find | ( | const Identifier & | id | ) | const [inline] |
Find the object.
Find the object that matches the specified condition among the registered objects and get it. This operation returns NULL if the object that does matches the specified condition is not registered.
id | ID of the target object for finding |
Definition at line 202 of file rtm/ObjectManager.h.
Pred ObjectManager< Identifier, Object, Predicate >::for_each | ( | Pred | p | ) | [inline] |
Functor for searching object.
Definition at line 248 of file doil/ObjectManager.h.
Pred ObjectManager< Identifier, Object, Predicate >::for_each | ( | Pred | p | ) | [inline] |
Functor for searching object.
Definition at line 248 of file rtm/ObjectManager.h.
Pred ObjectManager< Identifier, Object, Predicate >::for_each | ( | Pred | p | ) | const [inline] |
Functor for searching object.
Definition at line 262 of file doil/ObjectManager.h.
Pred ObjectManager< Identifier, Object, Predicate >::for_each | ( | Pred | p | ) | const [inline] |
Functor for searching object.
Definition at line 262 of file rtm/ObjectManager.h.
std::vector<Object*> ObjectManager< Identifier, Object, Predicate >::getObjects | ( | ) | const [inline] |
Get a list of obejects that are registerd.
Get a list of objects that are registerd.
Definition at line 234 of file rtm/ObjectManager.h.
std::vector<Object*> ObjectManager< Identifier, Object, Predicate >::getObjects | ( | ) | const [inline] |
Get a list of obejects that are registerd.
Get a list of objects that are registerd.
Definition at line 234 of file doil/ObjectManager.h.
bool ObjectManager< Identifier, Object, Predicate >::registerObject | ( | Object * | obj | ) | [inline] |
Register the specified object.
Register the object that was specified. If the same object is already registered, this does not anything.
obj | The target object for the registration |
Definition at line 118 of file doil/ObjectManager.h.
bool ObjectManager< Identifier, Object, Predicate >::registerObject | ( | Object * | obj | ) | [inline] |
Register the specified object.
Register the object that was specified. If the same object is already registered, this does not anything.
obj | The target object for the registration |
Definition at line 118 of file rtm/ObjectManager.h.
Object* ObjectManager< Identifier, Object, Predicate >::unregisterObject | ( | const Identifier & | id | ) | [inline] |
Unregister the specified object.
Unregister the object that was specified and get it. This operation returns NULL if the specified object is not registered.
id | ID of the target object for the unregistration |
Definition at line 158 of file doil/ObjectManager.h.
Object* ObjectManager< Identifier, Object, Predicate >::unregisterObject | ( | const Identifier & | id | ) | [inline] |
Unregister the specified object.
Unregister the object that was specified and get it. This operation returns NULL if the specified object is not registered.
id | ID of the target object for the unregistration |
Definition at line 158 of file rtm/ObjectManager.h.
Objects ObjectManager< Identifier, Object, Predicate >::m_objects [protected] |
The list of registered objects.
Definition at line 288 of file doil/ObjectManager.h.