HIVE SDK for C++

HIVE_CppPlugin.h
1#ifndef __HIVE_CPPPLUGIN_H__
2#define __HIVE_CPPPLUGIN_H__
3
4
5#include "HIVE_CPP.h"
6
7#define HIVE_SETVALUEFROMJSONSTRING(member,jsonObj,jsonName) do { \
8auto jsonValue = jsonObj.get(jsonName); \
9if(!jsonValue.is<picojson::null>()) \
10member = jsonValue.get<std::string>(); \
11} while(0)
12
13#define HIVE_SETVALUEFROMJSONNUMBER(member,type,jsonObj,jsonName) do { \
14auto jsonValue = jsonObj.get(jsonName); \
15if(!jsonValue.is<picojson::null>()) \
16member = static_cast<type>(jsonValue.get<double>()); \
17} while(0)
18
19NS_HIVE_BEGIN
20
21std::string to_string(const long long value);
22std::string to_string(const int value);
23std::string to_string(const double value);
24// C++ 플러그인 내부에서 사용하는 유틸성 클래스
25
26class HIVESDK_DLLEXPORT HiveCppPlugin
27{
28public:
29
30 static picojson::object createParam(std::string className, std::string methodName);
31
32
33 static picojson::value callNative(picojson::object jsonParam);
34 static picojson::value callNative(std::string jsonParam);
35
36
37 static void callEngine(std::string jsonParamString);
38};
39
40
41NS_HIVE_END // namespace hive
42
43
44#endif // __HIVE_CPPPLUGIN_H__
45
46
47
Copyright © Com2uS Platform Corporation. All Right Reserved. 이용약관 개인정보 처리방침