libcmo21/LibCmo/CK2/ObjImpls/CKGroup.hpp
yyc12345 ead22d13ff fix: remove useless void in function parameter list
- according to c++ standard, single void in function parameter is equal to empty parameter list. for removing this syntax which may cause misunderstanding (becuase in C, they are different I guess), I replace all `(void)` to `()`.
2024-12-28 22:09:26 +08:00

49 lines
1.2 KiB
C++

#pragma once
#include "../../VTInternal.hpp"
#include "CKBeObject.hpp"
namespace LibCmo::CK2::ObjImpls {
class CKGroup : public CKBeObject {
public:
CKGroup(CKContext* ctx, CK_ID ckid, CKSTRING name);
virtual ~CKGroup();
YYCC_DEL_CLS_COPY_MOVE(CKGroup);
virtual CK_CLASSID GetClassID() override {
return CK_CLASSID::CKCID_GROUP;
}
virtual void PreDelete() override;
virtual void CheckPreDeletion() override;
//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;
// it only have special Show method
virtual void Show(CK_OBJECT_SHOWOPTION show = CK_OBJECT_SHOWOPTION::CKSHOW) override;
CKDWORD GetGroupIndex() const;
// ===== Insert =====
CKERROR AddObject(CKBeObject *o);
// ===== Remove =====
CKBeObject* RemoveObject(CKDWORD pos);
void RemoveObject(CKBeObject *obj);
void Clear();
// ===== Access =====
CKBeObject* GetObject(CKDWORD pos) const;
CKDWORD GetObjectCount() const;
protected:
XContainer::XObjectPointerArray m_ObjectArray;
CKDWORD m_GroupIndex;
};
}