My Project
Classes | Public Types | Public Member Functions
Hash_set< T, K > Class Template Reference

#include <sql_hset.h>

List of all members.

Classes

class  Iterator

Public Types

enum  { START_SIZE = 8 }
typedef T Value_type

Public Member Functions

 Hash_set ()
 ~Hash_set ()
bool insert (T *value)
bool is_empty () const
size_t size () const

Detailed Description

template<typename T, my_hash_get_key K>
class Hash_set< T, K >

A type-safe wrapper around mysys HASH.


Constructor & Destructor Documentation

template<typename T , my_hash_get_key K>
Hash_set< T, K >::Hash_set ( ) [inline]

Constructs an empty hash. Does not allocate memory, it is done upon the first insert. Thus does not cause or return errors.

template<typename T , my_hash_get_key K>
Hash_set< T, K >::~Hash_set ( ) [inline]

Destroy the hash by freeing the buckets table. Does not call destructors for the elements.


Member Function Documentation

template<typename T , my_hash_get_key K>
bool Hash_set< T, K >::insert ( T *  value) [inline]

Insert a single value into a hash. Does not tell whether the value was inserted -- if an identical value existed, it is not replaced.

Return values:
TRUEOut of memory.
FALSEOK. The value either was inserted or existed in the hash.
template<typename T , my_hash_get_key K>
bool Hash_set< T, K >::is_empty ( void  ) const [inline]

Is this hash set empty?

template<typename T , my_hash_get_key K>
size_t Hash_set< T, K >::size ( ) const [inline]

Returns the number of unique elements.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines