cpp_server.remoteClass_impl_hpp.ftl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kurento-module-creator Show documentation
Show all versions of kurento-module-creator Show documentation
Tool that generates code for RPC between the Kurento Media Server and
remote libraries.
${remoteClass.name}Impl.hpp
/* Autogenerated with kurento-module-creator */
#ifndef __${camelToUnderscore(remoteClass.name)}_IMPL_HPP__
#define __${camelToUnderscore(remoteClass.name)}_IMPL_HPP__
<#if (remoteClass.extends)??>
#include "${remoteClass.extends.name}Impl.hpp"
<#else>
#include
#if>
#include "${remoteClass.name}.hpp"
#include
#include
<#if (remoteClass.extends??) && (remoteClass.extends.type.name?ends_with("OpenCVFilter"))>
#include "${remoteClass.name}OpenCVImpl.hpp"
#if>
<#list module.code.implementation["cppNamespace"]?split("::") as namespace>
namespace ${namespace}
{
#list>
class ${remoteClass.name}Impl;
<#list module.code.implementation["cppNamespace"]?split("::")?reverse as namespace>
} /* ${namespace} */
#list>
namespace kurento
{
void Serialize (std::shared_ptr<${module.code.implementation["cppNamespace"]}::${remoteClass.name}Impl> &object, JsonSerializer &serializer);
} /* kurento */
${organizeDependencies(typeDependencies(remoteClass),true)}
<#list module.code.implementation["cppNamespace"]?split("::") as namespace>
namespace ${namespace}
{
#list>
class ${remoteClass.name}Impl :<#if remoteClass.extends??><#rt>
<#lt> public ${remoteClass.extends.name}Impl<#rt>,
#if><#lt> public virtual ${remoteClass.name}<#if (remoteClass.extends??) && (remoteClass.extends.type.name?ends_with("OpenCVFilter"))><#lt><#rt>, public virtual ${remoteClass.name}OpenCVImpl#if>
{
public:
<#if remoteClass.constructor?? >
${remoteClass.name}Impl (const boost::property_tree::ptree &config<#rt>
<#lt><#list remoteClass.constructor.params as param><#rt>
<#lt>, <#rt>
<#lt>${getCppObjectType(param.type, true)}${param.name}<#rt>
<#lt>#list>);
<#else>
${remoteClass.name}Impl (const boost::property_tree::ptree &config);
#if>
virtual ~${remoteClass.name}Impl () {};
<#macro methodHeader method>
${getCppObjectType(method.return,false)} ${method.name} (<#rt>
<#lt><#list method.params as param>${getCppObjectType(param.type)}${param.name}<#if param_has_next>, #if>#list>);
#macro>
<#list remoteClass.methods as method><#rt>
<#if method_index = 0 >
#if>
<#list method.expandIfOpsParams() as expandedMethod ><#rt>
<#lt><@methodHeader expandedMethod />
#list>
<#lt><@methodHeader method />
#list>
<#list remoteClass.properties as property>
virtual ${getCppObjectType (property.type, false)} get${property.name?cap_first} ();
<#if !property.final && !property.readOnly>
virtual void set${property.name?cap_first} (${getCppObjectType (property.type, true)}${property.name});
#if>
#list>
/* Next methods are automatically implemented by code generator */
virtual bool connect (const std::string &eventType, std::shared_ptr handler);
<#if ! ((remoteClass.extends??) && (remoteClass.extends.type.name?ends_with("OpenCVFilter")))>
<#list remoteClass.events as event>
<#if event_index = 0 >
#if>
sigc::signal signal${event.name};
#list>
#if>
virtual void invoke (std::shared_ptr obj,
const std::string &methodName, const Json::Value ¶ms,
Json::Value &response);
virtual void Serialize (JsonSerializer &serializer);
private:
class StaticConstructor
{
public:
StaticConstructor();
};
static StaticConstructor staticConstructor;
};
<#list module.code.implementation["cppNamespace"]?split("::")?reverse as namespace>
} /* ${namespace} */
#list>
#endif /* __${camelToUnderscore(remoteClass.name)}_IMPL_HPP__ */