Commit 36632259 authored by Julien Wintz's avatar Julien Wintz
Browse files

Refactor dtkConcept generator.

parent 9d70c6e6
#pragma once
#include <dtkCore>
${QOBJECT_INCLUDE}
${QRUNNABLE_INCLUDE}
${CUSTOM_ANCESTOR_INCLUDE}
// ///////////////////////////////////////////////////////////////////
// ${ABSTRACTION} process interface
// ///////////////////////////////////////////////////////////////////
class ${_LAYER_NAME}_EXPORT ${ABSTRACTION} : ${QOBJECT} ${QRUNNABLE} ${CUSTOM_ANCESTOR}
{
${Q_OBJECT_MACRO}
public:
${ABSTRACTION}(${QOBJECT_CTR_PARAM}) : ${QOBJECT_CTR} ${QRUNNABLE_CTR} ${CUSTOM_ANCESTOR_CTR}{}
virtual ~${ABSTRACTION}(void) {}
public:
//insert inputs here
public:
//insert outputs here
};
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
DTK_DECLARE_OBJECT (${ABSTRACTION}*)
${PLUGIN_SYSTEM}
// Copyright: INRIA
#include <dtkComposer>
#include "${NODE_CLASS_NAME}.h"
class ${NODE_CLASS_NAME}Private
{
public:
};
${NODE_CLASS_NAME}::${NODE_CLASS_NAME}(void) : dtkComposerNodeObject<${ABSTRACTION}>(), d(new ${NODE_CLASS_NAME}Private())
{
this->setFactory(${LAYER_NAME}::${NAMESPACE}::pluginFactory());
}
${NODE_CLASS_NAME}::~${NODE_CLASS_NAME}Node(void)
{
delete d;
}
void ${NODE_CLASS_NAME}::run(void)
{
}
// Copyright: INRIA
#pragma once
#include <dtkComposer>
#include "${ABSTRACTION}.h"
class ${NODE_CLASS_NAME}Private;
// ///////////////////////////////////////////////////////////////////
// ${NODE_CLASS_NAME}
// ///////////////////////////////////////////////////////////////////
class ${NODE_CLASS_NAME} : public dtkComposerNodeObject<${ABSTRACTION}>
{
public:
${NODE_CLASS_NAME}(void);
~${NODE_CLASS_NAME}(void);
public:
void run(void);
private:
${NODE_CLASS_NAME}Private *d;
};
#include "${PLUGIN_CLASS_NAME}.h"
#include "${PLUGIN_CLASS_NAME}Plugin.h"
#include <dtkCore>
#include "${LAYER_NAME}.h"
// ///////////////////////////////////////////////////////////////////
// ${PLUGIN_CLASS_NAME}Plugin
// ///////////////////////////////////////////////////////////////////
void ${PLUGIN_CLASS_NAME}Plugin::initialize(void)
{
${LAYER_NAME}::${NAMESPACE}::pluginFactory().record("${PLUGIN_CLASS_NAME}", ${PLUGIN_CLASS_NAME}Creator);
}
void ${PLUGIN_CLASS_NAME}Plugin::uninitialize(void)
{
}
// ///////////////////////////////////////////////////////////////////
// Plugin meta data
// ///////////////////////////////////////////////////////////////////
DTK_DEFINE_PLUGIN(${PLUGIN_CLASS_NAME})
#pragma once
#include <dtkCore>
#include <${ABSTRACTION}.h>
class ${PLUGIN_CLASS_NAME}Plugin: public ${ABSTRACTION}Plugin
{
Q_OBJECT
Q_INTERFACES(${ABSTRACTION}Plugin)
Q_PLUGIN_METADATA(IID "fr.inria.${PLUGIN_CLASS_NAME}Plugin" FILE "${PLUGIN_CLASS_NAME}Plugin.json")
public:
${PLUGIN_CLASS_NAME}Plugin(void) {}
~${PLUGIN_CLASS_NAME}Plugin(void) {}
public:
void initialize(void);
void uninitialize(void);
};
{
"name" : "${PLUGIN_CLASS_NAME}Plugin",
"version" : "0.0.1",
"dependencies" : []
}
#include "${PLUGIN_CLASS_NAME}.h"
#include <iostream>
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
${PLUGIN_CLASS_NAME}::${PLUGIN_CLASS_NAME}(void)
{
}
${PLUGIN_CLASS_NAME}::~${PLUGIN_CLASS_NAME}(void)
{
}
void ${PLUGIN_CLASS_NAME}::run(void)
{
}
#pragma once
#include <dtkCore>
#include <${ABSTRACTION}.h>
class ${PLUGIN_CLASS_NAME} : public ${ABSTRACTION}
{
Q_OBJECT
public:
${PLUGIN_CLASS_NAME}(void);
~${PLUGIN_CLASS_NAME}(void);
public:
void run();
};
inline ${ABSTRACTION} *${PLUGIN_CLASS_NAME}Creator(void)
{
return new ${PLUGIN_CLASS_NAME}();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment