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

Variant public API. 更多...

#include <PlatformEvent.h>

Public 类型

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

Public 成员函数

bool ownsPointer () const
 Whether this pointer payload owns the pointed-to object.
 

静态 Public 成员函数

static Variant makeNil ()
 Constructs a nil variant.
 
static Variant makeInt (int64_t v)
 Constructs an integer variant.
 
static Variant makeString (std::string v)
 Constructs a string variant (takes ownership of the value).
 
static Variant makePtr (void *v)
 Constructs a pointer variant (borrowed, not owned).
 
template<class T >
static Variant makeOwnedPtr (T *v)
 Constructs an owning pointer variant deleted with the message.
 

Public 属性

Type type = Type::Nil
 
int64_t i = 0
 
std::string s
 
void * p = nullptr
 
std::shared_ptr< void > owner
 

详细描述

Variant public API.

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

成员枚举类型说明

◆ Type

Type public API.

枚举值
Nil 
Int 
String 
Ptr 

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

成员函数说明

◆ makeInt()

static Variant eve::platform_event::Variant::makeInt ( int64_t  v)
inlinestatic

Constructs an integer variant.

在文件 PlatformEvent.h 第 38 行定义.

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

被这些函数引用 eve::physics::World3D::emitContactEvents(), eve::physics::World::onBeginContact() , 以及 eve::physics::World::onEndContact().

◆ makeNil()

static Variant eve::platform_event::Variant::makeNil ( )
inlinestatic

Constructs a nil variant.

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

◆ makeOwnedPtr()

template<class T >
static Variant eve::platform_event::Variant::makeOwnedPtr ( T *  v)
inlinestatic

Constructs an owning pointer variant deleted with the message.

Make owned ptr.

在文件 PlatformEvent.h 第 61 行定义.

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

◆ makePtr()

static Variant eve::platform_event::Variant::makePtr ( void *  v)
inlinestatic

Constructs a pointer variant (borrowed, not owned).

在文件 PlatformEvent.h 第 52 行定义.

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

◆ makeString()

static Variant eve::platform_event::Variant::makeString ( std::string  v)
inlinestatic

Constructs a string variant (takes ownership of the value).

在文件 PlatformEvent.h 第 45 行定义.

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

被这些函数引用 eve::platform_event::PlatformEvent::pushData() , 以及 eve::dev::ScenarioRecorder::stageFrame().

◆ ownsPointer()

bool eve::platform_event::Variant::ownsPointer ( ) const
inline

Whether this pointer payload owns the pointed-to object.

在文件 PlatformEvent.h 第 69 行定义.

引用了 owner.

类成员变量说明

◆ i

int64_t eve::platform_event::Variant::i = 0

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

◆ owner

std::shared_ptr<void> eve::platform_event::Variant::owner

在文件 PlatformEvent.h 第 33 行定义.

被这些函数引用 ownsPointer().

◆ p

void* eve::platform_event::Variant::p = nullptr

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

被这些函数引用 makeOwnedPtr().

◆ s

std::string eve::platform_event::Variant::s

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

◆ type

Type eve::platform_event::Variant::type = Type::Nil

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

被这些函数引用 makeInt(), makeOwnedPtr(), makePtr() , 以及 makeString().


该结构体的文档由以下文件生成: