1
0

More changes

This commit is contained in:
Scott E. Graves
2017-02-04 00:51:43 -06:00
parent 232e71e57c
commit 43b301f0bc
15 changed files with 200 additions and 43 deletions

View File

@@ -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"