cpp_interface.remoteClass_interface_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}.hpp
/* Autogenerated with kurento-module-creator */
#ifndef __${camelToUnderscore(remoteClass.name)}_HPP__
#define __${camelToUnderscore(remoteClass.name)}_HPP__
#include
#include
#include
#include
<#if (remoteClass.extends)??>
#include "${remoteClass.extends.name}.hpp"
#if>
<#if remoteClass.events[0] ?? >
<#list remoteClass.events as event>
#include "${event.name}.hpp"
#list>
#include
#if>
<#list module.code.implementation["cppNamespace"]?split("::") as namespace>
namespace ${namespace}
{
#list>
class ${remoteClass.name};
<#list module.code.implementation["cppNamespace"]?split("::")?reverse as namespace>
} /* ${namespace} */
#list>
namespace kurento
{
class JsonSerializer;
void Serialize (std::shared_ptr<${module.code.implementation["cppNamespace"]}::${remoteClass.name}> &object, JsonSerializer &serializer);
}
${organizeDependencies(typeDependencies(remoteClass),false)}
<#list module.code.implementation["cppNamespace"]?split("::") as namespace>
namespace ${namespace}
{
#list>
class ${remoteClass.name}<#if remoteClass.extends??><#rt>
<#lt> : public virtual ${remoteClass.extends.name}
<#else>
<#lt> : public std::enable_shared_from_this<${remoteClass.name}>
#if>
{
public:
${remoteClass.name}() = default;
<#if !remoteClass.extends??>virtual #if>~${remoteClass.name}()<#if remoteClass.extends??> override#if> = default;
<#macro methodHeader method>
virtual ${getCppObjectType(method.return,false)} ${method.name} (<#rt>
<#lt><#list method.params as param>${getCppObjectType(param.type)}${param.name}<#if param_has_next>, #if>#list>) = 0;
#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>
<#if !remoteClass.extends??>virtual #if>const std::string &getType() const<#if remoteClass.extends??> override#if>;
<#if !remoteClass.extends??>virtual #if>const std::string &getQualifiedType() const<#if remoteClass.extends??> override#if>;
<#if !remoteClass.extends??>virtual #if>const std::string &getModule() const<#if remoteClass.extends??> override#if>;
<#if !remoteClass.extends??>virtual #if>const std::vector &getHierarchy() const<#if remoteClass.extends??> override#if>;
<#if !remoteClass.extends??>virtual #if>void Serialize(JsonSerializer &serializer)<#if remoteClass.extends??> override#if> = 0;
<#list remoteClass.properties as property>
virtual ${getCppObjectType (property.type, false)} get${property.name?cap_first} () = 0;
<#if !property.final && !property.readOnly>
virtual void set${property.name?cap_first} (${getCppObjectType (property.type, true)}${property.name}) = 0;
#if>
#list>
};
<#list module.code.implementation["cppNamespace"]?split("::")?reverse as namespace>
} /* ${namespace} */
#list>
#endif /* __${camelToUnderscore(remoteClass.name)}_HPP__ */
© 2015 - 2024 Weber Informatics LLC | Privacy Policy