[opengtl-commits] [485] add constructors for Kernel and Module that doesn' t take the not use name |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 485
Author: cyrille
Date: 2008-11-21 23:49:38 +0100 (Fri, 21 Nov 2008)
Log Message:
-----------
add constructors for Kernel and Module that doesn't take the not use name
Modified Paths:
--------------
trunk/OpenGTL/OpenCTL/OpenCTL/Module.cpp
trunk/OpenGTL/OpenCTL/OpenCTL/Module.h
trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.cpp
trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.h
trunk/OpenGTL/OpenShiva/tools/compiler/ShivaC.cpp
trunk/OpenGTL/OpenShiva/tools/interpreter/Shiva.cpp
trunk/OpenGTL/OpenShiva/tools/tester/ShivaTester.cpp
Modified: trunk/OpenGTL/OpenCTL/OpenCTL/Module.cpp
===================================================================
--- trunk/OpenGTL/OpenCTL/OpenCTL/Module.cpp 2008-11-21 22:34:56 UTC (rev 484)
+++ trunk/OpenGTL/OpenCTL/OpenCTL/Module.cpp 2008-11-21 22:49:38 UTC (rev 485)
@@ -59,6 +59,12 @@
d->name = llvm::sys::Path(name).getBasename();
}
+Module::Module() : d(new Private)
+{
+ d->compiled = false;
+ d->name = "";
+}
+
Module::~Module()
{
delete d->moduleData;
Modified: trunk/OpenGTL/OpenCTL/OpenCTL/Module.h
===================================================================
--- trunk/OpenGTL/OpenCTL/OpenCTL/Module.h 2008-11-21 22:34:56 UTC (rev 484)
+++ trunk/OpenGTL/OpenCTL/OpenCTL/Module.h 2008-11-21 22:49:38 UTC (rev 485)
@@ -38,10 +38,10 @@
class Module {
public:
/**
- * @param name the name of the module (if this name is suffixed by a .ctl, then the suffix
- * is removed, if it's prefixed with a path, the path is removed as well);
+ * @p name is ignored use the \ref Module() constructor instead
*/
- Module(const GTLCore::String& name);
+ /*GTL_DEPRECATED */Module(const GTLCore::String& name);
+ Module();
~Module();
/**
* @return the name of the module (it's usually the name of the file without the .ctl
Modified: trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.cpp 2008-11-21 22:34:56 UTC (rev 484)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.cpp 2008-11-21 22:49:38 UTC (rev 485)
@@ -55,6 +55,13 @@
d->wrapper = 0;
}
+Kernel::Kernel(int _channelsNb ) : Library( true, _channelsNb), d(new Private )
+{
+ d->self = this;
+ d->evaluatePixelesFunction = 0;
+ d->wrapper = 0;
+}
+
Kernel::~Kernel()
{
cleanup();
Modified: trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.h
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.h 2008-11-21 22:34:56 UTC (rev 484)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.h 2008-11-21 22:49:38 UTC (rev 485)
@@ -29,6 +29,7 @@
}
#include <OpenShiva/Library.h>
+#include <GTLCore/Macros.h>
namespace OpenShiva {
/**
@@ -40,7 +41,14 @@
class Kernel : public Library {
friend class CodeGenerator;
public:
- Kernel(const GTLCore::String& _name, int _channelsNb = 4 );
+ /**
+ * Use \ref Kernel(int) instead
+ */
+ GTL_DEPRECATED Kernel(const GTLCore::String& _name, int _channelsNb = 4 );
+ /**
+ * @param indicates the number of channel for the 'pixel' and 'image' type
+ */
+ Kernel(int _channelsNb = 4 );
~Kernel();
private:
virtual void cleanup();
Modified: trunk/OpenGTL/OpenShiva/tools/compiler/ShivaC.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/tools/compiler/ShivaC.cpp 2008-11-21 22:34:56 UTC (rev 484)
+++ trunk/OpenGTL/OpenShiva/tools/compiler/ShivaC.cpp 2008-11-21 22:49:38 UTC (rev 485)
@@ -114,7 +114,7 @@
source += "\n";
std::getline(in,str);
}
- OpenShiva::Kernel p(fileName);
+ OpenShiva::Kernel p;
p.setSource( source );
p.compile();
if(not p.isCompiled())
Modified: trunk/OpenGTL/OpenShiva/tools/interpreter/Shiva.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/tools/interpreter/Shiva.cpp 2008-11-21 22:34:56 UTC (rev 484)
+++ trunk/OpenGTL/OpenShiva/tools/interpreter/Shiva.cpp 2008-11-21 22:49:38 UTC (rev 485)
@@ -142,7 +142,7 @@
}
int channelsCount = 3;
GTLCore::PixelDescription pixel( GTLCore::Type::UnsignedInteger8, channelsCount );
- OpenShiva::Kernel p(fileName, channelsCount);
+ OpenShiva::Kernel p(channelsCount);
p.setSource( source );
p.compile();
GTLCore::String errMsg;
Modified: trunk/OpenGTL/OpenShiva/tools/tester/ShivaTester.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/tools/tester/ShivaTester.cpp 2008-11-21 22:34:56 UTC (rev 484)
+++ trunk/OpenGTL/OpenShiva/tools/tester/ShivaTester.cpp 2008-11-21 22:49:38 UTC (rev 485)
@@ -120,7 +120,7 @@
source += "\n";
std::getline(in,str);
}
- OpenShiva::Kernel p(fileName);
+ OpenShiva::Kernel p;
p.setSource( source );
p.compile();
if(not p.isCompiled())