Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
ObjectManager< Identifier, Object, Predicate > Class Template Reference

Class for managing objects. More...

#include <ObjectManager.h>

Classes

struct  Objects
 The structure for object management. More...
 

Public Types

typedef coil::Guard< coil::MutexGuard
 
typedef coil::Guard< coil::MutexGuard
 
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. More...
 
Object * find (const Identifier &id) const
 Find the object. More...
 
template<class Pred >
Pred for_each (Pred p)
 Functor for searching object. More...
 
template<class Pred >
Pred for_each (Pred p)
 Functor for searching object. More...
 
template<class Pred >
Pred for_each (Pred p) const
 Functor for searching object. More...
 
template<class Pred >
Pred for_each (Pred p) const
 Functor for searching object. More...
 
std::vector< Object * > getObjects () const
 Get a list of obejects that are registerd. More...
 
std::vector< Object * > getObjects () const
 Get a list of obejects that are registerd. More...
 
 ObjectManager ()
 Constructor. More...
 
 ObjectManager ()
 Constructor. More...
 
bool registerObject (Object *obj)
 Register the specified object. More...
 
bool registerObject (Object *obj)
 Register the specified object. More...
 
Object * unregisterObject (const Identifier &id)
 Unregister the specified object. More...
 
Object * unregisterObject (const Identifier &id)
 Unregister the specified object. More...
 
 ~ObjectManager (void)
 Destructor. More...
 
 ~ObjectManager ()
 Destructor. More...
 

Protected Attributes

Objects m_objects
 The list of registered objects. More...
 

Detailed Description

template<typename Identifier, typename Object, typename Predicate>
class ObjectManager< Identifier, Object, Predicate >

Class for managing objects.

This is a class for managing various objects.

Since
0.4.0

Definition at line 49 of file doil/ObjectManager.h.

Member Typedef Documentation

template<typename Identifier, typename Object, typename Predicate>
typedef coil::Guard<coil::Mutex> ObjectManager< Identifier, Object, Predicate >::Guard

Definition at line 56 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
typedef coil::Guard<coil::Mutex> ObjectManager< Identifier, Object, Predicate >::Guard

Definition at line 58 of file rtm/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
typedef coil::Mutex ObjectManager< Identifier, Object, Predicate >::Mutex

Definition at line 55 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
typedef coil::Mutex ObjectManager< Identifier, Object, Predicate >::Mutex

Definition at line 57 of file rtm/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
typedef std::vector<Object*> ObjectManager< Identifier, Object, Predicate >::ObjectVector

Definition at line 52 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
typedef std::vector<Object*> ObjectManager< Identifier, Object, Predicate >::ObjectVector

Definition at line 54 of file rtm/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
typedef ObjectVector::const_iterator ObjectManager< Identifier, Object, Predicate >::ObjectVectorConstItr

Definition at line 54 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
typedef ObjectVector::const_iterator ObjectManager< Identifier, Object, Predicate >::ObjectVectorConstItr

Definition at line 56 of file rtm/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
typedef ObjectVector::iterator ObjectManager< Identifier, Object, Predicate >::ObjectVectorItr

Definition at line 53 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
typedef ObjectVector::iterator ObjectManager< Identifier, Object, Predicate >::ObjectVectorItr

Definition at line 55 of file rtm/ObjectManager.h.

Constructor & Destructor Documentation

template<typename Identifier, typename Object, typename Predicate>
ObjectManager< Identifier, Object, Predicate >::ObjectManager ( )
inline

Constructor.

Constructor

Definition at line 74 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
ObjectManager< Identifier, Object, Predicate >::~ObjectManager ( )
inline

Destructor.

Destructor

Definition at line 91 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
ObjectManager< Identifier, Object, Predicate >::ObjectManager ( )
inline

Constructor.

Constructor

Definition at line 74 of file rtm/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
ObjectManager< Identifier, Object, Predicate >::~ObjectManager ( void  )
inline

Destructor.

Destructor

Definition at line 91 of file rtm/ObjectManager.h.

Member Function Documentation

template<typename Identifier, typename Object, typename Predicate>
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.

Parameters
idID of the target object for finding
Returns
Result of finding object

Definition at line 202 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
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.

Parameters
idID of the target object for finding
Returns
Result of finding object

Definition at line 202 of file rtm/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
template<class Pred >
Pred ObjectManager< Identifier, Object, Predicate >::for_each ( Pred  p)
inline

Functor for searching object.

Definition at line 248 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
template<class Pred >
Pred ObjectManager< Identifier, Object, Predicate >::for_each ( Pred  p)
inline

Functor for searching object.

Definition at line 248 of file rtm/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
template<class Pred >
Pred ObjectManager< Identifier, Object, Predicate >::for_each ( Pred  p) const
inline

Functor for searching object.

Definition at line 262 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
template<class Pred >
Pred ObjectManager< Identifier, Object, Predicate >::for_each ( Pred  p) const
inline

Functor for searching object.

Definition at line 262 of file rtm/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
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.

Returns
List of registerd objects.

Definition at line 234 of file rtm/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
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.

Returns
List of registerd objects.

Definition at line 234 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
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.

Parameters
objThe target object for the registration
Returns
Registration result (True if object was registerd)

Definition at line 118 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
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.

Parameters
objThe target object for the registration
Returns
Registration result (True if object was registerd)

Definition at line 118 of file rtm/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
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.

Parameters
idID of the target object for the unregistration
Returns
Unregistered object

Definition at line 158 of file doil/ObjectManager.h.

template<typename Identifier, typename Object, typename Predicate>
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.

Parameters
idID of the target object for the unregistration
Returns
Unregistered object

Definition at line 158 of file rtm/ObjectManager.h.

Member Data Documentation

template<typename Identifier, typename Object, typename Predicate>
Objects ObjectManager< Identifier, Object, Predicate >::m_objects
protected

The list of registered objects.

Definition at line 288 of file doil/ObjectManager.h.


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


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Jun 10 2019 14:07:59