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

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
}
 

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.h19 行定义.

成员枚举类型说明

◆ Type

enum class eve::rx::Value::Type
strong
枚举值
Nil 
Int 
Float 
Bool 
String 
Ptr 

在文件 Rx.h21 行定义.

成员函数说明

◆ equals()

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

Value equality across the supported types.

在文件 Rx.cpp68 行定义.

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

◆ isBool()

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

在文件 Rx.h72 行定义.

引用了 Bool , 以及 type.

◆ isFloat()

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

在文件 Rx.h71 行定义.

引用了 Float , 以及 type.

◆ isInt()

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

在文件 Rx.h70 行定义.

引用了 Int , 以及 type.

◆ isNil()

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

Type predicates.

在文件 Rx.h69 行定义.

引用了 Nil , 以及 type.

◆ isPtr()

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

在文件 Rx.h74 行定义.

引用了 Ptr , 以及 type.

◆ isString()

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

在文件 Rx.h73 行定义.

引用了 String , 以及 type.

◆ makeBool()

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

Constructs a boolean value.

在文件 Rx.h47 行定义.

引用了 Bool, type, v , 以及 x.

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

◆ makeFloat()

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

Constructs a floating-point value.

在文件 Rx.h40 行定义.

引用了 Float, type, v , 以及 x.

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

◆ makeInt()

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

Constructs an integer value.

在文件 Rx.h33 行定义.

引用了 Int, type, v , 以及 x.

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

◆ makeNil()

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

Constructs a nil value.

在文件 Rx.h31 行定义.

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

◆ makePtr()

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

Constructs a pointer value (borrowed, not owned).

在文件 Rx.h61 行定义.

引用了 Ptr, type, v , 以及 x.

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

◆ makeString()

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

Constructs a string value (takes ownership).

在文件 Rx.h54 行定义.

引用了 String, type, v , 以及 x.

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

◆ toBool()

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

在文件 Rx.cpp46 行定义.

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

◆ toFloat()

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

在文件 Rx.cpp31 行定义.

引用了 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.cpp16 行定义.

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

◆ toString()

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

在文件 Rx.cpp57 行定义.

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

类成员变量说明

◆ b

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

在文件 Rx.h26 行定义.

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

◆ f

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

在文件 Rx.h25 行定义.

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

◆ i

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

在文件 Rx.h24 行定义.

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

◆ p

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

在文件 Rx.h28 行定义.

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

◆ s

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

在文件 Rx.h27 行定义.

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

◆ type

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

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