#pragma once #include #include #include #include "json.hpp" using json = nlohmann::json; #ifdef _UNICODE #define String std::wstring #else #define String std::wstring #endif #define NS_BEGIN(n) namespace n { #define NS_END1() } #define NS_END2() NS_END1() } #define NS_END3() NS_END2() } #define NS_END4() NS_END3() } #define NS_END5() NS_END4() } #define NS_END(c) NS_END##c() #define Property(type, name, get_access, set_access) \ private:\ type _##name;\ get_access:\ const type& Get##name() const { return _##name;}\ set_access:\ const type& Set##name(const type& value) { _##name = value; return _##name; } struct SiaHostConfig { String HostName; std::uint16_t HostPort; String RequiredVersion; }; #define API_SUCCESS(t, x) (x == t::Success)