Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

wvhashtable.h File Reference

#include "wvlinklist.h"

Go to the source code of this file.

Compounds

class  WvHashTable
class  Iter
class  WvHashTableBase
class  IterBase

Defines

#define __WvDict_base(_classname_, _type_, _ftype_, _field_, _extra_)
#define DeclareWvDict3(_type_, _newname_, _ftype_, _field_, _extra_)   __WvDict_base(_newname_, _type_, _ftype_, . _field_, _extra_)
#define DeclareWvDict2(_type_, _ftype_, _field_, _extra_)   DeclareWvDict3(_type_, _type_##Dict, _ftype_, _field_, _extra_)
#define DeclareWvDict(_type_, _ftype_, _field_)   DeclareWvDict2(_type_, _ftype_, _field_, )
#define DeclareWvTable3(_type_, _newname_, _extra_)   __WvDict_base(_newname_, _type_, _type_, , _extra_)
#define DeclareWvTable2(_type_, _extra_)   DeclareWvTable3(_type_, _type_##Table, _extra_)
#define DeclareWvTable(_type_)   DeclareWvTable2(_type_, )

Typedefs

typedef const void * WvFieldPointer (const void *obj)

Functions

unsigned WvHash (const WvString &s)
unsigned WvHash (const char *s)
unsigned WvHash (const int &i)


Define Documentation

#define __WvDict_base (  _classname_,
_type_,
_ftype_,
_field_,
_extra_    ) 
 

Value:

struct _classname_##_hack                                               \
    {                                                                   \
        static inline const void *_classname_##_fptr_(const void *obj)  \
            { return &((*(const _type_ *)obj) _field_); }               \
    };                                                                  \
                                                                        \
    typedef WvHashTable<_type_, _ftype_,                                \
                        _classname_##_hack::_classname_##_fptr_>        \
                        _classname_##Base;                              \
                                                                        \
    class _classname_ : public _classname_##Base                        \
    {                                                                   \
    public:                                                             \
        _classname_(unsigned _numslots) : _classname_##Base(_numslots)  \
                { }                                                     \
        void add(_type_ *data, bool auto_free)                          \
                { _classname_##Base::add(data, auto_free); };           \
        _extra_                                                         \
    };

Definition at line 190 of file utils/wvhashtable.h.

#define DeclareWvDict (  _type_,
_ftype_,
_field_    )     DeclareWvDict2(_type_, _ftype_, _field_, )
 

Definition at line 216 of file utils/wvhashtable.h.

#define DeclareWvDict2 (  _type_,
_ftype_,
_field_,
_extra_    )     DeclareWvDict3(_type_, _type_##Dict, _ftype_, _field_, _extra_)
 

Definition at line 214 of file utils/wvhashtable.h.

#define DeclareWvDict3 (  _type_,
_newname_,
_ftype_,
_field_,
_extra_    )     __WvDict_base(_newname_, _type_, _ftype_, . _field_, _extra_)
 

Definition at line 212 of file utils/wvhashtable.h.

#define DeclareWvTable (  _type_    )     DeclareWvTable2(_type_, )
 

Definition at line 223 of file utils/wvhashtable.h.

#define DeclareWvTable2 (  _type_,
_extra_    )     DeclareWvTable3(_type_, _type_##Table, _extra_)
 

Definition at line 221 of file utils/wvhashtable.h.

#define DeclareWvTable3 (  _type_,
_newname_,
_extra_    )     __WvDict_base(_newname_, _type_, _type_, , _extra_)
 

Definition at line 219 of file utils/wvhashtable.h.


Typedef Documentation

typedef const void* WvFieldPointer(const void *obj)
 

Definition at line 125 of file utils/wvhashtable.h.


Function Documentation

unsigned WvHash (  const int &    i ) 
 

Definition at line 32 of file wvhashtable.cc.

Referenced by WvHashTable< int, int, WvIntTable_hack::WvIntTable_fptr_ >::hash(), WvHashTable< int, int, WvIntTable_hack::WvIntTable_fptr_ >::operator[](), and WvHash().

unsigned WvHash (  const char *    s ) 
 

unsigned WvHash (  const WvString &    s ) 
 


Generated on Fri Apr 5 15:16:53 2002 for WvStreams by doxygen1.2.15