#include <hashtable.h>
Public Member Functions | |
ChainEntry () | |
ChainEntry * | find (const UaNodeId &key, ChainEntry **ppPrevious) |
void | add (ChainEntry *pNewEntry) |
void | prepend (ChainEntry *pNewEntry) |
ChainEntry * | remove (const UaNodeId &key, ChainEntry **ppNext) |
virtual UaNodeId | getKey () const =0 |
ChainEntry * | getNext () const |
virtual void | setInvalid () |
Protected Member Functions | |
virtual | ~ChainEntry () |
Protected Attributes | |
ChainEntry * | m_pNext |
Membervar. |
ChainEntry::~ChainEntry | ( | ) | [protected, virtual] |
destruction
ChainEntry::ChainEntry | ( | ) |
construction
ChainEntry * ChainEntry::find | ( | const UaNodeId & | key, | |
ChainEntry ** | ppPrevious | |||
) |
finds the right entry in the chain.
key | The key identifying the entry. | |
ppPrevious | Returns the pointer to the previous entry. Needed to change the linked list. |
void ChainEntry::add | ( | ChainEntry * | pNewEntry | ) |
adds a new entry to the list.
pNewEntry | Pointer to the new entry. |
void ChainEntry::prepend | ( | ChainEntry * | pNewEntry | ) |
prepends a new entry to the list.
pNewEntry | Pointer to the new entry. |
ChainEntry * ChainEntry::remove | ( | const UaNodeId & | key, | |
ChainEntry ** | ppNext | |||
) |
removes an entry from the list.
key | The key identifying the entry. | |
ppNext | Returns pointer to the next element. The returned object will not contain a next element because it gets unchained. |
virtual UaNodeId ChainEntry::getKey | ( | ) | const [pure virtual] |
this returns the key of this entry. This method can be overwritten to optimize redundant information. The key doesn't need to be saved for every entry.
Implemented in UaNode.
ChainEntry* ChainEntry::getNext | ( | ) | const [inline] |
Check if there is a chain. That`s a faster way than a string compare for each lookup.
virtual void ChainEntry::setInvalid | ( | ) | [inline, virtual] |
Set the entry to invalid. This method can be overwritten by a derived class to set the internal state to invalid until the object gets deleted when the reference count goes to zero. This method is used if the object should be invalidated but can not be deleted since the lifetime is controlled by the reference count.
Reimplemented in UaVariableCache.