17 #include <type_traits>
22 template <
typename ValueType>
25 return this->
getEnvironment()->convertProxyToObject(*this).convert<ValueType>();
35 typename std::enable_if<!std::is_same<T, Proxy>::value, T>::type
36 convertProxy(
const Proxy &p)
42 typename std::enable_if<std::is_same<T, Proxy>::value, T>::type
43 convertProxy(
const Proxy &p)
55 return env->makeProxy(value);
65 template <
typename ReturnType>
72 return Detail::convertProxy<ReturnType>(ret);
76 template <
typename ReturnType,
typename A0>
77 ReturnType
Proxy::call(
const std::string &name,
const A0 &a0)
const
84 return Detail::convertProxy<ReturnType>(ret);
87 template <
typename A0>
90 return this->call<Proxy, A0>(name, a0);
93 template <
typename A0>
96 this->call<Proxy, A0>(name, a0);
99 template <
typename ReturnType,
typename A0,
typename A1>
100 ReturnType
Proxy::call(
const std::string &name,
const A0 &a0,
const A1 &a1)
const
108 return Detail::convertProxy<ReturnType>(ret);
111 template <
typename A0,
typename A1>
114 return this->call<Proxy, A0, A1>(name, a0, a1);
117 template <
typename A0,
typename A1>
120 this->call<Proxy, A0, A1>(name, a0, a1);
123 template <
typename ReturnType,
typename A0,
typename A1,
typename A2>
124 ReturnType
Proxy::call(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2)
const
133 return Detail::convertProxy<ReturnType>(ret);
136 template <
typename A0,
typename A1,
typename A2>
139 return this->call<Proxy, A0, A1, A2>(name, a0, a1, a2);
142 template <
typename A0,
typename A1,
typename A2>
143 void Proxy::callVoid(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2)
const
145 this->call<Proxy, A0, A1, A2>(name, a0, a1, a2);
148 template <
typename ReturnType,
typename A0,
typename A1,
typename A2,
typename A3>
149 ReturnType
Proxy::call(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3)
const
159 return Detail::convertProxy<ReturnType>(ret);
162 template <
typename A0,
typename A1,
typename A2,
typename A3>
165 return this->call<Proxy, A0, A1, A2, A3>(name, a0, a1, a2, a3);
168 template <
typename A0,
typename A1,
typename A2,
typename A3>
169 void Proxy::callVoid(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3)
const
171 this->call<Proxy, A0, A1, A2, A3>(name, a0, a1, a2, a3);
174 template <
typename ReturnType,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
175 ReturnType
Proxy::call(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4)
const
186 return Detail::convertProxy<ReturnType>(ret);
189 template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
190 Proxy Proxy::callProxy(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4)
const
192 return this->call<Proxy, A0, A1, A2, A3, A4>(name, a0, a1, a2, a3, a4);
195 template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
196 void Proxy::callVoid(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4)
const
198 this->call<Proxy, A0, A1, A2, A3, A4>(name, a0, a1, a2, a3, a4);
201 template <
typename ReturnType,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
202 ReturnType
Proxy::call(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5)
const
214 return Detail::convertProxy<ReturnType>(ret);
217 template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
218 Proxy Proxy::callProxy(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5)
const
220 return this->call<Proxy, A0, A1, A2, A3, A4, A5>(name, a0, a1, a2, a3, a4, a5);
223 template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
224 void Proxy::callVoid(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5)
const
226 this->call<Proxy, A0, A1, A2, A3, A4, A5>(name, a0, a1, a2, a3, a4, a5);
229 template <
typename ReturnType,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
230 ReturnType
Proxy::call(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5,
const A6 &a6)
const
243 return Detail::convertProxy<ReturnType>(ret);
246 template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
247 Proxy Proxy::callProxy(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5,
const A6 &a6)
const
249 return this->call<Proxy, A0, A1, A2, A3, A4, A5, A6>(name, a0, a1, a2, a3, a4, a5, a6);
252 template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
253 void Proxy::callVoid(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5,
const A6 &a6)
const
255 this->call<Proxy, A0, A1, A2, A3, A4, A5, A6>(name, a0, a1, a2, a3, a4, a5, a6);
258 template <
typename ReturnType,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6,
typename A7>
259 ReturnType
Proxy::call(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5,
const A6 &a6,
const A7 &a7)
const
273 return Detail::convertProxy<ReturnType>(ret);
276 template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6,
typename A7>
277 Proxy Proxy::callProxy(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5,
const A6 &a6,
const A7 &a7)
const
279 return this->call<Proxy, A0, A1, A2, A3, A4, A5, A6, A7>(name, a0, a1, a2, a3, a4, a5, a6, a7);
282 template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6,
typename A7>
283 void Proxy::callVoid(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5,
const A6 &a6,
const A7 &a7)
const
285 this->call<Proxy, A0, A1, A2, A3, A4, A5, A6, A7>(name, a0, a1, a2, a3, a4, a5, a6, a7);
288 template <
typename ReturnType,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6,
typename A7,
typename A8>
289 ReturnType
Proxy::call(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5,
const A6 &a6,
const A7 &a7,
const A8 &a8)
const
304 return Detail::convertProxy<ReturnType>(ret);
307 template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6,
typename A7,
typename A8>
308 Proxy Proxy::callProxy(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5,
const A6 &a6,
const A7 &a7,
const A8 &a8)
const
310 return this->call<Proxy, A0, A1, A2, A3, A4, A5, A6, A7, A8>(name, a0, a1, a2, a3, a4, a5, a6, a7, a8);
313 template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6,
typename A7,
typename A8>
314 void Proxy::callVoid(
const std::string &name,
const A0 &a0,
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5,
const A6 &a6,
const A7 &a7,
const A8 &a8)
const
316 this->call<Proxy, A0, A1, A2, A3, A4, A5, A6, A7, A8>(name, a0, a1, a2, a3, a4, a5, a6, a7, a8);
ReturnType call(const std::string &name) const
Call a method with a return type and 0 args.
Definition: ProxyImpl.hpp:66
std::shared_ptr< ProxyEnvironment > Sptr
Definition: Environment.hpp:45
std::shared_ptr< ProxyEnvironment > getEnvironment(void) const
void callVoid(const std::string &name) const
Call a method with a void return and 0 args.
Definition: Proxy.hpp:240
Proxy callProxy(const std::string &name) const
Call a method with a Proxy return and 0 args.
Definition: Proxy.hpp:235
std::shared_ptr< ProxyHandle > getHandle(void) const
Get the handle held in this proxy object.
ValueType convert(void) const
Definition: ProxyImpl.hpp:23