2023-11-28 08:26:39 -05:00
|
|
|
#ifndef MXSTREAMLIST_H
|
|
|
|
#define MXSTREAMLIST_H
|
|
|
|
|
2023-12-25 13:32:01 -05:00
|
|
|
#include "mxdsstreamingaction.h"
|
2023-11-28 08:26:39 -05:00
|
|
|
#include "mxdssubscriber.h"
|
|
|
|
#include "mxnextactiondatastart.h"
|
2023-12-11 16:33:46 -05:00
|
|
|
#include "mxstl/stlcompat.h"
|
2023-11-28 08:26:39 -05:00
|
|
|
|
|
|
|
template <class T>
|
2023-12-24 08:52:26 -05:00
|
|
|
class MxStreamList : public list<T> {
|
|
|
|
public:
|
|
|
|
MxBool PopFront(T& p_obj)
|
|
|
|
{
|
2024-01-06 12:56:15 -05:00
|
|
|
if (this->empty())
|
2023-12-24 08:52:26 -05:00
|
|
|
return FALSE;
|
|
|
|
|
2024-01-06 12:56:15 -05:00
|
|
|
p_obj = this->front();
|
|
|
|
this->pop_front();
|
2023-12-24 08:52:26 -05:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
};
|
2023-11-28 08:26:39 -05:00
|
|
|
|
2024-01-29 16:17:17 -05:00
|
|
|
// SIZE 0x0c
|
2023-11-28 08:26:39 -05:00
|
|
|
class MxStreamListMxDSAction : public MxStreamList<MxDSAction*> {
|
|
|
|
public:
|
|
|
|
MxDSAction* Find(MxDSAction* p_action, MxBool p_delete);
|
2023-12-25 13:32:01 -05:00
|
|
|
|
|
|
|
// There chance this list actually holds MxDSStreamingListAction
|
|
|
|
// instead of MxDSAction. Until then, we use this helper.
|
|
|
|
MxBool PopFrontStreamingAction(MxDSStreamingAction*& p_obj)
|
|
|
|
{
|
|
|
|
if (empty())
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
p_obj = (MxDSStreamingAction*) front();
|
|
|
|
pop_front();
|
|
|
|
return TRUE;
|
|
|
|
}
|
2023-11-28 08:26:39 -05:00
|
|
|
};
|
|
|
|
|
2024-01-29 16:17:17 -05:00
|
|
|
// SIZE 0x0c
|
2023-11-28 08:26:39 -05:00
|
|
|
class MxStreamListMxNextActionDataStart : public MxStreamList<MxNextActionDataStart*> {
|
|
|
|
public:
|
2023-12-26 20:39:48 -05:00
|
|
|
MxNextActionDataStart* Find(MxU32 p_id, MxS16 p_value);
|
|
|
|
MxNextActionDataStart* FindAndErase(MxU32 p_id, MxS16 p_value);
|
2023-11-28 08:26:39 -05:00
|
|
|
};
|
|
|
|
|
2024-01-29 16:17:17 -05:00
|
|
|
// SIZE 0x0c
|
2023-12-26 20:54:17 -05:00
|
|
|
class MxStreamListMxDSSubscriber : public MxStreamList<MxDSSubscriber*> {
|
|
|
|
public:
|
|
|
|
MxDSSubscriber* Find(MxDSObject* p_object);
|
|
|
|
};
|
2023-11-28 08:26:39 -05:00
|
|
|
|
|
|
|
#endif // MXSTREAMLIST_H
|