From 31785b7ab806d4ac24fd81bcf6d74fe82897c90e Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 3 Mar 2012 11:35:34 +0100 Subject: [PATCH] Changed: #1440 Separation of process handler and process info --HG-- branch : build_pipeline_v3 --- code/nel/tools/pipeline/CMakeLists.txt | 1 + ...ess_interface.cpp => pipeline_process.cpp} | 12 +-- ...process_interface.h => pipeline_process.h} | 26 +++--- ...process_plugin.cpp => process_handler.cpp} | 14 +-- .../pipeline/plugin_library/process_handler.h | 65 ++++++++++++++ .../pipeline/plugin_library/process_info.cpp | 47 ++++++++++ .../pipeline/plugin_library/process_info.h | 72 +++++++++++++++ .../pipeline/plugin_library/process_plugin.h | 68 --------------- .../pipeline/plugin_max/process_max_shape.cpp | 3 +- .../pipeline/plugin_max/process_max_shape.h | 4 +- .../tools/pipeline/plugin_nel/CMakeLists.txt | 13 +++ .../plugin_nel/pipeline_plugin_nel.cpp | 87 +++++++++++++++++++ .../pipeline/plugin_nel/pipeline_plugin_nel.h | 65 ++++++++++++++ .../process_interface.cpp} | 14 +-- .../pipeline/plugin_nel/process_interface.h | 66 ++++++++++++++ .../plugin_nel/process_interface_info.cpp | 70 +++++++++++++++ .../plugin_nel/process_interface_info.h | 70 +++++++++++++++ .../service/pipeline_interface_impl.cpp | 21 ----- .../service/pipeline_interface_impl.h | 2 - .../service/pipeline_process_impl.cpp | 81 +++++++++++++++++ ...terface_impl.h => pipeline_process_impl.h} | 26 +++--- .../tools/pipeline/service/pipeline_service.h | 6 +- .../DFN/pipeline/pipeline_plugin_process.dfn | 5 +- .../pipeline/plugin_max.pipeline_plugin | 4 +- .../pipeline/plugin_nel.pipeline_plugin | 4 +- 25 files changed, 701 insertions(+), 145 deletions(-) rename code/nel/tools/pipeline/plugin_library/{process_interface.cpp => pipeline_process.cpp} (77%) rename code/nel/tools/pipeline/plugin_library/{process_interface.h => pipeline_process.h} (76%) rename code/nel/tools/pipeline/plugin_library/{process_plugin.cpp => process_handler.cpp} (80%) create mode 100644 code/nel/tools/pipeline/plugin_library/process_handler.h create mode 100644 code/nel/tools/pipeline/plugin_library/process_info.cpp create mode 100644 code/nel/tools/pipeline/plugin_library/process_info.h delete mode 100644 code/nel/tools/pipeline/plugin_library/process_plugin.h create mode 100644 code/nel/tools/pipeline/plugin_nel/CMakeLists.txt create mode 100644 code/nel/tools/pipeline/plugin_nel/pipeline_plugin_nel.cpp create mode 100644 code/nel/tools/pipeline/plugin_nel/pipeline_plugin_nel.h rename code/nel/tools/pipeline/{service/process_interface_impl.cpp => plugin_nel/process_interface.cpp} (77%) create mode 100644 code/nel/tools/pipeline/plugin_nel/process_interface.h create mode 100644 code/nel/tools/pipeline/plugin_nel/process_interface_info.cpp create mode 100644 code/nel/tools/pipeline/plugin_nel/process_interface_info.h create mode 100644 code/nel/tools/pipeline/service/pipeline_process_impl.cpp rename code/nel/tools/pipeline/service/{process_interface_impl.h => pipeline_process_impl.h} (68%) diff --git a/code/nel/tools/pipeline/CMakeLists.txt b/code/nel/tools/pipeline/CMakeLists.txt index 7ab8b206e..01838f159 100644 --- a/code/nel/tools/pipeline/CMakeLists.txt +++ b/code/nel/tools/pipeline/CMakeLists.txt @@ -1,4 +1,5 @@ SUBDIRS( plugin_library + plugin_nel plugin_max service) diff --git a/code/nel/tools/pipeline/plugin_library/process_interface.cpp b/code/nel/tools/pipeline/plugin_library/pipeline_process.cpp similarity index 77% rename from code/nel/tools/pipeline/plugin_library/process_interface.cpp rename to code/nel/tools/pipeline/plugin_library/pipeline_process.cpp index 6362dd4a0..f6a9385a3 100644 --- a/code/nel/tools/pipeline/plugin_library/process_interface.cpp +++ b/code/nel/tools/pipeline/plugin_library/pipeline_process.cpp @@ -1,9 +1,9 @@ /** - * \file process_interface.cpp - * \brief IProcessInterface + * \file pipeline_process.cpp + * \brief IPipelineProcess * \date 2012-03-03 09:22GMT * \author Jan Boon (Kaetemi) - * IProcessInterface + * IPipelineProcess */ /* @@ -26,7 +26,7 @@ */ #include -#include "process_interface.h" +#include "pipeline_process.h" // STL includes @@ -41,10 +41,10 @@ using namespace std; namespace PIPELINE { -IProcessInterface *IProcessInterface::getInstance() +IPipelineProcess *IPipelineProcess::getInstance() { nlassert(NLMISC::INelContext::isContextInitialised()); - return static_cast(NLMISC::INelContext::getInstance().getSingletonPointer("IProcessInterface")); + return static_cast(NLMISC::INelContext::getInstance().getSingletonPointer("IPipelineProcess")); } } /* namespace PIPELINE */ diff --git a/code/nel/tools/pipeline/plugin_library/process_interface.h b/code/nel/tools/pipeline/plugin_library/pipeline_process.h similarity index 76% rename from code/nel/tools/pipeline/plugin_library/process_interface.h rename to code/nel/tools/pipeline/plugin_library/pipeline_process.h index 71ce1a94c..41d363cdc 100644 --- a/code/nel/tools/pipeline/plugin_library/process_interface.h +++ b/code/nel/tools/pipeline/plugin_library/pipeline_process.h @@ -1,9 +1,9 @@ /** - * \file process_interface.h - * \brief IProcessInterface + * \file pipeline_process.h + * \brief IPipelineProcess * \date 2012-03-03 09:22GMT * \author Jan Boon (Kaetemi) - * IProcessInterface + * IPipelineProcess */ /* @@ -25,8 +25,8 @@ * . */ -#ifndef PIPELINE_PROCESS_INTERFACE_H -#define PIPELINE_PROCESS_INTERFACE_H +#ifndef PIPELINE_PIPELINE_PROCESS_H +#define PIPELINE_PIPELINE_PROCESS_H #include // STL includes @@ -38,18 +38,18 @@ namespace PIPELINE { /** - * \brief IProcessInterface + * \brief IPipelineProcess * \date 2012-03-03 09:22GMT * \author Jan Boon (Kaetemi) - * IProcessInterface + * IPipelineProcess */ -class IProcessInterface +class IPipelineProcess { public: - IProcessInterface(); - virtual ~IProcessInterface(); + IPipelineProcess() { } + virtual ~IPipelineProcess() { } - static IProcessInterface *getInstance(); + static IPipelineProcess *getInstance(); // ***************** PROCESS FUNCTIONS (EASILY EXPOSABLE TO SCRIPTS ETCETERA) ***************** @@ -58,10 +58,10 @@ public: /// Get the temporary directory for the current process. The directory must be deleted when the process ends. May return random temporary directories if no process is running. virtual std::string getTempDir() = 0; -}; /* class IProcessInterface */ +}; /* class IPipelineProcess */ } /* namespace PIPELINE */ -#endif /* #ifndef PIPELINE_PROCESS_INTERFACE_H */ +#endif /* #ifndef PIPELINE_PIPELINE_PROCESS_H */ /* end of file */ diff --git a/code/nel/tools/pipeline/plugin_library/process_plugin.cpp b/code/nel/tools/pipeline/plugin_library/process_handler.cpp similarity index 80% rename from code/nel/tools/pipeline/plugin_library/process_plugin.cpp rename to code/nel/tools/pipeline/plugin_library/process_handler.cpp index c505be228..846a9a812 100644 --- a/code/nel/tools/pipeline/plugin_library/process_plugin.cpp +++ b/code/nel/tools/pipeline/plugin_library/process_handler.cpp @@ -1,9 +1,9 @@ /** - * \file process_plugin.cpp - * \brief IProcessPlugin - * \date 2012-02-25 10:19GMT + * \file process_handler.cpp + * \brief IProcessHandler + * \date 2012-03-03 10:14GMT * \author Jan Boon (Kaetemi) - * IProcessPlugin + * IProcessHandler */ /* @@ -26,7 +26,7 @@ */ #include -#include "process_plugin.h" +#include "process_handler.h" // STL includes @@ -40,12 +40,12 @@ using namespace std; namespace PIPELINE { -IProcessPlugin::IProcessPlugin() +IProcessHandler::IProcessHandler() { } -IProcessPlugin::~IProcessPlugin() +IProcessHandler::~IProcessHandler() { } diff --git a/code/nel/tools/pipeline/plugin_library/process_handler.h b/code/nel/tools/pipeline/plugin_library/process_handler.h new file mode 100644 index 000000000..16e2e4d41 --- /dev/null +++ b/code/nel/tools/pipeline/plugin_library/process_handler.h @@ -0,0 +1,65 @@ +/** + * \file process_handler.h + * \brief IProcessHandler + * \date 2012-03-03 10:14GMT + * \author Jan Boon (Kaetemi) + * IProcessHandler + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 2 of + * the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see + * . + */ + +#ifndef PIPELINE_PROCESS_HANDLER_H +#define PIPELINE_PROCESS_HANDLER_H +#include + +// STL includes + +// NeL includes +#include + +// Project includes + +namespace PIPELINE { + +/** + * \brief IProcessHandler + * \date 2012-03-03 10:14GMT + * \author Jan Boon (Kaetemi) + * IProcessHandler + * A process handler is executed by the PLS SLAVE services. Processes can have multiple handlers. These are configured under the workspace plugins sheet. + */ +class IProcessHandler : public NLMISC::IClassable +{ +protected: + // pointers + // ... + + // instances + // ... +public: + IProcessHandler(); + virtual ~IProcessHandler(); +}; /* class IProcessHandler */ + +} /* namespace PIPELINE */ + +#endif /* #ifndef PIPELINE_PROCESS_HANDLER_H */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/plugin_library/process_info.cpp b/code/nel/tools/pipeline/plugin_library/process_info.cpp new file mode 100644 index 000000000..838a38c78 --- /dev/null +++ b/code/nel/tools/pipeline/plugin_library/process_info.cpp @@ -0,0 +1,47 @@ +/** + * \file process_info.cpp + * \brief IProcessInfo + * \date 2012-03-03 10:14GMT + * \author Jan Boon (Kaetemi) + * IProcessInfo + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 2 of + * the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see + * . + */ + +#include +#include "process_info.h" + +// STL includes + +// NeL includes +// #include + +// Project includes + +using namespace std; +// using namespace NLMISC; + +namespace PIPELINE { + +void sjdflkmsdjfmlkqsjlkfdj() { } + +} /* namespace PIPELINE */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/plugin_library/process_info.h b/code/nel/tools/pipeline/plugin_library/process_info.h new file mode 100644 index 000000000..ab0aa5f2e --- /dev/null +++ b/code/nel/tools/pipeline/plugin_library/process_info.h @@ -0,0 +1,72 @@ +/** + * \file process_info.h + * \brief IProcessInfo + * \date 2012-03-03 10:14GMT + * \author Jan Boon (Kaetemi) + * IProcessInfo + * A process info is executed by the PLS MASTER to prepare a process handler to be run. + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 2 of + * the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see + * . + */ + +#ifndef PIPELINE_PROCESS_INFO_H +#define PIPELINE_PROCESS_INFO_H +#include + +// STL includes +#include +#include + +// NeL includes +#include + +// Project includes + +namespace PIPELINE { + +/** + * \brief IProcessInfo + * \date 2012-03-03 10:14GMT + * \author Jan Boon (Kaetemi) + * IProcessInfo + */ +class IProcessInfo : public NLMISC::IClassable +{ +public: + IProcessInfo() { } + virtual ~IProcessInfo() { } + + /// Dependency information used to store the initial state of files on which the process depends. + /// A process handler is not allowed to depend on any files it does not list here. + + /// Must return all directories on which the process handler recursively depends. + virtual void getDependentDirectoriesRecursive(std::vector &result) = 0; + /// Must return all directories on which the process handler depends. + virtual void getDependentDirectories(std::vector &result) = 0; + /// Must return all files on which the process handler depends, ONLY if these are not in dependent directories. + virtual void getDependentFiles(std::vector &result) = 0; + +}; /* class IProcessInfo */ + +} /* namespace PIPELINE */ + +#endif /* #ifndef PIPELINE_PROCESS_INFO_H */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/plugin_library/process_plugin.h b/code/nel/tools/pipeline/plugin_library/process_plugin.h deleted file mode 100644 index ceffc67dc..000000000 --- a/code/nel/tools/pipeline/plugin_library/process_plugin.h +++ /dev/null @@ -1,68 +0,0 @@ -/** - * \file process_plugin.h - * \brief IProcessPlugin - * \date 2012-02-25 10:19GMT - * \author Jan Boon (Kaetemi) - * IProcessPlugin - */ - -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE PIPELINE. - * RYZOM CORE PIPELINE is free software: you can redistribute it - * and/or modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 2 of - * the License, or (at your option) any later version. - * - * RYZOM CORE PIPELINE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see - * . - */ - -#ifndef PIPELINE_PROCESS_PLUGIN_H -#define PIPELINE_PROCESS_PLUGIN_H -#include - -// STL includes - -// NeL includes -#include - -// Project includes - -namespace PIPELINE { - -/** - * \brief IProcessPlugin - * \date 2012-02-25 10:19GMT - * \author Jan Boon (Kaetemi) - * /// REJECTED.A /// A process plugin handles process sheets with specified sheet extention. - * /// REJECTED.A /// If more than one process plugin handles a sheet extention, all of them will be run. - * A process sheet may define one or more process plugins to handle the process. - * The master service may dispatch these seperately to different slave services to executa a single process sheets using multiple process plugins. - * This enables creating seperate plugins for different file formats for the same process, to allow handling files from different modeling packages on different build servers. - */ -class IProcessPlugin : public NLMISC::IClassable -{ -protected: - // pointers - // ... - - // instances - // ... -public: - IProcessPlugin(); - virtual ~IProcessPlugin(); -}; /* class IProcessPlugin */ - -} /* namespace PIPELINE */ - -#endif /* #ifndef PIPELINE_PROCESS_PLUGIN_H */ - -/* end of file */ diff --git a/code/nel/tools/pipeline/plugin_max/process_max_shape.cpp b/code/nel/tools/pipeline/plugin_max/process_max_shape.cpp index 943a2199c..9be9b30d3 100644 --- a/code/nel/tools/pipeline/plugin_max/process_max_shape.cpp +++ b/code/nel/tools/pipeline/plugin_max/process_max_shape.cpp @@ -37,6 +37,7 @@ // Project includes #include "../plugin_library/pipeline_interface.h" +#include "../plugin_library/pipeline_process.h" using namespace std; // using namespace NLMISC; @@ -65,7 +66,7 @@ public: virtual void run() { - std::string tempDirectory = PIPELINE::IPipelineInterface::getInstance()->getTempDir(); + std::string tempDirectory = PIPELINE::IPipelineProcess::getInstance()->getTempDir(); PIPELINE::IPipelineInterface::getInstance()->endedRunnableTask(); } diff --git a/code/nel/tools/pipeline/plugin_max/process_max_shape.h b/code/nel/tools/pipeline/plugin_max/process_max_shape.h index 418070c0c..9e18b4d12 100644 --- a/code/nel/tools/pipeline/plugin_max/process_max_shape.h +++ b/code/nel/tools/pipeline/plugin_max/process_max_shape.h @@ -34,7 +34,7 @@ // NeL includes // Project includes -#include "../plugin_library/process_plugin.h" +#include "../plugin_library/process_handler.h" namespace PIPELINE { @@ -44,7 +44,7 @@ namespace PIPELINE { * \author Jan Boon (Kaetemi) * CProcessMaxShape */ -class CProcessMaxShape : public IProcessPlugin +class CProcessMaxShape : public IProcessHandler { protected: // pointers diff --git a/code/nel/tools/pipeline/plugin_nel/CMakeLists.txt b/code/nel/tools/pipeline/plugin_nel/CMakeLists.txt new file mode 100644 index 000000000..9d5496471 --- /dev/null +++ b/code/nel/tools/pipeline/plugin_nel/CMakeLists.txt @@ -0,0 +1,13 @@ +FILE(GLOB SRC *.cpp *.h) + +SOURCE_GROUP("" FILES ${SRC}) + +ADD_LIBRARY(pipeline_plugin_nel MODULE ${SRC}) + +TARGET_LINK_LIBRARIES(pipeline_plugin_nel pipeline_plugin_library nelmisc) + +NL_DEFAULT_PROPS(pipeline_plugin_nel "Pipeline Plugin NeL") +NL_ADD_LIB_SUFFIX(pipeline_plugin_nel) +NL_ADD_RUNTIME_FLAGS(pipeline_plugin_nel) + +INSTALL(TARGETS pipeline_plugin_nel LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT pipeline) diff --git a/code/nel/tools/pipeline/plugin_nel/pipeline_plugin_nel.cpp b/code/nel/tools/pipeline/plugin_nel/pipeline_plugin_nel.cpp new file mode 100644 index 000000000..5bbf80ae2 --- /dev/null +++ b/code/nel/tools/pipeline/plugin_nel/pipeline_plugin_nel.cpp @@ -0,0 +1,87 @@ +/** + * \file pipeline_plugin_nel.cpp + * \brief CPipelinePluginNeL + * \date 2012-03-03 10:09GMT + * \author Jan Boon (Kaetemi) + * CPipelinePluginNeL + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 2 of + * the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see + * . + */ + +#include +#include "pipeline_plugin_nel.h" + +// STL includes + +// NeL includes +#include "nel/misc/dynloadlib.h" +#include "nel/misc/debug.h" + +// Project includes +#include "../plugin_library/pipeline_interface.h" +#include "process_interface.h" +#include "process_interface_info.h" + +using namespace std; +// using namespace NLMISC; + +namespace PIPELINE { + +// ****************************************************************** + +class CPipelinePluginNeLNelLibrary : public NLMISC::INelLibrary +{ + void onLibraryLoaded(bool /* firstTime */) + { + nldebug("Library loaded: CPipelinePluginNeL"); + PIPELINE_REGISTER_CLASS(CProcessInterface); + PIPELINE_REGISTER_CLASS(CProcessInterfaceInfo); + } + void onLibraryUnloaded(bool /* lastTime */) + { + nldebug("Library unloaded: CPipelinePluginNeL"); + } +}; +NLMISC_DECL_PURE_LIB(CPipelinePluginNeLNelLibrary) + +HINSTANCE CPipelinePluginNeLDllHandle = NULL; +BOOL WINAPI DllMain(HANDLE hModule, DWORD /* ul_reason_for_call */, LPVOID /* lpReserved */) +{ + CPipelinePluginNeLDllHandle = (HINSTANCE)hModule; + return TRUE; +} + +// ****************************************************************** + +/* +CPipelinePluginNeL::CPipelinePluginNeL() +{ + +} + +CPipelinePluginNeL::~CPipelinePluginNeL() +{ + +} +*/ + +} /* namespace PIPELINE */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/plugin_nel/pipeline_plugin_nel.h b/code/nel/tools/pipeline/plugin_nel/pipeline_plugin_nel.h new file mode 100644 index 000000000..01eb3844f --- /dev/null +++ b/code/nel/tools/pipeline/plugin_nel/pipeline_plugin_nel.h @@ -0,0 +1,65 @@ +/** + * \file pipeline_plugin_nel.h + * \brief CPipelinePluginNeL + * \date 2012-03-03 10:09GMT + * \author Jan Boon (Kaetemi) + * CPipelinePluginNeL + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 2 of + * the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see + * . + */ + +#ifndef PIPELINE_PIPELINE_PLUGIN_NEL_H +#define PIPELINE_PIPELINE_PLUGIN_NEL_H +#include + +// STL includes + +// NeL includes + +// Project includes + +namespace PIPELINE { + +/* +/** + * \brief CPipelinePluginNeL + * \date 2012-03-03 10:09GMT + * \author Jan Boon (Kaetemi) + * CPipelinePluginNeL + * +class CPipelinePluginNeL +{ +protected: + // pointers + // ... + + // instances + // ... +public: + CPipelinePluginNeL(); + virtual ~CPipelinePluginNeL(); +}; /* class CPipelinePluginNeL * +*/ + +} /* namespace PIPELINE */ + +#endif /* #ifndef PIPELINE_PIPELINE_PLUGIN_NEL_H */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/service/process_interface_impl.cpp b/code/nel/tools/pipeline/plugin_nel/process_interface.cpp similarity index 77% rename from code/nel/tools/pipeline/service/process_interface_impl.cpp rename to code/nel/tools/pipeline/plugin_nel/process_interface.cpp index 1298afd73..2ae0a4504 100644 --- a/code/nel/tools/pipeline/service/process_interface_impl.cpp +++ b/code/nel/tools/pipeline/plugin_nel/process_interface.cpp @@ -1,9 +1,9 @@ /** - * \file process_interface_impl.cpp - * \brief CProcessInterfaceImpl - * \date 2012-03-03 09:33GMT + * \file process_interface.cpp + * \brief CProcessInterface + * \date 2012-03-03 10:10GMT * \author Jan Boon (Kaetemi) - * CProcessInterfaceImpl + * CProcessInterface */ /* @@ -26,7 +26,7 @@ */ #include -#include "process_interface_impl.h" +#include "process_interface.h" // STL includes @@ -40,12 +40,12 @@ using namespace std; namespace PIPELINE { -CProcessInterfaceImpl::CProcessInterfaceImpl() +CProcessInterface::CProcessInterface() { } -CProcessInterfaceImpl::~CProcessInterfaceImpl() +CProcessInterface::~CProcessInterface() { } diff --git a/code/nel/tools/pipeline/plugin_nel/process_interface.h b/code/nel/tools/pipeline/plugin_nel/process_interface.h new file mode 100644 index 000000000..3587752f6 --- /dev/null +++ b/code/nel/tools/pipeline/plugin_nel/process_interface.h @@ -0,0 +1,66 @@ +/** + * \file process_interface.h + * \brief CProcessInterface + * \date 2012-03-03 10:10GMT + * \author Jan Boon (Kaetemi) + * CProcessInterface + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 2 of + * the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see + * . + */ + +#ifndef PIPELINE_PROCESS_INTERFACE_H +#define PIPELINE_PROCESS_INTERFACE_H +#include + +// STL includes + +// NeL includes + +// Project includes +#include "../plugin_library/process_handler.h" + +namespace PIPELINE { + +/** + * \brief CProcessInterface + * \date 2012-03-03 10:10GMT + * \author Jan Boon (Kaetemi) + * CProcessInterface + */ +class CProcessInterface : public IProcessHandler +{ +protected: + // pointers + // ... + + // instances + // ... +public: + CProcessInterface(); + virtual ~CProcessInterface(); + + NLMISC_DECLARE_CLASS(CProcessInterface) +}; /* class CProcessInterface */ + +} /* namespace PIPELINE */ + +#endif /* #ifndef PIPELINE_PROCESS_INTERFACE_H */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/plugin_nel/process_interface_info.cpp b/code/nel/tools/pipeline/plugin_nel/process_interface_info.cpp new file mode 100644 index 000000000..70ff4195d --- /dev/null +++ b/code/nel/tools/pipeline/plugin_nel/process_interface_info.cpp @@ -0,0 +1,70 @@ +/** + * \file process_interface_info.cpp + * \brief CProcessInterfaceInfo + * \date 2012-03-03 10:10GMT + * \author Jan Boon (Kaetemi) + * CProcessInterfaceInfo + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 2 of + * the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see + * . + */ + +#include +#include "process_interface_info.h" + +// STL includes + +// NeL includes +// #include + +// Project includes + +using namespace std; +// using namespace NLMISC; + +namespace PIPELINE { + +CProcessInterfaceInfo::CProcessInterfaceInfo() +{ + +} + +CProcessInterfaceInfo::~CProcessInterfaceInfo() +{ + +} + +void CProcessInterfaceInfo::getDependentDirectoriesRecursive(std::vector &result) +{ + +} + +void CProcessInterfaceInfo::getDependentDirectories(std::vector &result) +{ + +} + +void CProcessInterfaceInfo::getDependentFiles(std::vector &result) +{ + +} + +} /* namespace PIPELINE */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/plugin_nel/process_interface_info.h b/code/nel/tools/pipeline/plugin_nel/process_interface_info.h new file mode 100644 index 000000000..b294af536 --- /dev/null +++ b/code/nel/tools/pipeline/plugin_nel/process_interface_info.h @@ -0,0 +1,70 @@ +/** + * \file process_interface_info.h + * \brief CProcessInterfaceInfo + * \date 2012-03-03 10:10GMT + * \author Jan Boon (Kaetemi) + * CProcessInterfaceInfo + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 2 of + * the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see + * . + */ + +#ifndef PIPELINE_PROCESS_INTERFACE_INFO_H +#define PIPELINE_PROCESS_INTERFACE_INFO_H +#include + +// STL includes + +// NeL includes + +// Project includes +#include "../plugin_library/process_info.h" + +namespace PIPELINE { + +/** + * \brief CProcessInterfaceInfo + * \date 2012-03-03 10:10GMT + * \author Jan Boon (Kaetemi) + * CProcessInterfaceInfo + */ +class CProcessInterfaceInfo : public IProcessInfo +{ +protected: + // pointers + // ... + + // instances + // ... +public: + CProcessInterfaceInfo(); + virtual ~CProcessInterfaceInfo(); + + virtual void getDependentDirectoriesRecursive(std::vector &result); + virtual void getDependentDirectories(std::vector &result); + virtual void getDependentFiles(std::vector &result); + + NLMISC_DECLARE_CLASS(CProcessInterfaceInfo) +}; /* class CProcessInterfaceInfo */ + +} /* namespace PIPELINE */ + +#endif /* #ifndef PIPELINE_PROCESS_INTERFACE_INFO_H */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/service/pipeline_interface_impl.cpp b/code/nel/tools/pipeline/service/pipeline_interface_impl.cpp index e364f2988..7c01cb528 100644 --- a/code/nel/tools/pipeline/service/pipeline_interface_impl.cpp +++ b/code/nel/tools/pipeline/service/pipeline_interface_impl.cpp @@ -78,27 +78,6 @@ void CPipelineInterfaceImpl::endedRunnableTask() PIPELINE::endedRunnableTask(); } -std::string CPipelineInterfaceImpl::getProjectValue(const std::string &name) -{ - return ""; // TODO -} - -std::string CPipelineInterfaceImpl::getTempDir() -{ - // IF PROJECT blahblah TODO - // ELSE - - { - std::stringstream ss; - ss << g_PipelineDirectory; - ss << NLMISC::CTime::getSecondsSince1970(); - ss << "."; - ss << rand(); - ss << PIPELINE_DIRECTORY_TEMP_SUFFIX; - return ss.str(); - } -} - } /* namespace PIPELINE */ /* end of file */ diff --git a/code/nel/tools/pipeline/service/pipeline_interface_impl.h b/code/nel/tools/pipeline/service/pipeline_interface_impl.h index 7e2a1ec34..9d57f8da4 100644 --- a/code/nel/tools/pipeline/service/pipeline_interface_impl.h +++ b/code/nel/tools/pipeline/service/pipeline_interface_impl.h @@ -40,8 +40,6 @@ namespace PIPELINE { -#define PIPELINE_DIRECTORY_TEMP_SUFFIX ".temp" - /** * \brief CPipelineInterfaceImpl * \date 2012-02-25 12:21GMT diff --git a/code/nel/tools/pipeline/service/pipeline_process_impl.cpp b/code/nel/tools/pipeline/service/pipeline_process_impl.cpp new file mode 100644 index 000000000..db973cc11 --- /dev/null +++ b/code/nel/tools/pipeline/service/pipeline_process_impl.cpp @@ -0,0 +1,81 @@ +/** + * \file pipeline_process_impl.cpp + * \brief CPipelineProcessImpl + * \date 2012-03-03 09:33GMT + * \author Jan Boon (Kaetemi) + * CPipelineProcessImpl + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 2 of + * the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see + * . + */ + +#include +#include "pipeline_process_impl.h" + +// STL includes +#include + +// NeL includes +#include +#include +#include + +// Project includes +#include "pipeline_service.h" + +using namespace std; +// using namespace NLMISC; + +namespace PIPELINE { + +CPipelineProcessImpl::CPipelineProcessImpl() +{ + nlassert(getInstance() == NULL); + NLMISC::INelContext::getInstance().setSingletonPointer("IPipelineProcess", this); +} + +CPipelineProcessImpl::~CPipelineProcessImpl() +{ + NLMISC::INelContext::getInstance().releaseSingletonPointer("IPipelineProcess", this); +} + +std::string CPipelineProcessImpl::getProjectValue(const std::string &name) +{ + return ""; // TODO +} + +std::string CPipelineProcessImpl::getTempDir() +{ + // IF PROJECT blahblah TODO + // ELSE + + { + std::stringstream ss; + ss << g_PipelineDirectory; + ss << NLMISC::CTime::getSecondsSince1970(); + ss << "."; + ss << rand(); + ss << PIPELINE_DIRECTORY_TEMP_SUFFIX; + return ss.str(); + } +} + +} /* namespace PIPELINE */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/service/process_interface_impl.h b/code/nel/tools/pipeline/service/pipeline_process_impl.h similarity index 68% rename from code/nel/tools/pipeline/service/process_interface_impl.h rename to code/nel/tools/pipeline/service/pipeline_process_impl.h index 8761bfe7e..53faf3ccb 100644 --- a/code/nel/tools/pipeline/service/process_interface_impl.h +++ b/code/nel/tools/pipeline/service/pipeline_process_impl.h @@ -1,9 +1,9 @@ /** - * \file process_interface_impl.h - * \brief CProcessInterfaceImpl + * \file pipeline_process_impl.h + * \brief CPipelineProcessImpl * \date 2012-03-03 09:33GMT * \author Jan Boon (Kaetemi) - * CProcessInterfaceImpl + * CPipelineProcessImpl */ /* @@ -25,8 +25,8 @@ * . */ -#ifndef PIPELINE_PROCESS_INTERFACE_IMPL_H -#define PIPELINE_PROCESS_INTERFACE_IMPL_H +#ifndef PIPELINE_PIPELINE_PROCESS_IMPL_H +#define PIPELINE_PIPELINE_PROCESS_IMPL_H #include // STL includes @@ -34,28 +34,28 @@ // NeL includes // Project includes -#include "../plugin_library/process_interface.h" +#include "../plugin_library/pipeline_process.h" namespace PIPELINE { /** - * \brief CProcessInterfaceImpl + * \brief CPipelineProcessImpl * \date 2012-03-03 09:33GMT * \author Jan Boon (Kaetemi) - * CProcessInterfaceImpl + * CPipelineProcessImpl */ -class CProcessInterfaceImpl : public IProcessInterface +class CPipelineProcessImpl : public IPipelineProcess { public: - CProcessInterfaceImpl(); - virtual ~CProcessInterfaceImpl(); + CPipelineProcessImpl(); + virtual ~CPipelineProcessImpl(); virtual std::string getProjectValue(const std::string &name); virtual std::string getTempDir(); -}; /* class CProcessInterfaceImpl */ +}; /* class CPipelineProcessImpl */ } /* namespace PIPELINE */ -#endif /* #ifndef PIPELINE_PROCESS_INTERFACE_IMPL_H */ +#endif /* #ifndef PIPELINE_PIPELINE_PROCESS_IMPL_H */ /* end of file */ diff --git a/code/nel/tools/pipeline/service/pipeline_service.h b/code/nel/tools/pipeline/service/pipeline_service.h index 85dadc5f8..dd5d638e6 100644 --- a/code/nel/tools/pipeline/service/pipeline_service.h +++ b/code/nel/tools/pipeline/service/pipeline_service.h @@ -57,8 +57,10 @@ namespace PIPELINE { extern std::string g_DatabaseDirectory; extern std::string g_PipelineDirectory; -#define PIPELINE_MACRO_DATABASE_DIRECTORY "{{DatabaseDirectory}}" -#define PIPELINE_MACRO_PIPELINE_DIRECTORY "{{PipelineDirectory}}" +#define PIPELINE_MACRO_DATABASE_DIRECTORY "[$DatabaseDirectory]" +#define PIPELINE_MACRO_PIPELINE_DIRECTORY "[$PipelineDirectory]" + +#define PIPELINE_DIRECTORY_TEMP_SUFFIX ".temp" /// Unmacros a path, and standardizes it as well. std::string unMacroPath(const std::string &path); diff --git a/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_plugin_process.dfn b/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_plugin_process.dfn index ad5e9a45b..ff766ec0c 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_plugin_process.dfn +++ b/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_plugin_process.dfn @@ -4,7 +4,10 @@ + + Sat Feb 18 13:34:33 2012 (Kaetemi) Dfn Structure = Sat Feb 18 13:34:44 2012 (Kaetemi) Dfn Structure = -Sat Feb 18 13:44:42 2012 (Kaetemi) Dfn Structure = +Sat Feb 18 13:44:42 2012 (Kaetemi) Dfn Structure = +Sat Mar 03 11:06:35 2012 (Kaetemi) Dfn Structure = diff --git a/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_max.pipeline_plugin b/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_max.pipeline_plugin index 101f64ebf..c95a9ee33 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_max.pipeline_plugin +++ b/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_max.pipeline_plugin @@ -6,6 +6,7 @@ + @@ -16,5 +17,6 @@ Sat Mar 03 10:55:24 2012 (Kaetemi) .ProcessHandlers[0].Handler = CProcessMaxShape Sat Mar 03 10:55:24 2012 (Kaetemi) .ProcessHandlers[0].HandlerType = RegisteredClass Sat Mar 03 10:55:24 2012 (Kaetemi) .ProcessHandlers[0].Process = ExportShape -Sat Mar 03 10:55:24 2012 (Kaetemi) formName Resized = 1 +Sat Mar 03 10:55:24 2012 (Kaetemi) formName Resized = 1 +Sat Mar 03 11:07:09 2012 (Kaetemi) .ProcessHandlers[0].Info = CProcessMaxShapeInfo diff --git a/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_nel.pipeline_plugin b/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_nel.pipeline_plugin index 1179dda6f..06af7fe80 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_nel.pipeline_plugin +++ b/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_nel.pipeline_plugin @@ -6,6 +6,7 @@ + @@ -18,5 +19,6 @@ Sat Mar 03 10:55:24 2012 (Kaetemi) .ProcessHandlers[0].HandlerType = RegisteredC Sat Mar 03 10:55:24 2012 (Kaetemi) .ProcessHandlers[0].Process = ExportShape Sat Mar 03 10:55:24 2012 (Kaetemi) formName Resized = 1 Sat Mar 03 10:56:08 2012 (Kaetemi) .ProcessHandlers[0].Handler = CProcessInterface -Sat Mar 03 10:56:08 2012 (Kaetemi) .ProcessHandlers[0].Process = Interface +Sat Mar 03 10:56:08 2012 (Kaetemi) .ProcessHandlers[0].Process = Interface +Sat Mar 03 11:13:55 2012 (Kaetemi) .ProcessHandlers[0].Info = CProcessInterfaceInfo