载入中...
搜索中...
未找到
eve::orders::OrderPayload类 参考

JSON-compatible key/value payload carried by an order. 更多...

#include <CommandQueue.h>

Public 成员函数

void setString (const std::string &key, const std::string &value)
 Sets a JSON string value.
 
void setNumber (const std::string &key, double value)
 Sets a JSON number value.
 
void setBool (const std::string &key, bool value)
 Sets a JSON boolean value.
 
void setNull (const std::string &key)
 Sets a JSON null value.
 
eve::Result< void > setJson (const std::string &key, std::string_view json)
 Parses and stores one unchecked JSON value.
 
eve::Result< void > set (const std::string &key, eve::Value value)
 Stores an already validated canonical value.
 
bool has (const std::string &key) const
 Returns true when the payload contains key.
 
eve::Result< bool > erase (const std::string &key)
 Removes key and reports whether it existed.
 
void clear ()
 Removes every field.
 
std::string getJson (const std::string &key) const
 Returns the canonical JSON fragment for key, or an empty string.
 
std::string toJson () const
 Serializes the complete payload as a deterministic JSON object.
 

友元

class CommandQueue
 

详细描述

JSON-compatible key/value payload carried by an order.

Values use the engine's canonical owning dynamic type. JSON text is accepted only at the parsing boundary and becomes typed data before storage.

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

成员函数说明

◆ clear()

void eve::orders::OrderPayload::clear ( )

Removes every field.

在文件 CommandQueue.cpp 第 144 行定义.

◆ erase()

eve::Result< bool > eve::orders::OrderPayload::erase ( const std::string &  key)

Removes key and reports whether it existed.

在文件 CommandQueue.cpp 第 137 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, key , 以及 eve::Result< T >::success().

◆ getJson()

std::string eve::orders::OrderPayload::getJson ( const std::string &  key) const

Returns the canonical JSON fragment for key, or an empty string.

在文件 CommandQueue.cpp 第 146 行定义.

引用了 key.

◆ has()

bool eve::orders::OrderPayload::has ( const std::string &  key) const

Returns true when the payload contains key.

在文件 CommandQueue.cpp 第 135 行定义.

引用了 key.

◆ set()

eve::Result< void > eve::orders::OrderPayload::set ( const std::string &  key,
eve::Value  value 
)

Stores an already validated canonical value.

在文件 CommandQueue.cpp 第 127 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, key, eve::Status::success(), eve::Result< T >::success() , 以及 value.

被这些函数引用 setJson().

◆ setBool()

void eve::orders::OrderPayload::setBool ( const std::string &  key,
bool  value 
)

Sets a JSON boolean value.

在文件 CommandQueue.cpp 第 113 行定义.

引用了 key , 以及 value.

◆ setJson()

eve::Result< void > eve::orders::OrderPayload::setJson ( const std::string &  key,
std::string_view  json 
)

Parses and stores one unchecked JSON value.

在文件 CommandQueue.cpp 第 121 行定义.

引用了 eve::Result< T >::failure(), eve::Value::fromJson(), key , 以及 set().

◆ setNull()

void eve::orders::OrderPayload::setNull ( const std::string &  key)

Sets a JSON null value.

在文件 CommandQueue.cpp 第 117 行定义.

引用了 key.

◆ setNumber()

void eve::orders::OrderPayload::setNumber ( const std::string &  key,
double  value 
)

Sets a JSON number value.

在文件 CommandQueue.cpp 第 108 行定义.

引用了 key , 以及 value.

◆ setString()

void eve::orders::OrderPayload::setString ( const std::string &  key,
const std::string &  value 
)

Sets a JSON string value.

在文件 CommandQueue.cpp 第 104 行定义.

引用了 key , 以及 value.

◆ toJson()

std::string eve::orders::OrderPayload::toJson ( ) const

Serializes the complete payload as a deterministic JSON object.

在文件 CommandQueue.cpp 第 153 行定义.

引用了 eve::Value::toJson().

友元及相关函数文档

◆ CommandQueue

friend class CommandQueue
friend

在文件 CommandQueue.h 第 62 行定义.


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