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

[AI] Forward declaration for MxListCursor. More...

#include <mxlist.h>

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

Public Member Functions

 MxListCursor (MxList< T > *p_list)
 [AI] More...
 
MxBool Find (T p_obj)
 [AI] More...
 
void Detach ()
 [AI] More...
 
void Destroy ()
 [AI] More...
 
MxBool Next ()
 [AI] More...
 
MxBool Next (T &p_obj)
 [AI] More...
 
MxBool Prev ()
 [AI] More...
 
MxBool Prev (T &p_obj)
 [AI] More...
 
MxBool Current (T &p_obj)
 [AI] More...
 
MxBool First (T &p_obj)
 [AI] More...
 
MxBool Last (T &p_obj)
 [AI] More...
 
MxBool HasMatch ()
 [AI] More...
 
void SetValue (T p_obj)
 [AI] More...
 
MxBool Head ()
 [AI] More...
 
MxBool Tail ()
 [AI] More...
 
void Reset ()
 [AI] More...
 
void Prepend (T p_newobj)
 [AI] 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 MxListCursor< T >

[AI] Forward declaration for MxListCursor.

[AI]

Iterator for traversing and operating on elements within a MxList. [AI]

[AI] Supports navigation, search, element removal, and reset. Encapsulates state about the current match and operates on a target MxList<T>. [AI]

Definition at line 174 of file mxlist.h.

Constructor & Destructor Documentation

◆ MxListCursor()

template<class T >
MxListCursor< T >::MxListCursor ( MxList< T > *  p_list)
inline

[AI]

Constructs a cursor for a target list. [AI]

Parameters
p_listPointer to the list to traverse. [AI]

Definition at line 179 of file mxlist.h.

Member Function Documentation

◆ Current()

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

[AI]

Access value of the current match. [AI]

Parameters
p_objOutput: Value at the current match position. [AI]
Returns
True if there is a current match. [AI]

◆ Destroy()

template<class T >
void MxListCursor< T >::Destroy ( )

[AI]

Remove the currently matched entry and destroy the value (invoking destructor). [AI]

◆ Detach()

template<class T >
void MxListCursor< T >::Detach ( )

[AI]

Remove the currently matched entry from the list, but do not call destructor on the value. [AI]

◆ Find()

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

[AI]

Search for the first occurrence of an element matching p_obj. [AI]

Parameters
p_objThe value to look for. [AI]
Returns
True if found, match pointer is set to entry. [AI]

◆ First()

template<class T >
MxBool MxListCursor< T >::First ( T &  p_obj)

[AI]

Move to the first entry and retrieve its value. [AI]

Parameters
p_objOutput: Value at the first entry. [AI]
Returns
True if list is not empty. [AI]

◆ HasMatch()

template<class T >
MxBool MxListCursor< T >::HasMatch ( )
inline

[AI]

Returns true if the cursor currently points to a match. [AI]

Returns
True if there is a current match. [AI]

Definition at line 242 of file mxlist.h.

◆ Head()

template<class T >
MxBool MxListCursor< T >::Head ( )
inline

[AI]

Move cursor to head (first) entry in the list. [AI]

Returns
True if cursor is now positioned on valid entry. [AI]

Definition at line 252 of file mxlist.h.

◆ Last()

template<class T >
MxBool MxListCursor< T >::Last ( T &  p_obj)

[AI]

Move to last entry and retrieve its value. [AI]

Parameters
p_objOutput: Value at the last entry. [AI]
Returns
True if list is not empty. [AI]

◆ Next() [1/2]

template<class T >
MxBool MxListCursor< T >::Next ( )

[AI]

Move the cursor to the next entry. [AI]

Returns
True if there is a next (match updated), otherwise false. [AI]

◆ Next() [2/2]

template<class T >
MxBool MxListCursor< T >::Next ( T &  p_obj)

[AI]

Move to the next entry and provide its value. [AI]

Parameters
p_objOutput: Value at the new position. [AI]
Returns
True if next entry exists, otherwise false. [AI]

◆ Prepend()

template<class T >
void MxListCursor< T >::Prepend ( p_newobj)

[AI]

Insert a value before the current match. [AI]

Parameters
p_newobjValue to insert. [AI]

◆ Prev() [1/2]

template<class T >
MxBool MxListCursor< T >::Prev ( )

[AI]

Move cursor to previous entry in the list. [AI]

Returns
True if previous exists. [AI]

◆ Prev() [2/2]

template<class T >
MxBool MxListCursor< T >::Prev ( T &  p_obj)

[AI]

Move to previous entry, provide its value via argument. [AI]

Parameters
p_objOutput: Value at the new position. [AI]
Returns
True if previous exists, otherwise false. [AI]

◆ Reset()

template<class T >
void MxListCursor< T >::Reset ( )
inline

[AI]

Resets the cursor to no match (invalid state). [AI]

Definition at line 269 of file mxlist.h.

◆ SetValue()

template<class T >
void MxListCursor< T >::SetValue ( p_obj)

[AI]

Change the value at the cursor's current match position. [AI]

Parameters
p_objThe value to set. [AI]

◆ Tail()

template<class T >
MxBool MxListCursor< T >::Tail ( )
inline

[AI]

Move cursor to tail (last) entry. [AI]

Returns
True if positioned on valid entry. [AI]

Definition at line 261 of file mxlist.h.


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