Added: #1440 Make pipeline plugin configuration part of workspace to allow different plugins being installed on different machines

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 13 years ago
parent 7eacbe6706
commit d114c38eda

@ -41,8 +41,6 @@ using namespace std;
namespace PIPELINE { namespace PIPELINE {
void fksjdlfkjdskfljdsklfjdslkfjdsf() { }
IPipelineInterface *IPipelineInterface::getInstance() IPipelineInterface *IPipelineInterface::getInstance()
{ {
nlassert(NLMISC::INelContext::isContextInitialised()); nlassert(NLMISC::INelContext::isContextInitialised());

@ -72,14 +72,6 @@ public:
/// Call when a runnable task has ended to reset to STATE_IDLE. /// Call when a runnable task has ended to reset to STATE_IDLE.
virtual void endedRunnableTask() = 0; virtual void endedRunnableTask() = 0;
// ***************** PROCESS FUNCTIONS *****************
/// Get a parsed georges sheets value from the current project. (example: OutputDirectory)
virtual std::string getProjectValue(const std::string &name) = 0;
/// 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 IPipelineInterface */ }; /* class IPipelineInterface */
#define PIPELINE_REGISTER_CLASS(_class_) PIPELINE::IPipelineInterface::getInstance()->registerClass(#_class_, _class_::creator, typeid(_class_).name()); #define PIPELINE_REGISTER_CLASS(_class_) PIPELINE::IPipelineInterface::getInstance()->registerClass(#_class_, _class_::creator, typeid(_class_).name());

@ -0,0 +1,52 @@
/**
* \file process_interface.cpp
* \brief IProcessInterface
* \date 2012-03-03 09:22GMT
* \author Jan Boon (Kaetemi)
* IProcessInterface
*/
/*
* 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
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "process_interface.h"
// STL includes
// NeL includes
#include <nel/misc/app_context.h>
#include <nel/misc/debug.h>
// Project includes
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
IProcessInterface *IProcessInterface::getInstance()
{
nlassert(NLMISC::INelContext::isContextInitialised());
return static_cast<IProcessInterface *>(NLMISC::INelContext::getInstance().getSingletonPointer("IProcessInterface"));
}
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,67 @@
/**
* \file process_interface.h
* \brief IProcessInterface
* \date 2012-03-03 09:22GMT
* \author Jan Boon (Kaetemi)
* IProcessInterface
*/
/*
* 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
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_PROCESS_INTERFACE_H
#define PIPELINE_PROCESS_INTERFACE_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
// Project includes
namespace PIPELINE {
/**
* \brief IProcessInterface
* \date 2012-03-03 09:22GMT
* \author Jan Boon (Kaetemi)
* IProcessInterface
*/
class IProcessInterface
{
public:
IProcessInterface();
virtual ~IProcessInterface();
static IProcessInterface *getInstance();
// ***************** PROCESS FUNCTIONS (EASILY EXPOSABLE TO SCRIPTS ETCETERA) *****************
/// Get a parsed georges sheets value from the current project. (example: Interface.DstDirectory)
virtual std::string getProjectValue(const std::string &name) = 0;
/// 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 */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_PROCESS_INTERFACE_H */
/* end of file */

@ -52,12 +52,7 @@ class CPipelineInterfaceImpl : public IPipelineInterface
{ {
public: public:
std::vector<std::string> RegisteredClasses; std::vector<std::string> RegisteredClasses;
protected:
// pointers
// ...
// instances
// ...
public: public:
CPipelineInterfaceImpl(); CPipelineInterfaceImpl();
virtual ~CPipelineInterfaceImpl(); virtual ~CPipelineInterfaceImpl();
@ -66,8 +61,6 @@ public:
virtual void registerClass(const std::string &className, NLMISC::IClassable* (*creator)(), const std::string &typeidCheck) throw(NLMISC::ERegistry); virtual void registerClass(const std::string &className, NLMISC::IClassable* (*creator)(), const std::string &typeidCheck) throw(NLMISC::ERegistry);
virtual bool tryRunnableTask(std::string stateName, NLMISC::IRunnable *task); virtual bool tryRunnableTask(std::string stateName, NLMISC::IRunnable *task);
virtual void endedRunnableTask(); virtual void endedRunnableTask();
virtual std::string getProjectValue(const std::string &name);
virtual std::string getTempDir();
}; /* class CPipelineInterfaceImpl */ }; /* class CPipelineInterfaceImpl */
} /* namespace PIPELINE */ } /* namespace PIPELINE */

@ -84,11 +84,7 @@ std::string macroPath(const std::string &path)
namespace { namespace {
#define PIPELINE_LONG_SERVICE_NAME "pipeline_service" #define PIPELINE_LONG_SERVICE_NAME "pipeline_service"
#ifdef PIPELINE_MASTER #define PIPELINE_SHORT_SERVICE_NAME "PLS"
#define PIPELINE_SHORT_SERVICE_NAME "PLSM"
#else
#define PIPELINE_SHORT_SERVICE_NAME "PLSS"
#endif
#ifdef NL_DEBUG #ifdef NL_DEBUG
#define PIPELINE_SERVICE_DIRECTORY "R:\\build\\dev\\bin\\Release" #define PIPELINE_SERVICE_DIRECTORY "R:\\build\\dev\\bin\\Release"

@ -0,0 +1,55 @@
/**
* \file process_interface_impl.cpp
* \brief CProcessInterfaceImpl
* \date 2012-03-03 09:33GMT
* \author Jan Boon (Kaetemi)
* CProcessInterfaceImpl
*/
/*
* 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
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "process_interface_impl.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
CProcessInterfaceImpl::CProcessInterfaceImpl()
{
}
CProcessInterfaceImpl::~CProcessInterfaceImpl()
{
}
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,61 @@
/**
* \file process_interface_impl.h
* \brief CProcessInterfaceImpl
* \date 2012-03-03 09:33GMT
* \author Jan Boon (Kaetemi)
* CProcessInterfaceImpl
*/
/*
* 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
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_PROCESS_INTERFACE_IMPL_H
#define PIPELINE_PROCESS_INTERFACE_IMPL_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
// Project includes
#include "../plugin_library/process_interface.h"
namespace PIPELINE {
/**
* \brief CProcessInterfaceImpl
* \date 2012-03-03 09:33GMT
* \author Jan Boon (Kaetemi)
* CProcessInterfaceImpl
*/
class CProcessInterfaceImpl : public IProcessInterface
{
public:
CProcessInterfaceImpl();
virtual ~CProcessInterfaceImpl();
virtual std::string getProjectValue(const std::string &name);
virtual std::string getTempDir();
}; /* class CProcessInterfaceImpl */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_PROCESS_INTERFACE_IMPL_H */
/* end of file */

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<DFN Revision="$Revision$" State="modified">
<ELEMENT Name="Description" Type="Type" Filename="string.typ"/>
<ELEMENT Name="ProcessHandlers" Type="Dfn" Filename="pipeline_plugin_process.dfn" Array="true"/>
<LOG>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 = </LOG>
</DFN>

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<DFN Revision="$Revision$" State="modified">
<ELEMENT Name="Description" Type="Type" Filename="string.typ"/>
<ELEMENT Name="Process" Type="Type" Filename="string.typ"/>
<ELEMENT Name="HandlerType" Type="Type" Filename="pipeline_plugin_process_type.typ"/>
<ELEMENT Name="Handler" Type="Type" Filename="string.typ"/>
<LOG>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 = </LOG>
</DFN>

@ -0,0 +1,7 @@
<?xml version="1.0"?>
<TYPE Type="UnsignedInt" UI="NonEditableCombo" Default="RegisteredClass" Version="0.0" State="modified">
<DEFINITION Label="RegisteredClass" Value="0"/>
<DEFINITION Label="LuaScript" Value="1"/>
<COMMENTS></COMMENTS>
<LOG></LOG>
</TYPE>

@ -1,8 +1,10 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<DFN Revision="$Revision$" State="modified"> <DFN Revision="$Revision$" State="modified">
<ELEMENT Name="Description" Type="Type" Filename="string.typ"/> <ELEMENT Name="Description" Type="Type" Filename="string.typ"/>
<ELEMENT Name="Projects" Type="Type" Filename="filename.typ" Array="true"/> <ELEMENT Name="Projects" Type="Type" Filename="filename.typ" FilenameExt="*.pipeline_project" Array="true"/>
<ELEMENT Name="Plugins" Type="Type" Filename="filename.typ" FilenameExt="*.pipeline_plugin" Array="true"/>
<LOG>Sat Feb 18 13:34:33 2012 (Kaetemi) Dfn Structure = <LOG>Sat Feb 18 13:34:33 2012 (Kaetemi) Dfn Structure =
Sat Feb 18 13:34:44 2012 (Kaetemi) Dfn Structure = Sat Feb 18 13:34:44 2012 (Kaetemi) Dfn Structure =
Sat Feb 18 13:44:42 2012 (Kaetemi) Dfn Structure = </LOG> Sat Feb 18 13:44:42 2012 (Kaetemi) Dfn Structure =
Sat Mar 03 10:57:33 2012 (Kaetemi) Dfn Structure = </LOG>
</DFN> </DFN>

@ -0,0 +1,20 @@
<?xml version="1.0"?>
<FORM Revision="$Revision$" State="modified">
<STRUCT>
<ARRAY Name="ProcessHandlers">
<STRUCT>
<ATOM Name="Process" Value="ExportShape"/>
<ATOM Name="HandlerType" Value="RegisteredClass"/>
<ATOM Name="Handler" Value="CProcessMaxShape"/>
</STRUCT>
</ARRAY>
</STRUCT>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<LOG>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</LOG>
</FORM>

@ -0,0 +1,22 @@
<?xml version="1.0"?>
<FORM Revision="$Revision$" State="modified">
<STRUCT>
<ARRAY Name="ProcessHandlers">
<STRUCT>
<ATOM Name="Process" Value="Interface"/>
<ATOM Name="HandlerType" Value="RegisteredClass"/>
<ATOM Name="Handler" Value="CProcessInterface"/>
</STRUCT>
</ARRAY>
</STRUCT>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<LOG>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:56:08 2012 (Kaetemi) .ProcessHandlers[0].Handler = CProcessInterface
Sat Mar 03 10:56:08 2012 (Kaetemi) .ProcessHandlers[0].Process = Interface</LOG>
</FORM>

@ -5,6 +5,10 @@
<ARRAY Name="Projects"> <ARRAY Name="Projects">
<ATOM Value="common_interface.pipeline_project"/> <ATOM Value="common_interface.pipeline_project"/>
</ARRAY> </ARRAY>
<ARRAY Name="Plugins">
<ATOM Value="plugin_nel.pipeline_plugin"/>
<ATOM Value="plugin_max.pipeline_plugin"/>
</ARRAY>
</STRUCT> </STRUCT>
<STRUCT/> <STRUCT/>
<STRUCT/> <STRUCT/>
@ -15,5 +19,8 @@ Sat Feb 18 13:48:48 2012 (Kaetemi) formName Resized = 1
Sat Feb 18 14:44:25 2012 (Kaetemi) .Description = Ryzom Core Sat Feb 18 14:44:25 2012 (Kaetemi) .Description = Ryzom Core
Sat Feb 18 14:44:37 2012 (Kaetemi) .Projects[0] = common_interface.pipeline_project Sat Feb 18 14:44:37 2012 (Kaetemi) .Projects[0] = common_interface.pipeline_project
Sat Feb 18 23:23:17 2012 (Kaetemi) .Description = Ryzom Core Test Sat Feb 18 23:23:17 2012 (Kaetemi) .Description = Ryzom Core Test
Sat Feb 18 23:23:26 2012 (Kaetemi) .Description = Ryzom Core</LOG> Sat Feb 18 23:23:26 2012 (Kaetemi) .Description = Ryzom Core
Sat Mar 03 10:58:02 2012 (Kaetemi) .Plugins[0] = plugin_nel.pipeline_plugin
Sat Mar 03 10:58:02 2012 (Kaetemi) .Plugins[1] = plugin_max.pipeline_plugin
Sat Mar 03 10:58:02 2012 (Kaetemi) formName Resized = 2</LOG>
</FORM> </FORM>

Loading…
Cancel
Save