mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-26 01:44:19 +00:00
More implementation
This commit is contained in:
@@ -88,7 +88,11 @@ public:
|
||||
|
||||
MxBool Find(T p_obj);
|
||||
void Detach();
|
||||
void Destroy();
|
||||
MxBool Next(T& p_obj);
|
||||
MxBool Current(T& p_obj);
|
||||
void Advance();
|
||||
MxListEntry<T> *GetMatch() { return m_match; }
|
||||
void SetValue(T p_obj);
|
||||
void Head() { m_match = m_list->m_first; }
|
||||
void Reset() { m_match = NULL; }
|
||||
@@ -209,6 +213,12 @@ inline void MxListCursor<T>::Detach()
|
||||
m_match = NULL;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void MxListCursor<T>::Destroy()
|
||||
{
|
||||
m_list->m_customDestructor(m_match->GetValue());
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline MxBool MxListCursor<T>::Next(T& p_obj)
|
||||
{
|
||||
@@ -223,6 +233,24 @@ inline MxBool MxListCursor<T>::Next(T& p_obj)
|
||||
return m_match != NULL;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline MxBool MxListCursor<T>::Current(T& p_obj)
|
||||
{
|
||||
if (m_match)
|
||||
p_obj = m_match->GetValue();
|
||||
|
||||
return m_match != NULL;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void MxListCursor<T>::Advance()
|
||||
{
|
||||
if (!m_match)
|
||||
m_match = m_list->m_first;
|
||||
else
|
||||
m_match = m_match->m_next;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void MxListCursor<T>::SetValue(T p_obj)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user