# ---------------------------------------------------------------------
#
# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-# pour la Santé)
+# pour la Sant�)
# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
# Previous Authors : Laurent Guigues, Jean-Pierre Roux
# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
# The fact that you are presently reading this means that you have had
# knowledge of the CeCILL-B license and that you accept its terms.
# ------------------------------------------------------------------------
-*/
-
+ */
/*
* modelCDMProject.h
*
* Created on: 13/11/2012
- * Author: daniel
+ * Author: Daniel Felipe Gonzalez Obando
*/
#ifndef MODELCDMPROJECT_H_
#define MODELCDMPROJECT_H_
-#include "modelCDMIProjectTreeNode.h"
+#include<iostream>
+#include<vector>
+
+#include "modelCDMFolder.h"
+#include "modelCDMLib.h"
+#include "modelCDMAppli.h"
+#include "modelCDMPackage.h"
+#include "modelCDMCMakeListsFile.h"
-class modelCDMProject : public modelCDMIProjectTreeNode
+class modelCDMProject : public modelCDMFolder
{
public:
modelCDMProject();
- modelCDMProject(std::string name, std::string path, unsigned char type, int level);
- ~modelCDMProject(){}
+ modelCDMProject(const std::string& path, const std::string& buildPath = "");
+ ~modelCDMProject();
+
+ void PopulateProject();
+
+ const std::string& GetNameProject() const;
+ const std::string& GetVersion() const;
+ const std::string& GetVersionDate() const;
+ const std::string& GetBuildPath() const;
+
+ bool SetVersion(const std::string& version, std::string*& result);
+ bool SetBuildPath(const std::string& path, std::string*& result);
+
+ modelCDMIProjectTreeNode* CreatePackage(
+ const std::string& name,
+ std::string*& result,
+ const std::string& authors = "info-dev",
+ const std::string& authorsEmail = "info-dev@creatis.insa-lyon.fr",
+ const std::string& version = "1.0.0",
+ const std::string& description = "no description"
+ );
+ modelCDMIProjectTreeNode* CreateLibrary(
+ const std::string& name,
+ std::string*& result,
+ const std::string& path = "/lib"
+ );
+ modelCDMIProjectTreeNode* CreateApplication(
+ const std::string& name,
+ std::string*& result,
+ const std::string& path = "/appli"
+ );
+ modelCDMIProjectTreeNode* CreateBlackBox(
+ const std::string& name,
+ const std::string& package = "", //if empty converts into "/bbtk_*projectName*_PKG"
+ const std::string& authors = "unknown",
+ const std::string& authorsEmail = "",
+ const std::string& categories = "empty",
+ const std::string& description = "no description"
+ );
+ bool OpenCMakeListsFile(std::string*& result);
+ virtual const bool Refresh(std::string*& result);
+ bool ConfigureBuild(std::string*& result);
+ bool Build(std::string*& result);
+ bool Connect(std::string*& result);
+
+private:
+
+ std::string nameProject;
+ std::string version;
+ std::string versionDate;
+ std::string buildPath;
+
+ modelCDMLib* lib;
+ modelCDMAppli* appli;
+ std::vector<modelCDMPackage*> packages;
};