All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cpp_server.remoteClass_impl_hpp.ftl Maven / Gradle / Ivy

Go to download

Tool that generates code for RPC between the Kurento Media Server and remote libraries.

There is a newer version: 7.1.0
Show newest version
${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 

#include "${remoteClass.name}.hpp"
#include 
#include 
<#if (remoteClass.extends??) && (remoteClass.extends.type.name?ends_with("OpenCVFilter"))>
#include "${remoteClass.name}OpenCVImpl.hpp"


<#list module.code.implementation["cppNamespace"]?split("::") as namespace>
namespace ${namespace}
{

class ${remoteClass.name}Impl;
<#list module.code.implementation["cppNamespace"]?split("::")?reverse as namespace>
} /* ${namespace} */


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}
{


class ${remoteClass.name}Impl :<#if remoteClass.extends??><#rt>
   <#lt> public ${remoteClass.extends.name}Impl<#rt>,
   <#lt> public virtual ${remoteClass.name}<#if (remoteClass.extends??) && (remoteClass.extends.type.name?ends_with("OpenCVFilter"))><#lt><#rt>, public virtual ${remoteClass.name}OpenCVImpl
{

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>);
<#else>
  ${remoteClass.name}Impl (const boost::property_tree::ptree &config);


  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>, );
  
  <#list remoteClass.methods as method><#rt>
    <#if method_index = 0 >

    
    <#list method.expandIfOpsParams() as expandedMethod ><#rt>
      <#lt><@methodHeader expandedMethod />
    
    <#lt><@methodHeader method />
  
<#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});
  


  /* 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 >

    
  sigc::signal signal${event.name};
  
  
  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} */


#endif /*  __${camelToUnderscore(remoteClass.name)}_IMPL_HPP__ */




© 2015 - 2024 Weber Informatics LLC | Privacy Policy