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

[AI] A utility list extending the STL list<T>, providing simplified PushBack, Remove, and a PopFront operation. More...

#include <mxutilitylist.h>

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

Public Member Functions

MxBool PopFront (T &p_obj)
 [AI] Removes and returns the first element of the list. More...
 
void PushBack (T p_obj)
 [AI] Pushes a copy of the provided object to the back of the list. More...
 
void Remove (T p_obj)
 [AI] Removes all matching objects from the list. More...
 

Detailed Description

template<class T>
class MxUtilityList< T >

[AI] A utility list extending the STL list<T>, providing simplified PushBack, Remove, and a PopFront operation.

[AI] MxUtilityList enhances std::list by adding convenience methods for pushing, popping, and removing elements, with the addition of a PopFront method that pops and copies the first item into a reference, as well as wrapping push_back and remove for simple access. [AI]

Definition at line 14 of file mxutilitylist.h.

Member Function Documentation

◆ PopFront()

template<class T >
MxBool MxUtilityList< T >::PopFront ( T &  p_obj)
inline

[AI] Removes and returns the first element of the list.

[AI] If the list is not empty, copies the front value of the list to p_obj, pops the head, and returns TRUE. Otherwise, does nothing and returns FALSE. [AI]

Parameters
p_obj[AI] Reference to a variable of type T where the first object will be copied if the list is not empty.
Returns
TRUE if an item was popped, FALSE if the list was empty. [AI]

Definition at line 22 of file mxutilitylist.h.

◆ PushBack()

template<class T >
void MxUtilityList< T >::PushBack ( p_obj)
inline

[AI] Pushes a copy of the provided object to the back of the list.

[AI]

[AI] Calls std::list<T>::push_back(p_obj). [AI]

Parameters
p_obj[AI] Object to add to the back of the list.

Definition at line 38 of file mxutilitylist.h.

◆ Remove()

template<class T >
void MxUtilityList< T >::Remove ( p_obj)
inline

[AI] Removes all matching objects from the list.

[AI]

[AI] Calls std::list<T>::remove(p_obj), which removes all elements equal to p_obj. [AI]

Parameters
p_obj[AI] Object(s) to remove from the list.

Definition at line 45 of file mxutilitylist.h.


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