Implement/match MxLoopingSmkPresenter (#351)

* Implement/match MxLoopingSmkPresenter

* Rename variable

* Rename variable
This commit is contained in:
Christian Semmler
2023-12-22 14:05:42 -05:00
committed by GitHub
parent e22ad6031c
commit cdc7b43db2
6 changed files with 156 additions and 14 deletions

View File

@@ -92,6 +92,8 @@ public:
void Destroy();
MxBool Next(T& p_obj);
MxBool Current(T& p_obj);
MxBool First(T& p_obj);
MxBool Last(T& p_obj);
MxBool Advance();
MxBool HasMatch() { return m_match != NULL; }
void SetValue(T p_obj);
@@ -229,6 +231,26 @@ inline MxBool MxListCursor<T>::Current(T& p_obj)
return m_match != NULL;
}
template <class T>
inline MxBool MxListCursor<T>::First(T& p_obj)
{
m_match = m_list->m_first;
if (m_match)
p_obj = m_match->GetValue();
return m_match != NULL;
}
template <class T>
inline MxBool MxListCursor<T>::Last(T& p_obj)
{
m_match = m_list->m_last;
if (m_match)
p_obj = m_match->GetValue();
return m_match != NULL;
}
template <class T>
inline MxBool MxListCursor<T>::Advance()
{