More changes
This commit is contained in:
@@ -6,11 +6,7 @@
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
#ifdef _UNICODE
|
||||
#define String std::wstring
|
||||
#else
|
||||
#define String std::wstring
|
||||
#endif
|
||||
|
||||
#define NS_BEGIN(n) namespace n {
|
||||
|
||||
@@ -30,6 +26,12 @@ get_access:\
|
||||
set_access:\
|
||||
const type& Set##name(const type& value) { _##name = value; return _##name; }
|
||||
|
||||
#define JProperty(type, name, get_access, set_access, json_doc) \
|
||||
get_access:\
|
||||
type Get##name() const { return json_doc[#name].get<type>();}\
|
||||
set_access:\
|
||||
type Set##name(const type& value) { json_doc[#name] = value; return value; }
|
||||
|
||||
struct SiaHostConfig
|
||||
{
|
||||
String HostName;
|
||||
@@ -37,4 +39,6 @@ struct SiaHostConfig
|
||||
String RequiredVersion;
|
||||
};
|
||||
|
||||
#define API_SUCCESS(t, x) (x == t::Success)
|
||||
#define API_SUCCESS(t, x) (x == t::Success)
|
||||
|
||||
#define DEFAULT_CONFIG_FILE_PATH L".\\Config\\SiaDriveConfig.json"
|
Reference in New Issue
Block a user