QuestWeaver
A procedural quest generator
weave::WorldEntity Class Referenceabstract

Represents an object in the game that is relevant for the quest system. More...

#include <WorldEntity.h>

Public Member Functions

 WorldEntity ()
 Creates a new entity without an ID. More...
 
virtual ~WorldEntity ()
 
ID GetId () const
 Returns the entity's ID. More...
 
virtual std::string GetType () const noexcept=0
 Returns the type of the entity (e.g. More...
 
virtual std::string ToString () const noexcept=0
 Returns a string representation of the entity to be used in the quest generation. More...
 

Static Public Attributes

static const ID NoID = 0
 Entities not registered with any world model have this default ID. More...
 

Protected Member Functions

 WorldEntity (ID id)
 Creates a new entity with the given ID. More...
 

Detailed Description

Represents an object in the game that is relevant for the quest system.

Definition at line 17 of file WorldEntity.h.

Constructor & Destructor Documentation

weave::WorldEntity::WorldEntity ( )
inline

Creates a new entity without an ID.

Definition at line 27 of file WorldEntity.h.

virtual weave::WorldEntity::~WorldEntity ( )
inlinevirtual

Definition at line 29 of file WorldEntity.h.

weave::WorldEntity::WorldEntity ( ID  id)
inlineexplicitprotected

Creates a new entity with the given ID.

This constructor should only be used by subclasses for deserialization.

Definition at line 52 of file WorldEntity.h.

Member Function Documentation

ID weave::WorldEntity::GetId ( ) const

Returns the entity's ID.

virtual std::string weave::WorldEntity::GetType ( ) const
pure virtualnoexcept

Returns the type of the entity (e.g.

"location" or "beast"). This type is used in the quest and story templates to define which entities can be used for the quest generation.

virtual std::string weave::WorldEntity::ToString ( ) const
pure virtualnoexcept

Returns a string representation of the entity to be used in the quest generation.

Member Data Documentation

const ID weave::WorldEntity::NoID = 0
static

Entities not registered with any world model have this default ID.

Definition at line 22 of file WorldEntity.h.


The documentation for this class was generated from the following file: