オブジェクト管理用クラス [詳細]
#include <ObjectManager.h>
構成 | |
| struct | Objects |
| オブジェクト管理用構造体 [詳細] | |
Public 型 | |
| typedef std::vector< Object * > | ObjectVector |
| typedef ObjectVector::iterator | ObjectVectorItr |
| typedef ObjectVector::const_iterator | ObjectVectorConstItr |
| typedef coil::Mutex | Mutex |
| typedef coil::Guard< coil::Mutex > | Guard |
Public メソッド | |
| ObjectManager () | |
| ~ObjectManager (void) | |
| bool | registerObject (Object *obj) |
| 指定したオブジェクトを登録する | |
| Object * | unregisterObject (const Identifier &id) |
| 指定したオブジェクトを登録解除する | |
| Object * | find (const Identifier &id) const |
| オブジェクトを検索する | |
| std::vector< Object * > | getObjects () const |
| 登録されているオブジェクトのリストを取得する | |
| template<class Pred > | |
| Pred | for_each (Pred p) |
| オブジェクト検索用ファンクタ | |
| template<class Pred > | |
| Pred | for_each (Pred p) const |
| オブジェクト検索用ファンクタ | |
Protected 変数 | |
| Objects | m_objects |
| 登録済みオブジェクト・リスト | |
オブジェクト管理用クラス
各種オブジェクトを管理するためのクラス。
| typedef coil::Guard<coil::Mutex> ObjectManager< Identifier, Object, Predicate >::Guard |
| typedef coil::Mutex ObjectManager< Identifier, Object, Predicate >::Mutex |
| typedef std::vector<Object*> ObjectManager< Identifier, Object, Predicate >::ObjectVector |
| typedef ObjectVector::const_iterator ObjectManager< Identifier, Object, Predicate >::ObjectVectorConstItr |
| typedef ObjectVector::iterator ObjectManager< Identifier, Object, Predicate >::ObjectVectorItr |
| ObjectManager< Identifier, Object, Predicate >::ObjectManager | ( | ) | [inline] |
コンストラクタ
| ObjectManager< Identifier, Object, Predicate >::~ObjectManager | ( | void | ) | [inline] |
デストラクタ
| Object* ObjectManager< Identifier, Object, Predicate >::find | ( | const Identifier & | id | ) | const [inline] |
オブジェクトを検索する
登録されているオブジェクトの中から指定した条件に合致するオブジェクトを検索 して取得する。 指定した条件に合致するオブジェクトが登録されていない場合にはNULLを返す。
| id | 検索対象オブジェクトのID |
| Pred ObjectManager< Identifier, Object, Predicate >::for_each | ( | Pred | p | ) | const [inline] |
オブジェクト検索用ファンクタ
| Pred ObjectManager< Identifier, Object, Predicate >::for_each | ( | Pred | p | ) | [inline] |
オブジェクト検索用ファンクタ
参照元 ObjectManager< const char *, DLLEntity, DllPred >::for_each().
| std::vector<Object*> ObjectManager< Identifier, Object, Predicate >::getObjects | ( | ) | const [inline] |
登録されているオブジェクトのリストを取得する
登録されているオブジェクトのリストを取得する。
| bool ObjectManager< Identifier, Object, Predicate >::registerObject | ( | Object * | obj | ) | [inline] |
指定したオブジェクトを登録する
指定したオブジェクトを登録する。 同一オブジェクトが登録済みの場合は、何も行わない。
| obj | 登録対象オブジェクト |
| Object* ObjectManager< Identifier, Object, Predicate >::unregisterObject | ( | const Identifier & | id | ) | [inline] |
指定したオブジェクトを登録解除する
指定したオブジェクトの登録を解除し、取得する。 指定したオブジェクトが登録されていない場合にはNULLを返す。
| id | 登録解除対象オブジェクトのID |
Objects ObjectManager< Identifier, Object, Predicate >::m_objects [protected] |
登録済みオブジェクト・リスト
参照元 ObjectManager< const char *, DLLEntity, DllPred >::find(), ObjectManager< const char *, DLLEntity, DllPred >::for_each(), ObjectManager< const char *, DLLEntity, DllPred >::getObjects(), ObjectManager< const char *, DLLEntity, DllPred >::registerObject(), と ObjectManager< const char *, DLLEntity, DllPred >::unregisterObject().
1.6.3