2023-08-31 21:54:25 +08:00
|
|
|
#pragma once
|
|
|
|
|
2024-08-17 20:43:27 +08:00
|
|
|
#include "../../VTInternal.hpp"
|
2023-08-31 21:54:25 +08:00
|
|
|
#include "CKSceneObject.hpp"
|
|
|
|
|
|
|
|
namespace LibCmo::CK2::ObjImpls {
|
|
|
|
|
|
|
|
class CKBeObject : public CKSceneObject {
|
|
|
|
public:
|
2023-09-06 10:42:23 +08:00
|
|
|
CKBeObject(CKContext* ctx, CK_ID ckid, CKSTRING name);
|
|
|
|
virtual ~CKBeObject();
|
2024-08-17 20:43:27 +08:00
|
|
|
YYCC_DEL_CLS_COPY_MOVE(CKBeObject);
|
2023-08-31 21:54:25 +08:00
|
|
|
|
|
|
|
virtual CK_CLASSID GetClassID(void) override {
|
|
|
|
return CK_CLASSID::CKCID_BEOBJECT;
|
|
|
|
}
|
2023-09-22 16:40:10 +08:00
|
|
|
|
2023-08-31 21:54:25 +08:00
|
|
|
virtual bool Save(CKStateChunk* chunk, CKFileVisitor* file, CKDWORD flags) override;
|
|
|
|
virtual bool Load(CKStateChunk* chunk, CKFileVisitor* file) override;
|
|
|
|
|
2023-09-22 16:40:10 +08:00
|
|
|
/**
|
|
|
|
* @brief Check whether this object is in specified group.
|
|
|
|
* @param group[in] The group to be checked.
|
|
|
|
* @return True if in it.
|
|
|
|
*/
|
|
|
|
bool IsInGroup(CKGroup* group) const;
|
2023-09-16 22:38:21 +08:00
|
|
|
/**
|
|
|
|
* @brief Directly set group data.
|
|
|
|
* @param pos
|
|
|
|
* @param val
|
|
|
|
* @warning This function only should be called by CKGroup. Any other classes should not call this.
|
|
|
|
*/
|
|
|
|
void ExplicitSetGroup(CKDWORD pos, bool val);
|
2023-08-31 21:54:25 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
XContainer::XBitArray m_Groups;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|