载入中...
搜索中...
未找到
eve::schema 命名空间参考

类

struct  FieldDefinition
 Metadata and validation constraints for one object member. 更多...
 
class  Schema
 Script-facing facade for runtime schema registration and validation. 更多...
 
struct  SchemaCompatibility
 The exact compatibility path selected by SchemaRegistry. 更多...
 
struct  SchemaDefinition
 Versioned runtime schema for a JSON object. 更多...
 
struct  SchemaNode
 Recursive node in the deliberately small Eve Schema language. 更多...
 
class  SchemaRegistry
 Process-wide registry for runtime gameplay schemas. 更多...
 
struct  ValidationError
 One machine-readable validation failure. 更多...
 

类型定义

using MigrationFunction = std::function< eve::Result< eve::Value >(const eve::Value &input)>
 One pure transformation from one registered schema version to the next.
 

枚举

enum class  ValueType {
  Any , Null , Boolean , Integer ,
  Number , String , Object , Array
}
 JSON-compatible value kinds understood by a schema field. 更多...
 
enum class  SchemaRegistrationStatus { Registered , Replaced , Conflict , Invalid }
 Outcome of an exact schema-version registration. 更多...
 

函数

 Module_IMPL (Schema, new Schema())
 
std::optional< ValueType > valueTypeFromString (const std::string &name)
 Converts a stable schema type name to its enum value.
 
const char * valueTypeName (ValueType type)
 Returns the stable lowercase name of a schema value type.
 
const char * schemaRegistrationStatusName (SchemaRegistrationStatus status)
 Returns the stable lowercase name of a registration outcome.
 
std::ostream & operator<< (std::ostream &stream, SchemaRegistrationStatus status)
 Writes the stable schema-registration status name.
 

类型定义说明

◆ MigrationFunction

using eve::schema::MigrationFunction = typedef std::function<eve::Result<eve::Value>(const eve::Value& input)>

One pure transformation from one registered schema version to the next.

在文件 SchemaRegistry.h 第 15 行定义.

枚举类型说明

◆ SchemaRegistrationStatus

Outcome of an exact schema-version registration.

枚举值
Registered 
Replaced 
Conflict 
Invalid 

在文件 SchemaTypes.h 第 19 行定义.

◆ ValueType

enum class eve::schema::ValueType
strong

JSON-compatible value kinds understood by a schema field.

枚举值
Any 
Null 
Boolean 
Integer 
Number 
String 
Object 
Array 

在文件 SchemaTypes.h 第 16 行定义.

函数说明

◆ Module_IMPL()

eve::schema::Module_IMPL ( Schema  ,
new   Schema() 
)

◆ operator<<()

std::ostream & eve::schema::operator<< ( std::ostream &  stream,
SchemaRegistrationStatus  status 
)
inline

Writes the stable schema-registration status name.

在文件 SchemaTypes.h 第 25 行定义.

引用了 schemaRegistrationStatusName() , 以及 status.

◆ schemaRegistrationStatusName()

EVENGINE_API_FOUNDATION const char * eve::schema::schemaRegistrationStatusName ( SchemaRegistrationStatus  status)

Returns the stable lowercase name of a registration outcome.

在文件 SchemaRegistry.cpp 第 822 行定义.

引用了 Conflict, Invalid, Registered, Replaced , 以及 status.

被这些函数引用 operator<<().

◆ valueTypeFromString()

EVENGINE_API_FOUNDATION std::optional< ValueType > eve::schema::valueTypeFromString ( const std::string &  name)

Converts a stable schema type name to its enum value.

在文件 SchemaRegistry.cpp 第 796 行定义.

引用了 Any, Array, Boolean, Integer, name, Null, Number, Object , 以及 String.

◆ valueTypeName()

EVENGINE_API_FOUNDATION const char * eve::schema::valueTypeName ( ValueType  type)

Returns the stable lowercase name of a schema value type.

在文件 SchemaRegistry.cpp 第 808 行定义.

引用了 Any, Array, Boolean, Integer, Null, Number, Object, String , 以及 type.

被这些函数引用 eve::schema::Schema::getFieldElementType() , 以及 eve::schema::Schema::getFieldType().