dl
dl_value.h 文件参考

任意类型 更多...

#include <vector>
#include <cassert>
#include <unordered_map>
#include "io/dl_log.h"
#include "base/dl_string.h"
#include "io/dl_json.h"

浏览该文件的源代码.

struct  dl::ValueTypeInfo
 类型信息 更多...
 
class  dl::Value
 任意类型 更多...
 
class  dl::ValueSystem
 管理器,注册类型 更多...
 
class  dl::ValueStruct
 结构体 更多...
 
class  dl::ValueVector
 变长数组(由于为空时类型丢失,需要成类) 更多...
 

命名空间

namespace  dl
 

类型定义

using dl::ValueTable = std::unordered_map<std::string, Value, string_hash, std::equal_to<>>
 

枚举

enum class  dl::ValueType {
  dl::NONE , dl::BOOL , dl::CHAR , dl::UCHAR ,
  dl::SHORT , dl::USHORT , dl::INT , dl::UINT ,
  dl::INT64 , dl::UINT64 , dl::FLOAT , dl::DOUBLE ,
  dl::POINTER , dl::STRUCT , dl::STRING , dl::ARRAY ,
  dl::VECTOR , dl::MAP
}
 实际类型 更多...
 

函数

ValueType dl::String2ValueType (std::string_view str)
 
ValueTypeInfo dl::String2ValueTypeEx (std::string_view str)
 
template<typename T>
consteval ValueType dl::ClassType2ValueType ()
 
std::string_view dl::to_string (ValueType v)
 类型转字符串
 
std::string dl::to_string (const Value &v)
 值转字符串
 
std::string_view dl::Type2CppType (ValueType v)
 类型转C++类型字符串
 
std::string dl::Type2CppTypeEx (ValueType v0, ValueType v1, size_t length)
 

变量

ValueSystemdl::g_value
 
const ValueStruct dl::NULL_VALUE_STRUCT = { "null struct" }
 
const ValueVector dl::NULL_VALUE_VECTOR = { ValueType::NONE }
 

详细描述

任意类型

版本
1.0
作者
lveyou
日期
24-11-21
注解
统一表示类型

在文件 dl_value.h 中定义.