|
Nebula
|
#include <levelparser.h>
Base class for level parsing.
Entity format is defined as:
(C) 2024 Individual contributors, see AUTHORS file
Inherits Core::RefCounted.
Public Member Functions | |
| LevelParser () | |
| constructor | |
| virtual | ~LevelParser () |
| destructor | |
| void | SetWorld (Game::World *world) |
| Set the world that we want to load the levels into. | |
| Util::Array< Game::Entity > | LoadJsonLevel (const Ptr< IO::JsonReader > &reader) |
| Loads a level from a json file in work:levels. | |
Public Member Functions inherited from Core::RefCounted | |
| RefCounted () | |
| constructor | |
| int | GetRefCount () const |
| get the current refcount | |
| void | AddRef () |
| increment refcount by one | |
| void | Release () |
| decrement refcount and destroy object if refcount is zero | |
| bool | IsInstanceOf (const Rtti &rtti) const |
| return true if this object is instance of given class | |
| bool | IsInstanceOf (const Util::String &className) const |
| return true if this object is instance of given class by string | |
| bool | IsInstanceOf (const Util::FourCC &classFourCC) const |
| return true if this object is instance of given class by fourcc | |
| bool | IsA (const Rtti &rtti) const |
| return true if this object is instance of given class, or a derived class | |
| bool | IsA (const Util::String &rttiName) const |
| return true if this object is instance of given class, or a derived class, by string | |
| bool | IsA (const Util::FourCC &rttiFourCC) const |
| return true if this object is instance of given class, or a derived class, by fourcc | |
| const Util::String & | GetClassName () const |
| get the class name | |
| Util::FourCC | GetClassFourCC () const |
| get the class FourCC code | |
Protected Member Functions | |
| Game::Entity | LoadEntity (const Ptr< IO::JsonReader > &reader) |
| parse a single object | |
| void | LoadComponents (const Ptr< IO::JsonReader > &reader, Game::Entity entity) |
| parse all components for an entity | |
| virtual void | BeginLoad () |
| called at beginning of load | |
| virtual void | AddEntity (Game::Entity entity, Util::Guid const &guid) |
| add entity | |
| virtual void | SetName (Game::Entity entity, const Util::String &name) |
| set entity name | |
| virtual void | CommitEntity (Game::Entity entity) |
| entity loaded completely | |
| virtual void | CommitLevel () |
| parsing done | |
Protected Member Functions inherited from Core::RefCounted | |
| virtual | ~RefCounted () |
| destructor (called when refcount reaches zero) | |
Private Member Functions | |
| __DeclareClass (LevelParser) | |
Private Attributes | |
| Util::Array< Util::String > | invalidAttrs |
| Util::HashTable< Util::Guid, Game::Entity > | guidToEntity |
| Game::World * | world |
Additional Inherited Members | |
Static Public Member Functions inherited from Core::RefCounted | |
| static void | DumpRefCountingLeaks () |
| dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!) | |
| BaseGameFeature::LevelParser::LevelParser | ( | ) |
constructor
|
virtual |
destructor
|
private |
|
inlineprotectedvirtual |
add entity
|
inlineprotectedvirtual |
called at beginning of load
|
inlineprotectedvirtual |
entity loaded completely
|
inlineprotectedvirtual |
parsing done
|
protected |
parse all components for an entity
|
protected |
parse a single object
| Util::Array< Game::Entity > BaseGameFeature::LevelParser::LoadJsonLevel | ( | const Ptr< IO::JsonReader > & | reader | ) |
Loads a level from a json file in work:levels.
|
inlineprotectedvirtual |
set entity name
| void BaseGameFeature::LevelParser::SetWorld | ( | Game::World * | world | ) |
Set the world that we want to load the levels into.
|
private |
|
private |
|
private |