载入中...
搜索中...
未找到
eve::rpg::AttributeOpTable类 参考

自定义 op 注册表:opName -> f(currentResult, modifierValue) -> newResult。 更多...

#include <AttributeSystem.h>

Public 类型

using Fn = std::function< double(double current, double value)>
 

Public 成员函数

void registerOp (const std::string &name, Fn fn)
 
void unregisterOp (const std::string &name)
 
bool has (const std::string &name) const
 
double apply (const std::string &name, double current, double value) const
 

详细描述

自定义 op 注册表:opName -> f(currentResult, modifierValue) -> newResult。

在文件 AttributeSystem.h22 行定义.

成员类型定义说明

◆ Fn

using eve::rpg::AttributeOpTable::Fn = std::function<double(double current, double value)>

在文件 AttributeSystem.h24 行定义.

成员函数说明

◆ apply()

double eve::rpg::AttributeOpTable::apply ( const std::string &  name,
double  current,
double  value 
) const

在文件 AttributeSystem.cpp15 行定义.

引用了 name , 以及 value.

被这些函数引用 eve::rpg::computeAttributeValue().

◆ has()

bool eve::rpg::AttributeOpTable::has ( const std::string &  name) const

在文件 AttributeSystem.cpp13 行定义.

引用了 name.

被这些函数引用 eve::rpg::computeAttributeValue().

◆ registerOp()

void eve::rpg::AttributeOpTable::registerOp ( const std::string &  name,
Fn  fn 
)

在文件 AttributeSystem.cpp9 行定义.

引用了 fn , 以及 name.

◆ unregisterOp()

void eve::rpg::AttributeOpTable::unregisterOp ( const std::string &  name)

在文件 AttributeSystem.cpp11 行定义.

引用了 name.


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