NAME
OTC_TableEntry -
Holder of table entries in hash based collections.
SYNOPSIS
#include <OTC/collctn/tblentry.hh>
class OTC_TableEntry
{
public:
static os_typespec* get_os_typespec();
~OTC_TableEntry();
OTC_TableEntry();
OTC_TableEntry(OTC_TableEntry const& theEntry);
OTC_TableEntry(int theHashValue, OTC_Link* theLink);
OTC_TableEntry& operator=(OTC_TableEntry const& theEntry);
inline OTC_Boolean isEmpty() const;
inline OTC_Boolean isOccupied() const;
inline OTC_Boolean isDeleted() const;
inline int hashValue() const;
inline OTC_Link* link() const;
inline void markDeleted();
};
CLASS TYPE
Concrete
DESCRIPTION
This class contains information about entries in a hash based
collections.
INITIALISATION
OTC_TableEntry();
Default constructor used when creating
the vector used for the table.
The entry is initialised to be empty.
OTC_TableEntry(OTC_TableEntry const& theEntry);
Construct the table entry from theEntry.
OTC_TableEntry(int theHashValue, OTC_Link* theLink);
Construct the table entry such that it
holds theLink. The value to be used
as the cached hash value should be in
theHashValue.
OTC_TableEntry& operator=(OTC_TableEntry const& theEntry);
Sets this entry to hold the item
held by theEntry.
QUERY
inline OTC_Boolean isEmpty() const;
Returns OTCLIB_TRUE if the entry is
still empty.
inline OTC_Boolean isOccupied() const;
Returns OTCLIB_TRUE if the entry is still
occupied.
inline OTC_Boolean isDeleted() const;
Returns OTCLIB_TRUE if the item in the
entry has been deleted.
inline int hashValue() const;
Returns the cached hash value for the
item.
inline OTC_Link* link() const;
Returns the link holding the actual
item.
UPDATE
inline void markDeleted();
Mark the item in the entry as being
deleted.
LIBRARY
OTC
AUTHOR(S)
Graham Dumpleton
COPYRIGHT
Copyright 1992 1993 OTC LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED