QuestWeaver
A procedural quest generator
weave::MetaData Class Reference

Holds information about a world entity. More...

#include <MetaData.h>

Public Member Functions

int GetValue (const std::string &name) const
 Returns the value associated with the given key. More...
 
std::vector< std::string > GetValueNames () const
 Returns the names of all keys this container has values for. More...
 
bool HasValue (const std::string &name) const
 Returns true if this container holds a value for the given key. More...
 
MetaDataSetValue (const std::string &name, int value)
 Saves a value for the given key in this container. More...
 

Detailed Description

Holds information about a world entity.

World entities are considered stateless by the quest system, so any information about their involvement in quests is saved as MetaData.

Definition at line 20 of file MetaData.h.

Member Function Documentation

int weave::MetaData::GetValue ( const std::string &  name) const

Returns the value associated with the given key.

If this container does not have a value associated with the key then 0 is returned.

std::vector<std::string> weave::MetaData::GetValueNames ( ) const

Returns the names of all keys this container has values for.

bool weave::MetaData::HasValue ( const std::string &  name) const

Returns true if this container holds a value for the given key.

MetaData& weave::MetaData::SetValue ( const std::string &  name,
int  value 
)

Saves a value for the given key in this container.


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