cpp_module.model_Module_cpp.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.
Module.cpp
/* Autogenerated with kurento-module-creator */
#include "FactoryRegistrar.hpp"
<#list module.remoteClasses as remoteClass>
#include <${remoteClass.name}ImplFactory.hpp>
#include <${remoteClass.name}.hpp>
#list>
<#list module.complexTypes as complexType>
#include <${complexType.name}.hpp>
#list>
extern "C" {
const kurento::FactoryRegistrar *getFactoryRegistrar ();
}
const kurento::FactoryRegistrar *
getFactoryRegistrar ()
{
static bool loaded = false;
static std::map> factories;
if (!loaded) {
<#list module.remoteClasses as remoteClass>
<#if !(remoteClass.abstract)>
factories["${remoteClass.name}"] = std::shared_ptr (new ${module.code.implementation["cppNamespace"]}::${remoteClass.name}ImplFactory() );
#if>
#list>
<#list module.complexTypes as complexType>
<#if complexType.typeFormat == "REGISTER">
${module.code.implementation["cppNamespace"]}::${complexType.name}::registerType ();
#if>
#list>
loaded = true;
}
static kurento::FactoryRegistrar factory (factories);
return &factory;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy