2023-08-31 21:54:25 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../../VTAll.hpp"
|
|
|
|
#include "CKBeObject.hpp"
|
|
|
|
|
|
|
|
namespace LibCmo::CK2::ObjImpls {
|
|
|
|
|
|
|
|
class CKGroup : public CKBeObject {
|
|
|
|
public:
|
2023-09-01 12:19:06 +08:00
|
|
|
CKGroup(CKContext* ctx, CK_ID ckid, CKSTRING name);
|
|
|
|
virtual ~CKGroup();
|
2023-08-31 21:54:25 +08:00
|
|
|
LIBCMO_DISABLE_COPY_MOVE(CKGroup);
|
|
|
|
|
|
|
|
virtual CK_CLASSID GetClassID(void) override {
|
|
|
|
return CK_CLASSID::CKCID_GROUP;
|
|
|
|
}
|
|
|
|
//virtual void PreSave(CKFileVisitor* file, CKDWORD flags) override;
|
|
|
|
virtual bool Save(CKStateChunk* chunk, CKFileVisitor* file, CKDWORD flags) override;
|
|
|
|
virtual bool Load(CKStateChunk* chunk, CKFileVisitor* file) override;
|
|
|
|
//virtual void PostLoad() override;
|
|
|
|
|
2023-09-01 13:27:46 +08:00
|
|
|
CKDWORD CKBeObject_GetGroupIndex();
|
2023-08-31 21:54:25 +08:00
|
|
|
|
|
|
|
// ===== Insert =====
|
|
|
|
CKERROR AddObject(CKBeObject *o);
|
|
|
|
|
|
|
|
// ===== Remove =====
|
|
|
|
CKBeObject* RemoveObject(CKDWORD pos);
|
|
|
|
void RemoveObject(CKBeObject *obj);
|
|
|
|
void Clear();
|
|
|
|
|
|
|
|
// ===== Access =====
|
2023-09-01 12:19:06 +08:00
|
|
|
CKBeObject* GetObject(CKDWORD pos);
|
2023-08-31 21:54:25 +08:00
|
|
|
CKDWORD GetObjectCount();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
XContainer::XObjectPointerArray m_ObjectArray;
|
|
|
|
CKDWORD m_GroupIndex;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|