Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Lamp::NamedObjectDatabase< Type > Class Template Reference

名前付きオブジェクトデータベース More...

#include <NamedObjectDatabase.h>

List of all members.

Public Member Functions

 NamedObjectDatabase (int capacity=256, float loadFactor=0.75f)
 コンストラクタ

virtual ~NamedObjectDatabase ()
 デストラクタ

virtual bool add (const String &name, Type *object)
 オブジェクトの追加

virtual bool remove (const String &name, Type *object)
 オブジェクトの削除

virtual int clear ()
 クリア

virtual int getCount ()
 オブジェクト数の取得

virtual Type * get (int index)
 オブジェクトの取得

virtual Type * search (const String &name)
 オブジェクトの検索


Detailed Description

template<typename Type>
class Lamp::NamedObjectDatabase< Type >

名前付きオブジェクトデータベース

Definition at line 38 of file NamedObjectDatabase.h.


Constructor & Destructor Documentation

template<typename Type>
Lamp::NamedObjectDatabase< Type >::NamedObjectDatabase int  capacity = 256,
float  loadFactor = 0.75f
[inline]
 

コンストラクタ

Parameters:
capacity 初期容量
loadFactor 負荷係数

Definition at line 45 of file NamedObjectDatabase.h.


Member Function Documentation

template<typename Type>
virtual bool Lamp::NamedObjectDatabase< Type >::add const String name,
Type *  object
[inline, virtual]
 

オブジェクトの追加

Parameters:
object 追加するオブジェクト
Returns:
成功すればtrue

Definition at line 65 of file NamedObjectDatabase.h.

References Assert, Lamp::String::getSize(), NULL, Lamp::Deque< Type * >::pushBack(), Lamp::HashMap< String, Type * >::put(), and Lamp::NamedObjectDatabase< Type >::search().

template<typename Type>
virtual int Lamp::NamedObjectDatabase< Type >::clear  )  [inline, virtual]
 

クリア

Returns:
削除したオブジェクト数

Definition at line 94 of file NamedObjectDatabase.h.

References Lamp::HashMap< String, Type * >::clear(), Lamp::Deque< Type * >::clear(), and Lamp::NamedObjectDatabase< Type >::getCount().

template<typename Type>
virtual Type* Lamp::NamedObjectDatabase< Type >::get int  index  )  [inline, virtual]
 

オブジェクトの取得

Parameters:
index オブジェクトのインデクス
Returns:
オブジェクト

Definition at line 115 of file NamedObjectDatabase.h.

References Lamp::Deque< Type * >::get().

template<typename Type>
virtual int Lamp::NamedObjectDatabase< Type >::getCount  )  [inline, virtual]
 

オブジェクト数の取得

Returns:
オブジェクト数

Definition at line 108 of file NamedObjectDatabase.h.

References Lamp::Deque< Type * >::getCount().

Referenced by Lamp::NamedObjectDatabase< Type >::clear().

template<typename Type>
virtual bool Lamp::NamedObjectDatabase< Type >::remove const String name,
Type *  object
[inline, virtual]
 

オブジェクトの削除

Parameters:
object 削除するオブジェクト
Returns:
成功すればtrue

Definition at line 79 of file NamedObjectDatabase.h.

References Assert, Lamp::String::getSize(), NULL, Lamp::HashMap< String, Type * >::remove(), Lamp::Deque< Type * >::removeByValue(), and Lamp::NamedObjectDatabase< Type >::search().

template<typename Type>
virtual Type* Lamp::NamedObjectDatabase< Type >::search const String name  )  [inline, virtual]
 

オブジェクトの検索

Parameters:
name 検索するオブジェクト名
Returns:
オブジェクト

Definition at line 122 of file NamedObjectDatabase.h.

References Lamp::HashMap< String, Type * >::get().

Referenced by Lamp::NamedObjectDatabase< Type >::add(), and Lamp::NamedObjectDatabase< Type >::remove().


The documentation for this class was generated from the following file:
Generated on Wed Mar 16 10:29:49 2005 for Lamp by doxygen 1.3.2