typedef u32 ObjDefHandle;
-enum ObjDefType
-{
+enum ObjDefType {
OBJDEF_GENERIC,
OBJDEF_BIOME,
OBJDEF_ORE,
OBJDEF_SCHEMATIC,
};
-class ObjDef
-{
+class ObjDef {
public:
virtual ~ObjDef() = default;
// added/set to. Note that ObjDefs managed by ObjDefManager are NOT refcounted,
// so the same ObjDef instance must not be referenced multiple
// TODO: const correctness for getter methods
-class ObjDefManager
-{
+class ObjDefManager {
public:
ObjDefManager(IGameDef *gamedef, ObjDefType type);
virtual ~ObjDefManager();
u32 validateHandle(ObjDefHandle handle) const;
static ObjDefHandle createHandle(u32 index, ObjDefType type, u32 uid);
- static bool decodeHandle(
- ObjDefHandle handle, u32 *index, ObjDefType *type, u32 *uid);
+ static bool decodeHandle(ObjDefHandle handle, u32 *index,
+ ObjDefType *type, u32 *uid);
protected:
- ObjDefManager(){};
+ ObjDefManager() {};
// Helper for child classes to implement clone()
void cloneTo(ObjDefManager *mgr) const;