VLink  2.0.0
A high-performance communication middleware
vlink::ExprtkSymbolTable类 参考final

Opaque wrapper around exprtk::symbol_table<double>. 更多...

#include <exprtk_api.h>

vlink::ExprtkSymbolTable 的协作图:

Public 成员函数

 ExprtkSymbolTable ()
 Construct an empty symbol table. 更多...
 
 ~ExprtkSymbolTable ()
 Destroy the symbol table and release the underlying ExprTk state. 更多...
 
 ExprtkSymbolTable (ExprtkSymbolTable &&) noexcept
 Move constructor; transfers ownership of the underlying ExprTk state. 更多...
 
ExprtkSymbolTableoperator= (ExprtkSymbolTable &&) noexcept
 Move assignment; transfers ownership of the underlying ExprTk state. 更多...
 
void add_constants ()
 Register the standard ExprTk constants (pi, epsilon, inf, ...). 更多...
 
bool add_variable (const std::string &name, double &value)
 Register a named variable bound by reference. 更多...
 

友元

class ExprtkExpression
 

详细描述

Opaque wrapper around exprtk::symbol_table<double>.

Holds the named constants and variables an expression may reference. Variables are registered by reference: the symbol table stores the address of the supplied double, so the referenced storage must stay alive and at a fixed address for the whole lifetime of the symbol table and any expression compiled against it.

The class is move-only; the underlying ExprTk symbol table lives on the heap behind a std::unique_ptr, so moving the wrapper never relocates it.

构造及析构函数说明

◆ ExprtkSymbolTable() [1/2]

vlink::ExprtkSymbolTable::ExprtkSymbolTable ( )

Construct an empty symbol table.

◆ ~ExprtkSymbolTable()

vlink::ExprtkSymbolTable::~ExprtkSymbolTable ( )

Destroy the symbol table and release the underlying ExprTk state.

◆ ExprtkSymbolTable() [2/2]

vlink::ExprtkSymbolTable::ExprtkSymbolTable ( ExprtkSymbolTable &&  )
noexcept

Move constructor; transfers ownership of the underlying ExprTk state.

成员函数说明

◆ add_constants()

void vlink::ExprtkSymbolTable::add_constants ( )

Register the standard ExprTk constants (pi, epsilon, inf, ...).

Mirrors exprtk::symbol_table<double>::add_constants().

◆ add_variable()

bool vlink::ExprtkSymbolTable::add_variable ( const std::string &  name,
double &  value 
)

Register a named variable bound by reference.

参数
nameIdentifier used inside expression strings.
valueReference to caller-owned storage; its address is captured, so it must outlive this table and must not be relocated after registration.
返回
true if the variable was added, false on a duplicate or invalid name.

◆ operator=()

ExprtkSymbolTable& vlink::ExprtkSymbolTable::operator= ( ExprtkSymbolTable &&  )
noexcept

Move assignment; transfers ownership of the underlying ExprTk state.

友元及相关函数文档

◆ ExprtkExpression

friend class ExprtkExpression
friend

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