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
|
|
|
}
|
|
|
|
|
2024-02-25 09:14:39 -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; }
|
|
|
|
|
2024-02-01 15:42:10 -05:00
|
|
|
~MxCollection() override {}
|
2023-11-12 19:25:56 -05:00
|
|
|
virtual MxS8 Compare(T, T) { return 0; }
|
|
|
|
|
|
|
|
protected:
|
2024-01-29 16:17:17 -05:00
|
|
|
MxU32 m_count; // 0x08
|
|
|
|
void (*m_customDestructor)(T); // 0x0c
|
2023-11-12 19:25:56 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MXCOLLECTION_H
|