Proud::CFastSet< K, KTraits > Class Template Reference

Classes

class  iterator
 

Public Member Functions

iterator begin ()
 
iterator end ()
 
void insert (const K &val)
 
intptr_t GetCount () const
 
bool empty () const
 
bool IsEmpty () const
 
void RemoveAll ()
 
void Clear ()
 
iterator erase (iterator iter)
 
void erase (const K &key, bool rehashOnNeed=false)
 
bool Remove (const K &key, bool rehashOnNeed=false)
 
front ()
 
bool ContainsKey (const K &key) const
 
bool Add (const K &key)
 
void UseFastHeap (CFastHeap *heap)
 

Friends

class iterator
 

Detailed Description

template<typename K, typename KTraits = CPNElementTraits< K >>
class Proud::CFastSet< K, KTraits >

Not like CFastMap, this is a class that only possesses key.

Parameters
Kvalue type of collection
KTraitsclass that defines the characteristics that handle value type of collection
AllocTone of the values of AllocType

Member Function Documentation

template<typename K, typename KTraits = CPNElementTraits< K >>
bool Proud::CFastSet< K, KTraits >::Add ( const K &  key)
inline

Adds a new clause

Parameters
keykey of the clause to be added
Returns
True if successfully entered, otherwise returns false.
template<typename K, typename KTraits = CPNElementTraits< K >>
iterator Proud::CFastSet< K, KTraits >::begin ( )
inline

Performs a role as same name method of STL

template<typename K, typename KTraits = CPNElementTraits< K >>
void Proud::CFastSet< K, KTraits >::Clear ( )
inline

Performs a role as same name method of STL

template<typename K, typename KTraits = CPNElementTraits< K >>
bool Proud::CFastSet< K, KTraits >::ContainsKey ( const K &  key) const
inline

Returns true when key is in this container

template<typename K, typename KTraits = CPNElementTraits< K >>
iterator Proud::CFastSet< K, KTraits >::end ( )
inline

Performs a role as same name method of STL

template<typename K, typename KTraits = CPNElementTraits< K >>
iterator Proud::CFastSet< K, KTraits >::erase ( iterator  iter)
inline

Performs a role as same name method of STL

template<typename K, typename KTraits = CPNElementTraits< K >>
void Proud::CFastSet< K, KTraits >::erase ( const K &  key,
bool  rehashOnNeed = false 
)
inline

Performs a role as same name method of STL

template<typename K, typename KTraits = CPNElementTraits< K >>
K Proud::CFastSet< K, KTraits >::front ( )
inline

Same as same name method of STL

template<typename K, typename KTraits = CPNElementTraits< K >>
intptr_t Proud::CFastSet< K, KTraits >::GetCount ( ) const
inline

Performs a role as same name method of STL

template<typename K, typename KTraits = CPNElementTraits< K >>
void Proud::CFastSet< K, KTraits >::insert ( const K &  val)
inline

Performs a role as same name method of STL

template<typename K, typename KTraits = CPNElementTraits< K >>
bool Proud::CFastSet< K, KTraits >::Remove ( const K &  key,
bool  rehashOnNeed = false 
)
inline

Finds a clause and removes it

template<typename K, typename KTraits = CPNElementTraits< K >>
void Proud::CFastSet< K, KTraits >::RemoveAll ( )
inline

Performs a role as same name method of STL