2023-11-12 19:25:56 -05:00
|
|
|
#ifndef MXCOLLECTION_H
|
|
|
|
#define MXCOLLECTION_H
|
|
|
|
|
|
|
|
#include "mxcore.h"
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
class MxCollection : public MxCore {
|
|
|
|
public:
|
|
|
|
MxCollection()
|
|
|
|
{
|
|
|
|
m_count = 0;
|
2023-12-20 20:09:05 -05:00
|
|
|
SetDestroy(Destroy);
|
2023-11-12 19:25:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
static void Destroy(T){};
|
2023-12-20 20:09:05 -05:00
|
|
|
|
|
|
|
void SetDestroy(void (*p_customDestructor)(T)) { this->m_customDestructor = p_customDestructor; }
|
|
|
|
|
|
|
|
virtual ~MxCollection() {}
|
2023-11-12 19:25:56 -05:00
|
|
|
virtual MxS8 Compare(T, T) { return 0; }
|
|
|
|
|
|
|
|
protected:
|
2023-11-19 07:23:30 -05:00
|
|
|
MxU32 m_count; // 0x8
|
|
|
|
void (*m_customDestructor)(T); // 0xc
|
2023-11-12 19:25:56 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MXCOLLECTION_H
|