#include <objdef.h>
Public Member Functions | |
ObjDefManager (IGameDef *gamedef, ObjDefType type) | |
virtual | ~ObjDefManager () |
DISABLE_CLASS_COPY (ObjDefManager) | |
virtual const char * | getObjectTitle () const |
virtual void | clear () |
virtual ObjDef * | getByName (const std::string &name) const |
virtual ObjDefHandle | add (ObjDef *obj) |
virtual ObjDef * | get (ObjDefHandle handle) const |
virtual ObjDef * | set (ObjDefHandle handle, ObjDef *obj) |
virtual u32 | addRaw (ObjDef *obj) |
virtual ObjDef * | getRaw (u32 index) const |
virtual ObjDef * | setRaw (u32 index, ObjDef *obj) |
size_t | getNumObjects () const |
ObjDefType | getType () const |
const NodeDefManager * | getNodeDef () const |
u32 | validateHandle (ObjDefHandle handle) const |
Static Public Member Functions | |
static ObjDefHandle | createHandle (u32 index, ObjDefType type, u32 uid) |
static bool | decodeHandle (ObjDefHandle handle, u32 *index, ObjDefType *type, u32 *uid) |
Protected Member Functions | |
ObjDefManager () | |
void | cloneTo (ObjDefManager *mgr) const |
Protected Attributes | |
const NodeDefManager * | m_ndef |
std::vector< ObjDef * > | m_objects |
ObjDefType | m_objtype |
ObjDefManager::ObjDefManager | ( | IGameDef * | gamedef, |
ObjDefType | type ) |
References IGameDef::getNodeDefManager(), m_ndef, and m_objtype.
|
virtual |
References m_objects.
|
inlineprotected |
|
virtual |
References addRaw(), createHandle(), getByName(), ObjDef::handle, m_objtype, ObjDef::name, OBJDEF_INVALID_HANDLE, OBJDEF_INVALID_INDEX, and ObjDef::uid.
Referenced by BiomeManager::BiomeManager(), get_or_load_biome(), get_or_load_schematic(), ModApiMapgen::l_register_biome(), ModApiMapgen::l_register_decoration(), ModApiMapgen::l_register_ore(), ModApiMapgen::l_register_schematic(), TestObjDef::testAddGetSetClear(), and TestObjDef::testClone().
|
virtual |
References getObjectTitle(), ObjDef::index, infostream, m_objects, myrand(), ObjDef::name, OBJDEF_MAX_ITEMS, OBJDEF_UID_MASK, and ObjDef::uid.
Referenced by add().
|
virtual |
Reimplemented in BiomeManager, OreManager, and SchematicManager.
References m_objects.
Referenced by SchematicManager::clear(), ModApiMapgen::l_clear_registered_decorations(), TestObjDef::testAddGetSetClear(), and TestObjDef::testClone().
|
protected |
References m_ndef, m_objects, and m_objtype.
Referenced by BiomeManager::clone(), DecorationManager::clone(), MyObjDefManager::clone(), OreManager::clone(), and SchematicManager::clone().
|
static |
References calc_parity(), OBJDEF_HANDLE_SALT, and set_bits().
Referenced by add(), and TestObjDef::testHandles().
|
static |
References calc_parity(), get_bits(), OBJDEF_HANDLE_SALT, and set_bits().
Referenced by TestObjDef::testHandles(), and validateHandle().
ObjDefManager::DISABLE_CLASS_COPY | ( | ObjDefManager | ) |
|
virtual |
References getRaw(), OBJDEF_INVALID_INDEX, and validateHandle().
Referenced by get_objdef(), TestObjDef::testAddGetSetClear(), and TestObjDef::testClone().
|
virtual |
References m_objects, and ObjDef::name.
Referenced by add(), get_objdef(), ModApiMapgen::l_get_biome_id(), ModApiMapgen::l_get_decoration_id(), and TestObjDef::testAddGetSetClear().
|
inline |
References m_ndef.
Referenced by get_or_load_biome(), get_or_load_schematic(), and ModApiMapgen::l_register_schematic().
|
inline |
References m_objects.
Referenced by BiomeGenOriginal::BiomeGenOriginal(), BiomeGenOriginal::calcBiomeFromNoise(), BiomeManager::clear(), SchematicManager::clear(), TestObjDef::testAddGetSetClear(), and TestObjDef::testClone().
|
inlinevirtual |
Reimplemented in BiomeManager, DecorationManager, OreManager, and SchematicManager.
Referenced by addRaw().
|
virtual |
References m_objects.
Referenced by BiomeGenOriginal::BiomeGenOriginal(), BiomeGenOriginal::calcBiomeFromNoise(), BiomeManager::clear(), SchematicManager::clear(), MapgenBasic::dustTopNodes(), CavesNoiseIntersection::generateCaves(), get(), ModApiMapgen::l_get_biome_name(), and TestObjDef::testClone().
|
inline |
References m_objtype.
Referenced by TestObjDef::testAddGetSetClear(), and TestObjDef::testClone().
|
virtual |
References ObjDef::handle, ObjDef::index, OBJDEF_INVALID_INDEX, setRaw(), ObjDef::uid, and validateHandle().
Referenced by TestObjDef::testAddGetSetClear().
u32 ObjDefManager::validateHandle | ( | ObjDefHandle | handle | ) | const |
References decodeHandle(), m_objects, m_objtype, and OBJDEF_INVALID_HANDLE.
Referenced by get(), and set().
|
protected |
Referenced by BiomeManager::BiomeManager(), ObjDefManager(), cloneTo(), and getNodeDef().
|
protected |
|
protected |
Referenced by ObjDefManager(), add(), cloneTo(), getType(), and validateHandle().