Humble Framework for SkyOS


Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

HMap< KEY, T > Class Template Reference
[Abstract Data Types]

#include <HMap.h>

Inheritance diagram for HMap< KEY, T >:

HObjNoCopy HObj

Detailed Description

template<class KEY, class T>
class HMap< KEY, T >

This class is responsible for maintaining the relationship between HMap derived objects and the SkyGI HANDLE associated with them. It currently uses an STL map to store HANDLE/HMap * pairs.

Definition at line 25 of file HMap.h.

Public Member Functions

ErrCode Remove (const KEY &key)
 Deletes a KEY/T pair.
ErrCode RemoveAll (void)
 Removes all elements from the list.
ErrCode Get (const KEY &key, T &data) const
 Given a KEY, returns the T associated with it.
const T & GetHead (void) const throw ()
 Returns the head (first) element of the list.
uint32 GetSize (void) const
 Returns a count of elements in the map.
ErrCode Set (const KEY &key, const T &data)
 Inserts a new KEY/T pair.
bool Contains (const KEY &key) const throw ()
 Evaluates to true if the key is already present in the map.
bool IsEmpty (void) const
 Tests whether the map is empty (zero-length) or not.
bool IsNotEmpty (void) const
 Tests whether the map is not empty, i.e., has at least one element.


Member Function Documentation

template<class KEY, class T>
ErrCode HMap< KEY, T >::Remove const KEY &  key  ) 
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
key Key to KEY/T pair being removed

Definition at line 59 of file HMap.h.

template<class KEY, class T>
ErrCode HMap< KEY, T >::RemoveAll void   ) 
 

Returns:
Always NO_ERROR

Definition at line 86 of file HMap.h.

template<class KEY, class T>
ErrCode HMap< KEY, T >::Get const KEY &  key,
T &  data
const
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
key KEY for desired KEY/T pair
[out] data Data if found, undefined otherwise

Definition at line 101 of file HMap.h.

template<class KEY, class T>
const T& HMap< KEY, T >::GetHead void   )  const throw ()
 

Returns:
Element

Definition at line 117 of file HMap.h.

template<class KEY, class T>
uint32 HMap< KEY, T >::GetSize void   )  const
 

Returns:
Element count

Definition at line 128 of file HMap.h.

template<class KEY, class T>
ErrCode HMap< KEY, T >::Set const KEY &  key,
const T &  data
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
key KEY value
data T value

Definition at line 136 of file HMap.h.

template<class KEY, class T>
bool HMap< KEY, T >::Contains const KEY &  key  )  const throw ()
 

Returns:
True if found, false otherwise
Parameters:
key Key to find

Definition at line 167 of file HMap.h.

template<class KEY, class T>
bool HMap< KEY, T >::IsEmpty void   )  const
 

Returns:
True if empty (contains no elements)

Definition at line 173 of file HMap.h.

template<class KEY, class T>
bool HMap< KEY, T >::IsNotEmpty void   )  const
 

Returns:
True if not empty (contains at least 1 element)

Definition at line 179 of file HMap.h.


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

2006.01.09-16:37