mirror of
https://github.com/isledecomp/isle.git
synced 2024-12-21 21:42:50 -05:00
bcdddd4c7e
* Pad all single-digit hexadecimal values with zero * One more fix
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
#ifndef MXSTREAMLIST_H
|
|
#define MXSTREAMLIST_H
|
|
|
|
#include "mxdsstreamingaction.h"
|
|
#include "mxdssubscriber.h"
|
|
#include "mxnextactiondatastart.h"
|
|
#include "mxstl/stlcompat.h"
|
|
|
|
template <class T>
|
|
class MxStreamList : public list<T> {
|
|
public:
|
|
MxBool PopFront(T& p_obj)
|
|
{
|
|
if (this->empty())
|
|
return FALSE;
|
|
|
|
p_obj = this->front();
|
|
this->pop_front();
|
|
return TRUE;
|
|
}
|
|
};
|
|
|
|
// SIZE 0x0c
|
|
class MxStreamListMxDSAction : public MxStreamList<MxDSAction*> {
|
|
public:
|
|
MxDSAction* Find(MxDSAction* p_action, MxBool p_delete);
|
|
|
|
// 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;
|
|
}
|
|
};
|
|
|
|
// SIZE 0x0c
|
|
class MxStreamListMxNextActionDataStart : public MxStreamList<MxNextActionDataStart*> {
|
|
public:
|
|
MxNextActionDataStart* Find(MxU32 p_id, MxS16 p_value);
|
|
MxNextActionDataStart* FindAndErase(MxU32 p_id, MxS16 p_value);
|
|
};
|
|
|
|
// SIZE 0x0c
|
|
class MxStreamListMxDSSubscriber : public MxStreamList<MxDSSubscriber*> {
|
|
public:
|
|
MxDSSubscriber* Find(MxDSObject* p_object);
|
|
};
|
|
|
|
#endif // MXSTREAMLIST_H
|