抛弃GdCpp*.dll/pdb历史重新建库。libhv和Sqlite的dll保留

This commit is contained in:
Zhang Jianjun
2026-02-02 16:09:02 +08:00
parent f148ca49e3
commit 4a2a284ac0
292 changed files with 350450 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
#ifndef NLOHMANN_JSON_WRAPPER_H
#define NLOHMANN_JSON_WRAPPER_H
#include "json.hpp"
#include "GdCPP_Exports.h"
/**
* @addtogroup ksjson
* @{
* @addtogroup nlohmann_json_wrapper
* @brief 引用nlohmann::json的类和异常等。
* @details
* @{
*/
/// \brief 将nlohmann::json定义为jsonobj简化掉namespace的访问。
///
/// 本来想用json但语义不够明确。因此采用了一个跟Qt的QJsonObject近似的名称
/// 表示可以替代QJsonObject实际上这个类的功能很强大可以完全替代QJsonObject、QJsonValue、QJsonArray
/// 可以替代QJsonDocument的部分功能甚至也能部分替代QVariant用。
using jsonobj = nlohmann::ordered_json;
// 以下定义用于简化json的异常类型的访问
using json_exception = nlohmann::json::exception;
using json_parse_err = nlohmann::json::parse_error;
using json_invalid_iterator = nlohmann::json::invalid_iterator;
using json_type_error = nlohmann::json::type_error;
using json_out_of_range = nlohmann::json::out_of_range;
using json_other_error = nlohmann::json::other_error;
// 判断数据类型是否可以做json的key
template <typename T> struct JsonKey;
template <> struct JsonKey<const std::string&> { typedef const std::string& Type; };
template <> struct JsonKey<const char * > { typedef const char* Type; };
// 判断类型是否可以做数组长度
template <typename T> struct ArraySizeT;
template <> struct ArraySizeT<int> { typedef int Type; };
template <> struct ArraySizeT<size_t> { typedef size_t Type; };
/** @} nlohmann_json_wrapper */
/** @} ksjson */
#endif // NLOHMANN_JSON_WRAPPER_H