Isle
Loading...
Searching...
No Matches
MxHashTableCursor< T > Class Template Reference

[AI] Non-intrusive search-and-edit cursor for navigating, querying, or deleting a specific entry in an MxHashTable. More...

#include <mxhashtable.h>

Inheritance diagram for MxHashTableCursor< T >:
Collaboration diagram for MxHashTableCursor< T >:

Public Member Functions

 MxHashTableCursor (MxHashTable< T > *p_table)
 [AI] Constructs a cursor operating on the supplied table; initially not referencing any match. More...
 
MxBool Find (T p_obj)
 [AI] Finds and focuses the cursor on the first node matching the given object by hash and value; supports set-by-value semantics. More...
 
MxBool Current (T &p_obj)
 [AI] Retrieves the object at the current match position, if valid. More...
 
void DeleteMatch ()
 [AI] If the cursor points to a match, removes it from table and destroys the node. More...
 
- Public Member Functions inherited from MxCore
 MxCore ()
 [AI] Constructs a new MxCore object and assigns it a unique id. More...
 
virtual ~MxCore ()
 [AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More...
 
virtual MxLong Notify (MxParam &p_param)
 [AI] Virtual callback notification mechanism. More...
 
virtual MxResult Tickle ()
 [AI] Called by tickle managers to allow the object to update itself. More...
 
virtual const char * ClassName () const
 [AI] Returns the runtime class name of this object. More...
 
virtual MxBool IsA (const char *p_name) const
 [AI] Checks whether this object's class type or parents match the given name. More...
 
MxU32 GetId ()
 [AI] Gets the unique (per-process) id assigned to this object instance. More...
 

Detailed Description

template<class T>
class MxHashTableCursor< T >

[AI] Non-intrusive search-and-edit cursor for navigating, querying, or deleting a specific entry in an MxHashTable.

[AI] Used to locate and possibly remove or edit a single object in the hash table by value, based on its hash and value equality.

Template Parameters
T[AI] The object type in the associated hash table.

Definition at line 149 of file mxhashtable.h.

Constructor & Destructor Documentation

◆ MxHashTableCursor()

template<class T >
MxHashTableCursor< T >::MxHashTableCursor ( MxHashTable< T > *  p_table)
inline

[AI] Constructs a cursor operating on the supplied table; initially not referencing any match.

Parameters
p_table[AI] Hash table in which searches/operations will be performed.

Definition at line 155 of file mxhashtable.h.

Member Function Documentation

◆ Current()

template<class T >
MxBool MxHashTableCursor< T >::Current ( T &  p_obj)

[AI] Retrieves the object at the current match position, if valid.

Parameters
p_obj[AI] (out parameter) Receives the matching object value if cursor is positioned on a node.
Return values
TRUE[AI] If match exists, FALSE otherwise.

Definition at line 204 of file mxhashtable.h.

◆ DeleteMatch()

template<class T >
void MxHashTableCursor< T >::DeleteMatch

[AI] If the cursor points to a match, removes it from table and destroys the node.

Definition at line 214 of file mxhashtable.h.

◆ Find()

template<class T >
MxBool MxHashTableCursor< T >::Find ( p_obj)

[AI] Finds and focuses the cursor on the first node matching the given object by hash and value; supports set-by-value semantics.

Parameters
p_obj[AI] Value to search for in table using table's Compare and Hash functions.
Return values
TRUE[AI] If a match was found and cursor now points to it.
FALSE[AI] If no such object exists in table.

Definition at line 190 of file mxhashtable.h.


The documentation for this class was generated from the following file: