载入中...
搜索中...
未找到

Runtime variant used by the script-facing (Squirrel) streams. The C++ core is templated (Observer<T>/Observable<T>/Subject<T>); the module binds a Value-typed specialization so scripts can push nil/int/float/bool/ string/ptr. 更多...

#include <Rx.h>

Public 类型

enum class  Type {
  Nil , Int , Float , Bool ,
  String , Ptr
}
 Type public API. 更多...
 

Public 成员函数

bool isNil () const
 Type predicates.
 
bool isInt () const
 
bool isFloat () const
 
bool isBool () const
 
bool isString () const
 
bool isPtr () const
 
int64_t toInt () const
 Converters (throw eve::Exception on type mismatch).
 
double toFloat () const
 
bool toBool () const
 
std::string toString () const
 
bool equals (const Value &o) const
 Value equality across the supported types.
 

静态 Public 成员函数

static Value makeNil ()
 Constructs a nil value.
 
static Value makeInt (int64_t v)
 Constructs an integer value.
 
static Value makeFloat (double v)
 Constructs a floating-point value.
 
static Value makeBool (bool v)
 Constructs a boolean value.
 
static Value makeString (std::string v)
 Constructs a string value (takes ownership).
 
static Value makePtr (void *v)
 Constructs a pointer value (borrowed, not owned).
 

Public 属性

Type type = Type::Nil
 
int64_t i = 0
 
double f = 0
 
bool b = false
 
std::string s
 
void * p = nullptr
 

详细描述

Runtime variant used by the script-facing (Squirrel) streams. The C++ core is templated (Observer<T>/Observable<T>/Subject<T>); the module binds a Value-typed specialization so scripts can push nil/int/float/bool/ string/ptr.

在文件 Rx.h 第 21 行定义.

成员枚举类型说明

◆ Type

enum class eve::rx::Value::Type
strong

Type public API.

枚举值
Nil 
Int 
Float 
Bool 
String 
Ptr 

在文件 Rx.h 第 24 行定义.

成员函数说明

◆ equals()

bool eve::rx::Value::equals ( const Value &  o) const

Value equality across the supported types.

在文件 Rx.cpp 第 68 行定义.

引用了 b, Bool, f, Float, i, Int, p, Ptr, s, String , 以及 type.

◆ isBool()

bool eve::rx::Value::isBool ( ) const
inline

在文件 Rx.h 第 75 行定义.

引用了 type.

◆ isFloat()

bool eve::rx::Value::isFloat ( ) const
inline

在文件 Rx.h 第 74 行定义.

引用了 type.

◆ isInt()

bool eve::rx::Value::isInt ( ) const
inline

在文件 Rx.h 第 73 行定义.

引用了 type.

◆ isNil()

bool eve::rx::Value::isNil ( ) const
inline

Type predicates.

在文件 Rx.h 第 72 行定义.

引用了 type.

◆ isPtr()

bool eve::rx::Value::isPtr ( ) const
inline

在文件 Rx.h 第 77 行定义.

引用了 type.

◆ isString()

bool eve::rx::Value::isString ( ) const
inline

在文件 Rx.h 第 76 行定义.

引用了 type.

◆ makeBool()

static Value eve::rx::Value::makeBool ( bool  v)
inlinestatic

Constructs a boolean value.

在文件 Rx.h 第 50 行定义.

引用了 type, v , 以及 x.

被这些函数引用 ssq::detail::popValue().

◆ makeFloat()

static Value eve::rx::Value::makeFloat ( double  v)
inlinestatic

Constructs a floating-point value.

在文件 Rx.h 第 43 行定义.

引用了 type, v , 以及 x.

被这些函数引用 ssq::detail::popValue().

◆ makeInt()

static Value eve::rx::Value::makeInt ( int64_t  v)
inlinestatic

Constructs an integer value.

在文件 Rx.h 第 36 行定义.

引用了 type, v , 以及 x.

被这些函数引用 ssq::detail::popValue().

◆ makeNil()

static Value eve::rx::Value::makeNil ( )
inlinestatic

Constructs a nil value.

在文件 Rx.h 第 34 行定义.

被这些函数引用 ssq::detail::popValue().

◆ makePtr()

static Value eve::rx::Value::makePtr ( void *  v)
inlinestatic

Constructs a pointer value (borrowed, not owned).

在文件 Rx.h 第 64 行定义.

引用了 type, v , 以及 x.

被这些函数引用 ssq::detail::popValue().

◆ makeString()

static Value eve::rx::Value::makeString ( std::string  v)
inlinestatic

Constructs a string value (takes ownership).

在文件 Rx.h 第 57 行定义.

引用了 type, v , 以及 x.

被这些函数引用 ssq::detail::popValue() , 以及 eve::rx::Rx::pump().

◆ toBool()

bool eve::rx::Value::toBool ( ) const

在文件 Rx.cpp 第 46 行定义.

引用了 b, Bool, f, Float, i, Int, p, Ptr, s, String , 以及 type.

◆ toFloat()

double eve::rx::Value::toFloat ( ) const

在文件 Rx.cpp 第 31 行定义.

引用了 b, Bool, f, Float, i, Int, s, String , 以及 type.

◆ toInt()

int64_t eve::rx::Value::toInt ( ) const

Converters (throw eve::Exception on type mismatch).

在文件 Rx.cpp 第 16 行定义.

引用了 b, Bool, f, Float, i, Int, s, String , 以及 type.

◆ toString()

std::string eve::rx::Value::toString ( ) const

在文件 Rx.cpp 第 57 行定义.

引用了 b, Bool, f, Float, i, Int, Ptr, s, String , 以及 type.

类成员变量说明

◆ b

bool eve::rx::Value::b = false

在文件 Rx.h 第 29 行定义.

被这些函数引用 equals(), toBool(), toFloat(), toInt() , 以及 toString().

◆ f

double eve::rx::Value::f = 0

在文件 Rx.h 第 28 行定义.

被这些函数引用 equals(), toBool(), toFloat(), toInt() , 以及 toString().

◆ i

int64_t eve::rx::Value::i = 0

在文件 Rx.h 第 27 行定义.

被这些函数引用 equals(), toBool(), toFloat(), toInt() , 以及 toString().

◆ p

void* eve::rx::Value::p = nullptr

在文件 Rx.h 第 31 行定义.

被这些函数引用 equals() , 以及 toBool().

◆ s

std::string eve::rx::Value::s

在文件 Rx.h 第 30 行定义.

被这些函数引用 equals(), toBool(), toFloat(), toInt() , 以及 toString().

◆ type

Type eve::rx::Value::type = Type::Nil

在文件 Rx.h 第 26 行定义.

被这些函数引用 equals(), makeBool(), makeFloat(), makeInt(), makePtr(), makeString(), toBool(), toFloat(), toInt() , 以及 toString().


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