[opengtl-commits] [598] add ShivaNode and CtlNode to the extensions |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 598
Author: cyrille
Date: 2009-03-12 18:30:12 +0100 (Thu, 12 Mar 2009)
Log Message:
-----------
add ShivaNode and CtlNode to the extensions
Modified Paths:
--------------
trunk/OpenGTL/Extensions/CMakeLists.txt
Added Paths:
-----------
trunk/OpenGTL/Extensions/CtlNode/
trunk/OpenGTL/Extensions/CtlNode/CMakeLists.txt
trunk/OpenGTL/Extensions/CtlNode/CtlNode.cpp
trunk/OpenGTL/Extensions/CtlNode/CtlNode.h
trunk/OpenGTL/Extensions/ShivaNode/
trunk/OpenGTL/Extensions/ShivaNode/CMakeLists.txt
trunk/OpenGTL/Extensions/ShivaNode/ShivaNode.cpp
trunk/OpenGTL/Extensions/ShivaNode/ShivaNode.h
Modified: trunk/OpenGTL/Extensions/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/Extensions/CMakeLists.txt 2009-03-12 16:57:55 UTC (rev 597)
+++ trunk/OpenGTL/Extensions/CMakeLists.txt 2009-03-12 17:30:12 UTC (rev 598)
@@ -5,3 +5,6 @@
endif( PNG_FOUND )
add_subdirectory( RawDC )
+
+add_subdirectory(CtlNode)
+add_subdirectory(ShivaNode)
Added: trunk/OpenGTL/Extensions/CtlNode/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/Extensions/CtlNode/CMakeLists.txt (rev 0)
+++ trunk/OpenGTL/Extensions/CtlNode/CMakeLists.txt 2009-03-12 17:30:12 UTC (rev 598)
@@ -0,0 +1,15 @@
+
+add_definitions(-Wall -Werror )
+
+set(CTL_NODE_SRCS
+ CtlNode.cpp )
+
+add_library(CtlNode SHARED ${CTL_NODE_SRCS} )
+target_link_libraries(CtlNode GTLGlue OpenCTL)
+
+# __STDC_LIMIT_MACROS is needed by LLVM's DataTypes.h
+add_definitions( "-D__STDC_LIMIT_MACROS" )
+add_definitions( -DCOUMPONENT_NAME=\"\\\"CtlNode\\\"\" )
+
+# Install target
+install(TARGETS CtlNode DESTINATION ${GTLGLUE_EXTENSIONS_INSTALL_DIR} )
Added: trunk/OpenGTL/Extensions/CtlNode/CtlNode.cpp
===================================================================
--- trunk/OpenGTL/Extensions/CtlNode/CtlNode.cpp (rev 0)
+++ trunk/OpenGTL/Extensions/CtlNode/CtlNode.cpp 2009-03-12 17:30:12 UTC (rev 598)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2009 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * either version 2, or (at your option) any later version of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "CtlNode.h"
+
+struct CtlNode::Private {
+
+};
+
+CtlNode::CtlNode() : d(new Private)
+{
+}
+
+CtlNode::~CtlNode()
+{
+ delete d;
+}
+
+int CtlNode::countInputs() const
+{
+ return 1;
+}
+
+const GTLGlue::Generator* CtlNode::generator() const
+{
+ return 0;
+}
+
+#include <GTLGlue/NodeFactory.h>
+#include <GTLGlue/NodeFactoryRegistry.h>
+#include <GTLCore/Macros_p.h>
+
+class CtlNodeFactory : public GTLGlue::NodeFactory {
+ public:
+ CtlNodeFactory() : GTLGlue::NodeFactory("ctl", "CTL") {}
+ virtual GTLGlue::Node* createNode() const {
+ return new CtlNode;
+ }
+};
+
+STATIC_INITIALISATION( CtlNodeFactory )
+{
+ GTLGlue::NodeFactoryRegistry::instance()->registerFactory(new CtlNodeFactory );
+}
+
Property changes on: trunk/OpenGTL/Extensions/CtlNode/CtlNode.cpp
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: trunk/OpenGTL/Extensions/CtlNode/CtlNode.h
===================================================================
--- trunk/OpenGTL/Extensions/CtlNode/CtlNode.h (rev 0)
+++ trunk/OpenGTL/Extensions/CtlNode/CtlNode.h 2009-03-12 17:30:12 UTC (rev 598)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2009 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * either version 2, or (at your option) any later version of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef _GTLGLUE_CTL_NODE_H_
+#define _GTLGLUE_CTL_NODE_H_
+
+#include <GTLGlue/Interfaces/CtlNode.h>
+#include <GTLGlue/Node.h>
+
+class CtlNode : public GTLGlue::Node, public GTLGlue::Interfaces::CtlNode {
+ public:
+ CtlNode();
+ virtual ~CtlNode();
+ virtual int countInputs() const;
+ protected:
+ virtual const GTLGlue::Generator* generator() const;
+ private:
+ struct Private;
+ Private* const d;
+};
+
+#endif
Property changes on: trunk/OpenGTL/Extensions/CtlNode/CtlNode.h
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: trunk/OpenGTL/Extensions/ShivaNode/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/Extensions/ShivaNode/CMakeLists.txt (rev 0)
+++ trunk/OpenGTL/Extensions/ShivaNode/CMakeLists.txt 2009-03-12 17:30:12 UTC (rev 598)
@@ -0,0 +1,15 @@
+
+add_definitions(-Wall -Werror )
+
+set(SHIVA_NODE_SRCS
+ ShivaNode.cpp )
+
+add_library(ShivaNode SHARED ${SHIVA_NODE_SRCS} )
+target_link_libraries(ShivaNode GTLGlue OpenShiva)
+
+# __STDC_LIMIT_MACROS is needed by LLVM's DataTypes.h
+add_definitions( "-D__STDC_LIMIT_MACROS" )
+add_definitions( -DCOUMPONENT_NAME=\"\\\"ShivaNode\\\"\" )
+
+# Install target
+install(TARGETS ShivaNode DESTINATION ${GTLGLUE_EXTENSIONS_INSTALL_DIR} )
Added: trunk/OpenGTL/Extensions/ShivaNode/ShivaNode.cpp
===================================================================
--- trunk/OpenGTL/Extensions/ShivaNode/ShivaNode.cpp (rev 0)
+++ trunk/OpenGTL/Extensions/ShivaNode/ShivaNode.cpp 2009-03-12 17:30:12 UTC (rev 598)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2009 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * either version 2, or (at your option) any later version of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ShivaNode.h"
+
+struct ShivaNode::Private {
+
+};
+
+ShivaNode::ShivaNode() : d(new Private)
+{
+}
+
+ShivaNode::~ShivaNode()
+{
+ delete d;
+}
+
+int ShivaNode::countInputs() const
+{
+ return 1;
+}
+
+const GTLGlue::Generator* ShivaNode::generator() const
+{
+ return 0;
+}
+
+#include <GTLGlue/NodeFactory.h>
+#include <GTLGlue/NodeFactoryRegistry.h>
+#include <GTLCore/Macros_p.h>
+
+class ShivaNodeFactory : public GTLGlue::NodeFactory {
+ public:
+ ShivaNodeFactory() : GTLGlue::NodeFactory("ctl", "CTL") {}
+ virtual GTLGlue::Node* createNode() const {
+ return new ShivaNode;
+ }
+};
+
+STATIC_INITIALISATION( ShivaNodeFactory )
+{
+ GTLGlue::NodeFactoryRegistry::instance()->registerFactory(new ShivaNodeFactory );
+}
+
Property changes on: trunk/OpenGTL/Extensions/ShivaNode/ShivaNode.cpp
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: trunk/OpenGTL/Extensions/ShivaNode/ShivaNode.h
===================================================================
--- trunk/OpenGTL/Extensions/ShivaNode/ShivaNode.h (rev 0)
+++ trunk/OpenGTL/Extensions/ShivaNode/ShivaNode.h 2009-03-12 17:30:12 UTC (rev 598)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2009 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * either version 2, or (at your option) any later version of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef _GTLGLUE_SHIVA_NODE_H_
+#define _GTLGLUE_SHIVA_NODE_H_
+
+#include <GTLGlue/Interfaces/ShivaNode.h>
+#include <GTLGlue/Node.h>
+
+class ShivaNode : public GTLGlue::Node, public GTLGlue::Interfaces::ShivaNode {
+ public:
+ ShivaNode();
+ virtual ~ShivaNode();
+ virtual int countInputs() const;
+ protected:
+ virtual const GTLGlue::Generator* generator() const;
+ private:
+ struct Private;
+ Private* const d;
+};
+
+#endif
Property changes on: trunk/OpenGTL/Extensions/ShivaNode/ShivaNode.h
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native