QuestWeaver
A procedural quest generator
weave::StoryTemplate Class Referenceabstract

#include <StoryTemplate.h>

Collaboration diagram for weave::StoryTemplate:

Public Member Functions

 StoryTemplate (std::string rawText, std::set< std::string > requiredEntities) noexcept
 
virtual ~StoryTemplate ()=default
 
virtual StoryTemplateResult CreateStory (const EntityMap &requiredEntities, const WeaverGraph &graph, const WorldModel &worldModel) const =0
 
std::set< std::string > GetRequiredEntities () const noexcept
 
virtual bool IsValid (const EntityMap &requiredEntities, const WeaverGraph &graph, const WorldModel &worldModel) const
 

Protected Member Functions

TokenMapping createTokenMapping (const TokenToEntityMap &idsPerToken) const
 

Protected Attributes

std::string rawText
 
std::set< std::string > requiredEntities
 
std::unordered_map< std::string, std::vector< RawStoryToken > > tokenCache
 

Detailed Description

Definition at line 65 of file StoryTemplate.h.

Constructor & Destructor Documentation

weave::StoryTemplate::StoryTemplate ( std::string  rawText,
std::set< std::string >  requiredEntities 
)
noexcept
virtual weave::StoryTemplate::~StoryTemplate ( )
virtualdefault

Member Function Documentation

virtual StoryTemplateResult weave::StoryTemplate::CreateStory ( const EntityMap requiredEntities,
const WeaverGraph &  graph,
const WorldModel worldModel 
) const
pure virtual
TokenMapping weave::StoryTemplate::createTokenMapping ( const TokenToEntityMap idsPerToken) const
protected
std::set<std::string> weave::StoryTemplate::GetRequiredEntities ( ) const
noexcept
virtual bool weave::StoryTemplate::IsValid ( const EntityMap requiredEntities,
const WeaverGraph &  graph,
const WorldModel worldModel 
) const
virtual

Member Data Documentation

std::string weave::StoryTemplate::rawText
protected

Definition at line 80 of file StoryTemplate.h.

std::set<std::string> weave::StoryTemplate::requiredEntities
protected

Definition at line 81 of file StoryTemplate.h.

std::unordered_map<std::string, std::vector<RawStoryToken> > weave::StoryTemplate::tokenCache
mutableprotected

Definition at line 82 of file StoryTemplate.h.


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