浏览代码

Added module description execution interface

Later an implementation will be added to execute the module description as an Application or a DLL
Xavi Planes 15 年之前
父节点
当前提交
fe546fd6d3

+ 5 - 0
Libs/ModuleDescription/CMakeLists.txt

@@ -26,6 +26,9 @@ SET(KIT_SRCS
   ctkModuleDescriptionConverterInterface.h
   ctkModuleDescriptionConverter.h
   ctkModuleDescriptionConverter.cpp
+  ctkModuleDescriptionExecutionInterface.h
+  ctkModuleDescriptionExecution.h
+  ctkModuleDescriptionExecution.cpp
   )
 
 # Headers that should run through moc
@@ -34,6 +37,8 @@ SET(KIT_MOC_SRCS
   ctkModuleDescriptionReader.h
   ctkModuleDescriptionConverterInterface.h
   ctkModuleDescriptionConverter.h
+  ctkModuleDescriptionExecutionInterface.h
+  ctkModuleDescriptionExecution.h
 )
 
 # UI files

+ 38 - 0
Libs/ModuleDescription/ctkModuleDescriptionExecution.cpp

@@ -0,0 +1,38 @@
+/*=============================================================================
+
+Library: CTK
+
+Copyright (c) 2010 CISTIB - Universitat Pompeu Fabra
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+=============================================================================*/
+
+
+#include "ctkModuleDescriptionExecution.h"
+
+ctkModuleDescriptionExecution::ctkModuleDescriptionExecution() 
+{
+
+}
+
+ctkModuleDescriptionExecution::~ctkModuleDescriptionExecution()
+{
+
+}
+
+void ctkModuleDescriptionExecution::setModuleDescription( const ctkModuleDescription &val )
+{
+  this->ModuleDescription = val;
+}
+

+ 50 - 0
Libs/ModuleDescription/ctkModuleDescriptionExecution.h

@@ -0,0 +1,50 @@
+/*=============================================================================
+
+Library: CTK
+
+Copyright (c) 2010 CISTIB - Universitat Pompeu Fabra
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+=============================================================================*/
+
+#ifndef __ctkModuleDescriptionExecution_h
+#define __ctkModuleDescriptionExecution_h
+
+#include <QString>
+
+#include "CTKModuleDescriptionExport.h"
+#include "ctkModuleDescriptionExecutionInterface.h"
+
+/** 
+ * \brief Base Reader of ModuleDescription
+ *
+ * This is the base interface
+ */
+class CTK_MODULDESC_EXPORT ctkModuleDescriptionExecution :
+  virtual public ctkModuleDescriptionExecutionInterface
+{
+  Q_OBJECT
+public:
+  ctkModuleDescriptionExecution();
+  ~ctkModuleDescriptionExecution();
+
+  ///
+  virtual void setModuleDescription(const ctkModuleDescription &val);
+
+protected:
+  ///
+  ctkModuleDescription ModuleDescription;
+};
+
+#endif

+ 49 - 0
Libs/ModuleDescription/ctkModuleDescriptionExecutionInterface.h

@@ -0,0 +1,49 @@
+/*=============================================================================
+
+Library: CTK
+
+Copyright (c) 2010 CISTIB - Universitat Pompeu Fabra
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+=============================================================================*/
+
+#ifndef __ctkModuleDescriptionExecutionInterface_h
+#define __ctkModuleDescriptionExecutionInterface_h
+
+#include <QVariant>
+
+#include "CTKModuleDescriptionExport.h"
+#include "ctkModuleDescription.h"
+
+/** 
+ * \brief Interface of ModuleDescription execution
+ *
+ * This allows to execute a filter using an executable application
+ * or a DLL Command Line Plugin
+ */
+class CTK_MODULDESC_EXPORT ctkModuleDescriptionExecutionInterface : public QObject
+{
+    Q_OBJECT
+public:
+  ctkModuleDescriptionExecutionInterface(){};
+  ~ctkModuleDescriptionExecutionInterface(){};
+
+  //! Set input Module Description
+  virtual void setModuleDescription(const ctkModuleDescription &val) = 0;
+
+  //!
+  virtual void Update( ) = 0;
+};
+
+#endif