[opengtl-commits] [600] add KernelSource

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 600
Author:   cyrille
Date:     2009-03-12 18:52:13 +0100 (Thu, 12 Mar 2009)

Log Message:
-----------
add KernelSource

Modified Paths:
--------------
    trunk/OpenGTL/OpenShiva/OpenShiva/CMakeLists.txt

Added Paths:
-----------
    trunk/OpenGTL/OpenShiva/OpenShiva/KernelSource.cpp
    trunk/OpenGTL/OpenShiva/OpenShiva/KernelSource.h


Modified: trunk/OpenGTL/OpenShiva/OpenShiva/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/CMakeLists.txt	2009-03-12 17:30:25 UTC (rev 599)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/CMakeLists.txt	2009-03-12 17:52:13 UTC (rev 600)
@@ -4,6 +4,7 @@
 # List of files 
 set(OpenShiva_SRCS
   Kernel.cpp
+  KernelSource.cpp
 # Internal files
   Compiler_p.cpp
   CodeGenerator_p.cpp

Added: trunk/OpenGTL/OpenShiva/OpenShiva/KernelSource.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/KernelSource.cpp	                        (rev 0)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/KernelSource.cpp	2009-03-12 17:52:13 UTC (rev 600)
@@ -0,0 +1,56 @@
+/*
+ *  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 "KernelSource.h"
+
+using namespace OpenShiva;
+
+#include <GTLCore/String.h>
+
+struct KernelSource::Private
+{
+  GTLCore::String name;
+  GTLCore::String source;
+};
+
+KernelSource::KernelSource() : d(new Private)
+{
+  
+}
+
+KernelSource::~KernelSource()
+{
+  delete d;
+}
+
+const GTLCore::String& KernelSource::name() const
+{
+  return d->name;
+}
+const GTLCore::String& KernelSource::source() const
+{
+  return d->source;
+}
+
+void KernelSource::setSource( const GTLCore::String& _source)
+{
+  d->source = _source;
+}
+
+


Property changes on: trunk/OpenGTL/OpenShiva/OpenShiva/KernelSource.cpp
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/OpenGTL/OpenShiva/OpenShiva/KernelSource.h
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/KernelSource.h	                        (rev 0)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/KernelSource.h	2009-03-12 17:52:13 UTC (rev 600)
@@ -0,0 +1,47 @@
+/*
+ *  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 _OPENSHIVA_KERNEL_SOURCE_H_
+#define _OPENSHIVA_KERNEL_SOURCE_H_
+
+namespace GTLCore {
+  class String;
+}
+
+namespace OpenShiva {
+  /**
+   * @ingroup OpenShiva
+   * 
+   * Define the source code of a Kernel. Allow to access to information like the metadata,
+   * or the source code, or the parameters of the evaluateParam function.
+   */
+  class KernelSource {
+    public:
+      KernelSource();
+      ~KernelSource();
+      const GTLCore::String& name() const;
+      const GTLCore::String& source() const;
+      void setSource( const GTLCore::String& );
+    private:
+      struct Private;
+      Private* const d;
+  };
+}
+
+#endif


Property changes on: trunk/OpenGTL/OpenShiva/OpenShiva/KernelSource.h
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/