Commit a96a037a authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

add a factoryManager, remove dtkComposerFactory

parent de3962fb
......@@ -76,7 +76,7 @@ int main(int argc, char **argv)
// main_settings->endGroup();
// dtkPluginManager::instance()->initialize();
dtkComposerFactory *factory = dtkComposerFactory::instance();
dtkComposerNodeFactory *factory = dtkComposer::node::factory();
// if (args[1] == "--spawn") {
......
......@@ -87,5 +87,16 @@ if(DTK_BUILD_WIDGETS)
"@CMAKE_CURRENT_SOURCE_DIR@/src/dtkWidgets")
endif(DTK_BUILD_WIDGETS)
# HELPER function
FUNCTION(PREPEND var prefix)
SET(listVar "")
FOREACH(f ${ARGN})
LIST(APPEND listVar "${prefix}/${f}")
ENDFOREACH(f)
SET(${var} "${listVar}" PARENT_SCOPE)
ENDFUNCTION(PREPEND)
######################################################################
### dtkConfig.cmake.in ends here
......@@ -98,5 +98,13 @@ IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
ENDIF("${isSystemDir}" STREQUAL "-1")
FUNCTION(PREPEND var prefix)
SET(listVar "")
FOREACH(f ${ARGN})
LIST(APPEND listVar "${prefix}/${f}")
ENDFOREACH(f)
SET(${var} "${listVar}" PARENT_SCOPE)
ENDFUNCTION(PREPEND)
######################################################################
### dtkConfig.cmake.in ends here
......@@ -45,7 +45,7 @@ set(${PROJECT_NAME}_HEADERS
dtkComposerEvaluatorProcess.h
dtkComposerEvaluatorSlave.h
dtkComposerExtension.h
dtkComposerFactory.h
dtkComposerFactoryManager.h
dtkComposerGraph.h
dtkComposerGraphEdge.h
dtkComposerGraphNode.h
......@@ -169,7 +169,7 @@ set(${PROJECT_NAME}_SOURCES
dtkComposerEvaluator.cpp
dtkComposerEvaluatorProcess.cpp
dtkComposerEvaluatorSlave.cpp
dtkComposerFactory.cpp
dtkComposerFactoryManager.cpp
dtkComposerGraph.cpp
dtkComposerGraphEdge.cpp
dtkComposerGraphNodeBegin.cpp
......
......@@ -5,7 +5,6 @@
#include "dtkComposerEvaluator.h"
#include "dtkComposerEvaluatorProcess.h"
#include "dtkComposerEvaluatorSlave.h"
#include "dtkComposerFactory.h"
#include "dtkComposerGraph.h"
#include "dtkComposerGraphEdge.h"
#include "dtkComposerGraphNode.h"
......@@ -21,6 +20,7 @@
#include "dtkComposerNode.h"
#include "dtkComposerNodeObject.h"
#include "dtkComposerNodeFactory.h"
#include "dtkComposerFactoryManager.h"
#include "dtkComposerNodeFactoryView.h"
#include "dtkComposerNodeBoolean.h"
#include "dtkComposerNodeBooleanOperator.h"
......
......@@ -13,7 +13,7 @@
#include <dtkConfig.h>
#include "dtkComposerNodeFactory.h"
#include "dtkComposerFactory.h"
#include "dtkComposerFactoryManager.h"
#include "dtkComposerExtension.h"
#include "dtkComposerSettings.h"
......@@ -21,8 +21,22 @@ namespace dtkComposer
{
namespace node
{
namespace _private {
dtkComposerFactoryManager manager;
}
dtkComposerNodeFactory *factory(void) {
return dtkComposerFactory::instance();
return _private::manager.factory();
}
void initialize(void) {
_private::manager.initNodeBase();
_private::manager.initNodeBoolean();
_private::manager.initNodeControl();
_private::manager.initNodeConstants();
_private::manager.initNodeDistributed();
_private::manager.initNodeFile();
_private::manager.initNodeNumber();
_private::manager.initNodeString();
_private::manager.initNodeContainer();
}
}
......
......@@ -26,6 +26,7 @@ namespace dtkComposer
{
namespace node {
DTKCOMPOSER_EXPORT dtkComposerNodeFactory *factory(void);
DTKCOMPOSER_EXPORT void initialize(void);
}
namespace extension {
DTKCOMPOSER_EXPORT dtkComposerExtensionPluginFactory& pluginFactory(void);
......
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkComposerFactory.h"
#include "dtkComposerNodeBoolean.h"
#include "dtkComposerNodeBooleanOperator.h"
#include "dtkComposerNodeComposite.h"
#include "dtkComposerNodeConstants.h"
#include "dtkComposerNodeControlCase.h"
#include "dtkComposerNodeControlDoWhile.h"
#include "dtkComposerNodeControlFor.h"
#include "dtkComposerNodeControlForEach.h"
#include "dtkComposerNodeControlIf.h"
#include "dtkComposerNodeControlMap.h"
#include "dtkComposerNodeControlWhile.h"
#include "dtkComposerNodeDistributed.h"
#include "dtkComposerNodeExec.h"
#include "dtkComposerNodeFile.h"
#include "dtkComposerNodeInteger.h"
#include "dtkComposerNodeRange.h"
#include "dtkComposerNodeMetaContainer.h"
#include "dtkComposerNodeNumberOperator.h"
#include "dtkComposerNodeReal.h"
#include "dtkComposerNodeRemote.h"
#include "dtkComposerNodeSpawn.h"
#include "dtkComposerNodeString.h"
#include "dtkComposerNodeStringOperator.h"
#include "dtkComposerNodeLogger.h"
#include "dtkComposerNodePrint.h"
dtkComposerFactory::dtkComposerFactory(void) : dtkComposerNodeFactory()
{
this->initNodeBase();
this->initNodeBoolean();
this->initNodeControl();
this->initNodeConstants();
this->initNodeDistributed();
this->initNodeFile();
this->initNodeNumber();
this->initNodeString();
this->initNodeContainer();
}
dtkComposerFactory::~dtkComposerFactory(void)
{
}
DTKCOMPOSER_EXPORT dtkComposerFactory *dtkComposerFactory::instance(void)
{
if(!s_instance)
s_instance = new dtkComposerFactory;
return s_instance;
}
void dtkComposerFactory::initNodeFile(void)
{
this->record(":dtkComposer/dtkComposerNodeFile.json", dtkComposerNodeCreator<dtkComposerNodeFile>);
this->record(":dtkComposer/dtkComposerNodeFileExists.json", dtkComposerNodeCreator<dtkComposerNodeFileExists>);
this->record(":dtkComposer/dtkComposerNodeFileList.json", dtkComposerNodeCreator<dtkComposerNodeFileList>);
this->record(":dtkComposer/dtkComposerNodeFileRead.json", dtkComposerNodeCreator<dtkComposerNodeFileRead>);
this->record(":dtkComposer/dtkComposerNodeFileWrite.json", dtkComposerNodeCreator<dtkComposerNodeFileWrite>);
this->record(":dtkComposer/dtkComposerNodeDirectory.json", dtkComposerNodeCreator<dtkComposerNodeDirectory>);
this->record(":dtkComposer/dtkComposerNodeExec.json", dtkComposerNodeCreator<dtkComposerNodeExec>);
}
void dtkComposerFactory::initNodeBase(void)
{
this->record(":dtkComposer/dtkComposerNodeComposite.json", dtkComposerNodeCreator<dtkComposerNodeComposite>);
this->record(":dtkComposer/dtkComposerNodeLogger.json", dtkComposerNodeCreator<dtkComposerNodeLogger>);
this->record(":dtkComposer/dtkComposerNodePrint.json", dtkComposerNodeCreator<dtkComposerNodePrint>);
}
void dtkComposerFactory::initNodeDistributed(void)
{
this->record(":dtkComposer/dtkComposerNodeRemote.json", dtkComposerNodeCreator<dtkComposerNodeRemote>);
this->record(":dtkComposer/dtkComposerNodeRemoteSubmit.json", dtkComposerNodeCreator<dtkComposerNodeRemoteSubmit>);
this->record(":dtkComposer/dtkComposerNodeSpawn.json", dtkComposerNodeCreator<dtkComposerNodeSpawn>);
this->record(":dtkComposer/dtkComposerNodeCommunicatorRank.json", dtkComposerNodeCreator<dtkComposerNodeCommunicatorRank>);
this->record(":dtkComposer/dtkComposerNodeCommunicatorSize.json", dtkComposerNodeCreator<dtkComposerNodeCommunicatorSize>);
this->record(":dtkComposer/dtkComposerNodeCommunicatorSend.json", dtkComposerNodeCreator<dtkComposerNodeCommunicatorSend>);
this->record(":dtkComposer/dtkComposerNodeCommunicatorReceive.json",dtkComposerNodeCreator<dtkComposerNodeCommunicatorReceive>);
this->record(":dtkComposer/dtkComposerNodeAnySource.json", dtkComposerNodeCreator<dtkComposerNodeAnySource>);
this->record(":dtkComposer/dtkComposerNodeAnyTag.json", dtkComposerNodeCreator<dtkComposerNodeAnyTag>);
this->record(":dtkComposer/dtkComposerNodeControllerRank.json", dtkComposerNodeCreator<dtkComposerNodeControllerRank>);
}
void dtkComposerFactory::initNodeConstants(void)
{
this->record(":dtkComposer/dtkComposerNodePi.json", dtkComposerNodeCreator<dtkComposerNodePi>);
this->record(":dtkComposer/dtkComposerNodeE.json", dtkComposerNodeCreator<dtkComposerNodeE>);
}
void dtkComposerFactory::initNodeBoolean(void)
{
this->record(":dtkComposer/dtkComposerNodeBoolean.json", dtkComposerNodeCreator<dtkComposerNodeBoolean>);
this->record(":dtkComposer/dtkComposerNodeBooleanOperatorUnaryNot.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorUnaryNot>);
this->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryAnd.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryAnd>);
this->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryOr.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryOr>);
this->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryXor.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryXor>);
this->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryNand.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryNand>);
this->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryNor.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryNor>);
this->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryXnor.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryXnor>);
this->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryImp.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryImp>);
this->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryNimp.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryNimp>);
}
void dtkComposerFactory::initNodeControl(void)
{
this->record(":dtkComposer/dtkComposerNodeControlCase.json", dtkComposerNodeCreator<dtkComposerNodeControlCase>);
this->record(":dtkComposer/dtkComposerNodeControlIf.json", dtkComposerNodeCreator<dtkComposerNodeControlIf>);
this->record(":dtkComposer/dtkComposerNodeControlDoWhile.json", dtkComposerNodeCreator<dtkComposerNodeControlDoWhile>);
this->record(":dtkComposer/dtkComposerNodeControlFor.json", dtkComposerNodeCreator<dtkComposerNodeControlFor>);
this->record(":dtkComposer/dtkComposerNodeControlForEach.json", dtkComposerNodeCreator<dtkComposerNodeControlForEach>);
this->record(":dtkComposer/dtkComposerNodeControlMap.json", dtkComposerNodeCreator<dtkComposerNodeControlMap>);
this->record(":dtkComposer/dtkComposerNodeControlWhile.json", dtkComposerNodeCreator<dtkComposerNodeControlWhile>);
}
void dtkComposerFactory::initNodeNumber(void)
{
this->record(":dtkComposer/dtkComposerNodeInteger.json", dtkComposerNodeCreator<dtkComposerNodeInteger>);
this->record(":dtkComposer/dtkComposerNodeReal.json", dtkComposerNodeCreator<dtkComposerNodeReal>);
this->record(":dtkComposer/dtkComposerNodeRange.json", dtkComposerNodeCreator<dtkComposerNodeRange>);
// -- Unary operators
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryAbs.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryAbs>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnarySqrt.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnarySqrt>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnarySquare.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnarySquare>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryInv.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryInv>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryIncr.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryIncr>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryDecr.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryDecr>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryFloor.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryFloor>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryCeil.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryCeil>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryRound.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryRound>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryCos.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryCos>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnarySin.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnarySin>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryTan.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryTan>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryAcos.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryAcos>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryAsin.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryAsin>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryAtan.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryAtan>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryDeg2Rad.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryDeg2Rad>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryRad2Deg.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryRad2Deg>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryLn.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryLn>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryLog10.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryLog10>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryExp.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryExp>);
// -- Binary operators
this->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryEucldiv.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryEucldiv>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryModulo.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryModulo>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryMin.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryMin>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryMax.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryMax>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryPlus.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryPlus>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryMinus.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryMinus>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryMult.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryMult>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryRatio.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryRatio>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryPower.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryPower>);
this->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryNthroot.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryNthroot>);
// -- Comparator operator
this->record(":dtkComposer/dtkComposerNodeNumberComparatorEqual.json", dtkComposerNodeCreator<dtkComposerNodeNumberComparatorEqual>);
this->record(":dtkComposer/dtkComposerNodeNumberComparatorNotequal.json", dtkComposerNodeCreator<dtkComposerNodeNumberComparatorNotequal>);
this->record(":dtkComposer/dtkComposerNodeNumberComparatorGt.json", dtkComposerNodeCreator<dtkComposerNodeNumberComparatorGt>);
this->record(":dtkComposer/dtkComposerNodeNumberComparatorLt.json", dtkComposerNodeCreator<dtkComposerNodeNumberComparatorLt>);
this->record(":dtkComposer/dtkComposerNodeNumberComparatorGte.json", dtkComposerNodeCreator<dtkComposerNodeNumberComparatorGte>);
this->record(":dtkComposer/dtkComposerNodeNumberComparatorLte.json", dtkComposerNodeCreator<dtkComposerNodeNumberComparatorLte>);
this->record(":dtkComposer/dtkComposerNodeNumberAlmosteq.json", dtkComposerNodeCreator<dtkComposerNodeNumberAlmosteq>);
this->record(":dtkComposer/dtkComposerNodeNumberNotalmosteq.json", dtkComposerNodeCreator<dtkComposerNodeNumberNotalmosteq>);
}
void dtkComposerFactory::initNodeString(void)
{
this->record(":dtkComposer/dtkComposerNodeString.json", dtkComposerNodeCreator<dtkComposerNodeString>);
this->record(":dtkComposer/dtkComposerNodeStringReplace.json", dtkComposerNodeCreator<dtkComposerNodeStringReplace>);
this->record(":dtkComposer/dtkComposerNodeStringOperatorBinaryAppend.json", dtkComposerNodeCreator<dtkComposerNodeStringOperatorBinaryAppend>);
this->record(":dtkComposer/dtkComposerNodeStringOperatorBinaryLogicEquality.json", dtkComposerNodeCreator<dtkComposerNodeStringOperatorBinaryLogicEquality>);
}
void dtkComposerFactory::initNodeContainer(void)
{
this->record(":dtkComposer/dtkComposerNodeMetaContainer.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainer>);
this->record(":dtkComposer/dtkComposerNodeMetaContainerAppend.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerAppend>);
this->record(":dtkComposer/dtkComposerNodeMetaContainerAt.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerAt>);
this->record(":dtkComposer/dtkComposerNodeMetaContainerInsert.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerInsert>);
this->record(":dtkComposer/dtkComposerNodeMetaContainerPrepend.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerPrepend>);
this->record(":dtkComposer/dtkComposerNodeMetaContainerRemoveAt.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerRemoveAt>);
this->record(":dtkComposer/dtkComposerNodeMetaContainerResize.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerResize>);
this->record(":dtkComposer/dtkComposerNodeMetaContainerSetAt.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerSetAt>);
this->record(":dtkComposer/dtkComposerNodeMetaContainerSize.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerSize>);
this->record(":dtkComposer/dtkComposerNodeMetaContainerTakeAt.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerTakeAt>);
}
dtkComposerFactory *dtkComposerFactory::s_instance = NULL;
//
// dtkComposerFactory.cpp ends here
/* dtkComposerMangager.cpp ---
*
* Author: Nicolas Niclausse
* Copyright (C) 2016 - Nicolas Niclausse, Inria.
* Created: 2016/05/02 08:06:42
*/
#include "dtkComposerFactoryManager.h"
#include "dtkComposerNodeFactory.h"
#include "dtkComposerNodeBoolean.h"
#include "dtkComposerNodeBooleanOperator.h"
#include "dtkComposerNodeComposite.h"
#include "dtkComposerNodeConstants.h"
#include "dtkComposerNodeControlCase.h"
#include "dtkComposerNodeControlDoWhile.h"
#include "dtkComposerNodeControlFor.h"
#include "dtkComposerNodeControlForEach.h"
#include "dtkComposerNodeControlIf.h"
#include "dtkComposerNodeControlMap.h"
#include "dtkComposerNodeControlWhile.h"
#include "dtkComposerNodeDistributed.h"
#include "dtkComposerNodeExec.h"
#include "dtkComposerNodeFile.h"
#include "dtkComposerNodeInteger.h"
#include "dtkComposerNodeRange.h"
#include "dtkComposerNodeMetaContainer.h"
#include "dtkComposerNodeNumberOperator.h"
#include "dtkComposerNodeReal.h"
#include "dtkComposerNodeRemote.h"
#include "dtkComposerNodeSpawn.h"
#include "dtkComposerNodeString.h"
#include "dtkComposerNodeStringOperator.h"
#include "dtkComposerNodeLogger.h"
#include "dtkComposerNodePrint.h"
class dtkComposerFactoryManagerPrivate
{
public:
dtkComposerNodeFactory *factory;
};
dtkComposerFactoryManager::dtkComposerFactoryManager(void) : d(new dtkComposerFactoryManagerPrivate)
{
d->factory = new dtkComposerNodeFactory;
}
dtkComposerFactoryManager::~dtkComposerFactoryManager(void)
{
delete d;
}
dtkComposerNodeFactory *dtkComposerFactoryManager::factory(void)
{
return d->factory;
}
void dtkComposerFactoryManager::initNodeFile(void)
{
d->factory->record(":dtkComposer/dtkComposerNodeFile.json", dtkComposerNodeCreator<dtkComposerNodeFile>);
d->factory->record(":dtkComposer/dtkComposerNodeFileExists.json", dtkComposerNodeCreator<dtkComposerNodeFileExists>);
d->factory->record(":dtkComposer/dtkComposerNodeFileList.json", dtkComposerNodeCreator<dtkComposerNodeFileList>);
d->factory->record(":dtkComposer/dtkComposerNodeFileRead.json", dtkComposerNodeCreator<dtkComposerNodeFileRead>);
d->factory->record(":dtkComposer/dtkComposerNodeFileWrite.json", dtkComposerNodeCreator<dtkComposerNodeFileWrite>);
d->factory->record(":dtkComposer/dtkComposerNodeDirectory.json", dtkComposerNodeCreator<dtkComposerNodeDirectory>);
d->factory->record(":dtkComposer/dtkComposerNodeExec.json", dtkComposerNodeCreator<dtkComposerNodeExec>);
}
void dtkComposerFactoryManager::initNodeBase(void)
{
d->factory->record(":dtkComposer/dtkComposerNodeComposite.json", dtkComposerNodeCreator<dtkComposerNodeComposite>);
d->factory->record(":dtkComposer/dtkComposerNodeLogger.json", dtkComposerNodeCreator<dtkComposerNodeLogger>);
d->factory->record(":dtkComposer/dtkComposerNodePrint.json", dtkComposerNodeCreator<dtkComposerNodePrint>);
}
void dtkComposerFactoryManager::initNodeDistributed(void)
{
d->factory->record(":dtkComposer/dtkComposerNodeRemote.json", dtkComposerNodeCreator<dtkComposerNodeRemote>);
d->factory->record(":dtkComposer/dtkComposerNodeRemoteSubmit.json", dtkComposerNodeCreator<dtkComposerNodeRemoteSubmit>);
d->factory->record(":dtkComposer/dtkComposerNodeSpawn.json", dtkComposerNodeCreator<dtkComposerNodeSpawn>);
d->factory->record(":dtkComposer/dtkComposerNodeCommunicatorRank.json", dtkComposerNodeCreator<dtkComposerNodeCommunicatorRank>);
d->factory->record(":dtkComposer/dtkComposerNodeCommunicatorSize.json", dtkComposerNodeCreator<dtkComposerNodeCommunicatorSize>);
d->factory->record(":dtkComposer/dtkComposerNodeCommunicatorSend.json", dtkComposerNodeCreator<dtkComposerNodeCommunicatorSend>);
d->factory->record(":dtkComposer/dtkComposerNodeCommunicatorReceive.json",dtkComposerNodeCreator<dtkComposerNodeCommunicatorReceive>);
d->factory->record(":dtkComposer/dtkComposerNodeAnySource.json", dtkComposerNodeCreator<dtkComposerNodeAnySource>);
d->factory->record(":dtkComposer/dtkComposerNodeAnyTag.json", dtkComposerNodeCreator<dtkComposerNodeAnyTag>);
d->factory->record(":dtkComposer/dtkComposerNodeControllerRank.json", dtkComposerNodeCreator<dtkComposerNodeControllerRank>);
}
void dtkComposerFactoryManager::initNodeConstants(void)
{
d->factory->record(":dtkComposer/dtkComposerNodePi.json", dtkComposerNodeCreator<dtkComposerNodePi>);
d->factory->record(":dtkComposer/dtkComposerNodeE.json", dtkComposerNodeCreator<dtkComposerNodeE>);
}
void dtkComposerFactoryManager::initNodeBoolean(void)
{
d->factory->record(":dtkComposer/dtkComposerNodeBoolean.json", dtkComposerNodeCreator<dtkComposerNodeBoolean>);
d->factory->record(":dtkComposer/dtkComposerNodeBooleanOperatorUnaryNot.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorUnaryNot>);
d->factory->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryAnd.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryAnd>);
d->factory->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryOr.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryOr>);
d->factory->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryXor.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryXor>);
d->factory->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryNand.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryNand>);
d->factory->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryNor.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryNor>);
d->factory->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryXnor.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryXnor>);
d->factory->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryImp.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryImp>);
d->factory->record(":dtkComposer/dtkComposerNodeBooleanOperatorBinaryNimp.json", dtkComposerNodeCreator<dtkComposerNodeBooleanOperatorBinaryNimp>);
}
void dtkComposerFactoryManager::initNodeControl(void)
{
d->factory->record(":dtkComposer/dtkComposerNodeControlCase.json", dtkComposerNodeCreator<dtkComposerNodeControlCase>);
d->factory->record(":dtkComposer/dtkComposerNodeControlIf.json", dtkComposerNodeCreator<dtkComposerNodeControlIf>);
d->factory->record(":dtkComposer/dtkComposerNodeControlDoWhile.json", dtkComposerNodeCreator<dtkComposerNodeControlDoWhile>);
d->factory->record(":dtkComposer/dtkComposerNodeControlFor.json", dtkComposerNodeCreator<dtkComposerNodeControlFor>);
d->factory->record(":dtkComposer/dtkComposerNodeControlForEach.json", dtkComposerNodeCreator<dtkComposerNodeControlForEach>);
d->factory->record(":dtkComposer/dtkComposerNodeControlMap.json", dtkComposerNodeCreator<dtkComposerNodeControlMap>);
d->factory->record(":dtkComposer/dtkComposerNodeControlWhile.json", dtkComposerNodeCreator<dtkComposerNodeControlWhile>);
}
void dtkComposerFactoryManager::initNodeNumber(void)
{
d->factory->record(":dtkComposer/dtkComposerNodeInteger.json", dtkComposerNodeCreator<dtkComposerNodeInteger>);
d->factory->record(":dtkComposer/dtkComposerNodeReal.json", dtkComposerNodeCreator<dtkComposerNodeReal>);
d->factory->record(":dtkComposer/dtkComposerNodeRange.json", dtkComposerNodeCreator<dtkComposerNodeRange>);
// -- Unary operators
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryAbs.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryAbs>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnarySqrt.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnarySqrt>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnarySquare.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnarySquare>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryInv.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryInv>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryIncr.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryIncr>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryDecr.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryDecr>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryFloor.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryFloor>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryCeil.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryCeil>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryRound.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryRound>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryCos.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryCos>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnarySin.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnarySin>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryTan.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryTan>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryAcos.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryAcos>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryAsin.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryAsin>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryAtan.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryAtan>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryDeg2Rad.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryDeg2Rad>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryRad2Deg.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryRad2Deg>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryLn.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryLn>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryLog10.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryLog10>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorUnaryExp.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorUnaryExp>);
// -- Binary operators
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryEucldiv.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryEucldiv>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryModulo.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryModulo>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryMin.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryMin>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryMax.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryMax>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryPlus.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryPlus>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryMinus.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryMinus>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryMult.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryMult>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryRatio.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryRatio>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryPower.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryPower>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberOperatorBinaryNthroot.json", dtkComposerNodeCreator<dtkComposerNodeNumberOperatorBinaryNthroot>);
// -- Comparator operator
d->factory->record(":dtkComposer/dtkComposerNodeNumberComparatorEqual.json", dtkComposerNodeCreator<dtkComposerNodeNumberComparatorEqual>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberComparatorNotequal.json", dtkComposerNodeCreator<dtkComposerNodeNumberComparatorNotequal>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberComparatorGt.json", dtkComposerNodeCreator<dtkComposerNodeNumberComparatorGt>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberComparatorLt.json", dtkComposerNodeCreator<dtkComposerNodeNumberComparatorLt>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberComparatorGte.json", dtkComposerNodeCreator<dtkComposerNodeNumberComparatorGte>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberComparatorLte.json", dtkComposerNodeCreator<dtkComposerNodeNumberComparatorLte>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberAlmosteq.json", dtkComposerNodeCreator<dtkComposerNodeNumberAlmosteq>);
d->factory->record(":dtkComposer/dtkComposerNodeNumberNotalmosteq.json", dtkComposerNodeCreator<dtkComposerNodeNumberNotalmosteq>);
}
void dtkComposerFactoryManager::initNodeString(void)
{
d->factory->record(":dtkComposer/dtkComposerNodeString.json", dtkComposerNodeCreator<dtkComposerNodeString>);
d->factory->record(":dtkComposer/dtkComposerNodeStringReplace.json", dtkComposerNodeCreator<dtkComposerNodeStringReplace>);
d->factory->record(":dtkComposer/dtkComposerNodeStringOperatorBinaryAppend.json", dtkComposerNodeCreator<dtkComposerNodeStringOperatorBinaryAppend>);
d->factory->record(":dtkComposer/dtkComposerNodeStringOperatorBinaryLogicEquality.json", dtkComposerNodeCreator<dtkComposerNodeStringOperatorBinaryLogicEquality>);
}
void dtkComposerFactoryManager::initNodeContainer(void)
{
d->factory->record(":dtkComposer/dtkComposerNodeMetaContainer.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainer>);
d->factory->record(":dtkComposer/dtkComposerNodeMetaContainerAppend.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerAppend>);
d->factory->record(":dtkComposer/dtkComposerNodeMetaContainerAt.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerAt>);
d->factory->record(":dtkComposer/dtkComposerNodeMetaContainerInsert.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerInsert>);
d->factory->record(":dtkComposer/dtkComposerNodeMetaContainerPrepend.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerPrepend>);
d->factory->record(":dtkComposer/dtkComposerNodeMetaContainerRemoveAt.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerRemoveAt>);
d->factory->record(":dtkComposer/dtkComposerNodeMetaContainerResize.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerResize>);
d->factory->record(":dtkComposer/dtkComposerNodeMetaContainerSetAt.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerSetAt>);
d->factory->record(":dtkComposer/dtkComposerNodeMetaContainerSize.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerSize>);
d->factory->record(":dtkComposer/dtkComposerNodeMetaContainerTakeAt.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerTakeAt>);
}
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
/* dtkComposerFactoryManager.h ---
*
* Author: Nicolas Niclausse
* Copyright (C) 2016 - Nicolas Niclausse, Inria.
* Created: 2016/05/02 08:04:58
*/
#pragma once
#include "dtkComposerExport.h"
#include "dtkComposerNodeFactory.h"
class DTKCOMPOSER_EXPORT dtkComposerFactory : public dtkComposerNodeFactory
class dtkComposerFactoryManagerPrivate;