载入中...
搜索中...
未找到
eve::dialogue::ConversationTextRenderer类 参考

Parameter substitution and state-driven character voice modifiers. 更多...

#include <ConversationText.h>

类

struct  ToneRule
 ToneRule public API. 更多...
 

Public 类型

using Evaluator = std::function< bool(const std::string &)>
 

Public 成员函数

std::string render (const std::string &text, const eve::Value &bindings, const eve::Value &locals, const Evaluator &evaluate={}) const
 Render placeholders from locals first, then bindings, and apply matching tone rules.
 
void addToneRule (std::string expression, std::string prefix, std::string suffix, std::string find, std::string replacement)
 Append a state-dependent character voice rule.
 
void clearToneRules ()
 Remove all character voice rules.
 

详细描述

Parameter substitution and state-driven character voice modifiers.

在文件 ConversationText.h 第 14 行定义.

成员类型定义说明

◆ Evaluator

using eve::dialogue::ConversationTextRenderer::Evaluator = std::function<bool(const std::string&)>

在文件 ConversationText.h 第 16 行定义.

成员函数说明

◆ addToneRule()

void eve::dialogue::ConversationTextRenderer::addToneRule ( std::string  expression,
std::string  prefix,
std::string  suffix,
std::string  find,
std::string  replacement 
)

Append a state-dependent character voice rule.

在文件 ConversationText.cpp 第 102 行定义.

◆ clearToneRules()

void eve::dialogue::ConversationTextRenderer::clearToneRules ( )
inline

Remove all character voice rules.

在文件 ConversationText.h 第 32 行定义.

◆ render()

std::string eve::dialogue::ConversationTextRenderer::render ( const std::string &  text,
const eve::Value &  bindings,
const eve::Value &  locals,
const Evaluator &  evaluate = {} 
) const

Render placeholders from locals first, then bindings, and apply matching tone rules.

在文件 ConversationText.cpp 第 73 行定义.

引用了 bindings, cursor, output, text , 以及 value.


该类的文档由以下文件生成: