libalcommon  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Macros
alproxy.hxx File Reference
#include <qi/type/objecttypebuilder.hpp>

Go to the source code of this file.

Namespaces

 AL
 NAOqi.
 

Macros

#define _LIBALCOMMON_ALCOMMON_ALPROXY_HXX_
 
#define pushi(z, n, _)   args.push_back(::qi::AnyReference::from(p ## n));
 
#define consti(z, n, _)   , const P ## n & p ## n
 
#define genCall(n, ATYPEDECL, ATYPES, ADECL, AUSE, comma)
 
#define genCall(n, ATYPEDECL, ATYPES, ADECL, AUSE, comma)
 

Macro Definition Documentation

#define _LIBALCOMMON_ALCOMMON_ALPROXY_HXX_

AUTOGENERATED CODE, DO NOT EDIT

Author
Aldebaran Robotics Copyright (c) Aldebaran Robotics 2010, 2011, 2012 All Rights Reserved

Definition at line 9 of file alproxy.hxx.

#define consti (   z,
  n,
 
)    , const P ## n & p ## n

Definition at line 17 of file alproxy.hxx.

#define genCall (   n,
  ATYPEDECL,
  ATYPES,
  ADECL,
  AUSE,
  comma 
)
Value:
template<typename R comma ATYPEDECL> \
R ALProxy::call(const std::string& pName BOOST_PP_REPEAT(n, consti, _) ) \
{ \
qi::AnyObject object = _object.lock(); \
if (!object) \
throw ALERROR(moduleName(), pName, "module destroyed"); \
::qi::GenericFunctionParameters args; \
args.reserve(n); \
BOOST_PP_REPEAT(n, pushi, _) \
try \
{ \
qi::AnyValue res(object.metaCall(pName, args).value(), false, true); \
qi::Promise<R> prom(qi::FutureCallbackType_Sync); \
if (qi::detail::handleFuture(res.asReference(), prom)) \
{ \
res.release(); /* handleFuture will free it */ \
prom.future().wait(); \
qiLogDebug("alproxy.call") << prom.future().hasError(); \
return (R)prom.future().value(); \
} \
else \
return res.to<R>(); \
/*return qi::AnyValue(object.metaCall(pName, args).value(), false, true).to<R>();*/ \
} \
catch(const std::exception& e) \
{ \
throw ALERROR(moduleName(), pName, e.what()); \
} \
}
#define consti(z, n, _)
Definition: alproxy.hxx:17
#define pushi(z, n, _)
Definition: alproxy.hxx:16

Definition at line 52 of file alproxy.hxx.

#define genCall (   n,
  ATYPEDECL,
  ATYPES,
  ADECL,
  AUSE,
  comma 
)
Value:
QI_GEN_MAYBE_TEMPLATE_OPEN(comma) ATYPEDECL QI_GEN_MAYBE_TEMPLATE_CLOSE(comma) \
inline void ALProxy::callVoid(const std::string& pName BOOST_PP_REPEAT(n, consti, _)) \
{ \
call<void>(pName comma AUSE); \
}
#define consti(z, n, _)
Definition: alproxy.hxx:17

Definition at line 52 of file alproxy.hxx.

#define pushi (   z,
  n,
 
)    args.push_back(::qi::AnyReference::from(p ## n));

Definition at line 16 of file alproxy.hxx.