Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines
nsDoubleHashtable.h File Reference
#include "pldhash.h"
#include "nscore.h"
#include "nsString.h"
#include "nsHashKeys.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

protocol  NS_COM
 A string set that takes up minimal size when there are 0 or 1 strings in the set. More...
protocol  NS_COM
 A string set that takes up minimal size when there are 0 or 1 strings in the set. More...
protocol  NS_COM
 A string set that takes up minimal size when there are 0 or 1 strings in the set. More...
protocol  NS_COM
 A string set that takes up minimal size when there are 0 or 1 strings in the set. More...

Defines

#define DHASH_CALLBACKS(ENTRY_CLASS)
 nsDoubleHashtable.h is OBSOLETE.
#define DHASH_INIT(HASHTABLE, ENTRY_CLASS, NUM_INITIAL_ENTRIES, RV)
#define DECL_DHASH_WRAPPER(CLASSNAME, ENTRY_CLASS, KEY_TYPE)
#define DHASH_WRAPPER(CLASSNAME, ENTRY_CLASS, KEY_TYPE)
#define DHASH_EXPORT

Define Documentation

#define DECL_DHASH_WRAPPER (   CLASSNAME,
  ENTRY_CLASS,
  KEY_TYPE 
)
Value:
class DHASH_EXPORT CLASSNAME {                                                \
public:                                                                       \
  CLASSNAME();                                                                \
  ~CLASSNAME();                                                               \
  nsresult Init(PRUint32 aNumInitialEntries);                                 \
  ENTRY_CLASS* GetEntry(const KEY_TYPE aKey);                                 \
  ENTRY_CLASS* AddEntry(const KEY_TYPE aKey);                                 \
  void Remove(const KEY_TYPE aKey);                                           \
  PLDHashTable mHashTable;                                                    \
};

Definition at line 335 of file nsDoubleHashtable.h.

#define DHASH_CALLBACKS (   ENTRY_CLASS)

nsDoubleHashtable.h is OBSOLETE.

Use nsTHashtable or a derivative instead.

Definition at line 207 of file nsDoubleHashtable.h.

Definition at line 502 of file nsDoubleHashtable.h.

#define DHASH_INIT (   HASHTABLE,
  ENTRY_CLASS,
  NUM_INITIAL_ENTRIES,
  RV 
)
Value:
PR_BEGIN_MACRO                                                                \
  static PLDHashTableOps hash_table_ops =                                     \
  {                                                                           \
    PL_DHashAllocTable,                                                       \
    PL_DHashFreeTable,                                                        \
    ENTRY_CLASS##GetKey,                                                      \
    ENTRY_CLASS##HashKey,                                                     \
    ENTRY_CLASS##MatchEntry,                                                  \
    PL_DHashMoveEntryStub,                                                    \
    ENTRY_CLASS##ClearEntry,                                                  \
    PL_DHashFinalizeStub,                                                     \
    ENTRY_CLASS##InitEntry                                                    \
  };                                                                          \
  PRBool isLive = PL_DHashTableInit(&(HASHTABLE),                             \
                                    &hash_table_ops, nsnull,                  \
                                    sizeof(ENTRY_CLASS),                      \
                                    (NUM_INITIAL_ENTRIES));                   \
  if (!isLive) {                                                              \
    (HASHTABLE).ops = nsnull;                                                 \
    RV = NS_ERROR_OUT_OF_MEMORY;                                              \
  } else {                                                                    \
    RV = NS_OK;                                                               \
  }                                                                           \
PR_END_MACRO

Definition at line 252 of file nsDoubleHashtable.h.

#define DHASH_WRAPPER (   CLASSNAME,
  ENTRY_CLASS,
  KEY_TYPE 
)

Definition at line 347 of file nsDoubleHashtable.h.