Changed: #1440 Separation of process handler and process info

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 13 years ago
parent d114c38eda
commit 31785b7ab8

@ -1,4 +1,5 @@
SUBDIRS(
plugin_library
plugin_nel
plugin_max
service)

@ -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 <nel/misc/types_nl.h>
#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<IProcessInterface *>(NLMISC::INelContext::getInstance().getSingletonPointer("IProcessInterface"));
return static_cast<IPipelineProcess *>(NLMISC::INelContext::getInstance().getSingletonPointer("IPipelineProcess"));
}
} /* namespace PIPELINE */

@ -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 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_PROCESS_INTERFACE_H
#define PIPELINE_PROCESS_INTERFACE_H
#ifndef PIPELINE_PIPELINE_PROCESS_H
#define PIPELINE_PIPELINE_PROCESS_H
#include <nel/misc/types_nl.h>
// 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 */

@ -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 <nel/misc/types_nl.h>
#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()
{
}

@ -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
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_PROCESS_HANDLER_H
#define PIPELINE_PROCESS_HANDLER_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
#include <nel/misc/class_registry.h>
// 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 */

@ -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
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "process_info.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
void sjdflkmsdjfmlkqsjlkfdj() { }
} /* namespace PIPELINE */
/* end of file */

@ -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
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_PROCESS_INFO_H
#define PIPELINE_PROCESS_INFO_H
#include <nel/misc/types_nl.h>
// STL includes
#include <vector>
#include <string>
// NeL includes
#include <nel/misc/class_registry.h>
// 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<std::string> &result) = 0;
/// Must return all directories on which the process handler depends.
virtual void getDependentDirectories(std::vector<std::string> &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<std::string> &result) = 0;
}; /* class IProcessInfo */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_PROCESS_INFO_H */
/* end of file */

@ -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
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_PROCESS_PLUGIN_H
#define PIPELINE_PROCESS_PLUGIN_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
#include <nel/misc/class_registry.h>
// 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 */

@ -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();
}

@ -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

@ -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)

@ -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
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#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 */

@ -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
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_PIPELINE_PLUGIN_NEL_H
#define PIPELINE_PIPELINE_PLUGIN_NEL_H
#include <nel/misc/types_nl.h>
// 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 */

@ -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 <nel/misc/types_nl.h>
#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()
{
}

@ -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
* <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
#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 */

@ -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
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "process_interface_info.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
CProcessInterfaceInfo::CProcessInterfaceInfo()
{
}
CProcessInterfaceInfo::~CProcessInterfaceInfo()
{
}
void CProcessInterfaceInfo::getDependentDirectoriesRecursive(std::vector<std::string> &result)
{
}
void CProcessInterfaceInfo::getDependentDirectories(std::vector<std::string> &result)
{
}
void CProcessInterfaceInfo::getDependentFiles(std::vector<std::string> &result)
{
}
} /* namespace PIPELINE */
/* end of file */

@ -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
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_PROCESS_INTERFACE_INFO_H
#define PIPELINE_PROCESS_INTERFACE_INFO_H
#include <nel/misc/types_nl.h>
// 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<std::string> &result);
virtual void getDependentDirectories(std::vector<std::string> &result);
virtual void getDependentFiles(std::vector<std::string> &result);
NLMISC_DECLARE_CLASS(CProcessInterfaceInfo)
}; /* class CProcessInterfaceInfo */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_PROCESS_INTERFACE_INFO_H */
/* end of file */

@ -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 */

@ -40,8 +40,6 @@
namespace PIPELINE {
#define PIPELINE_DIRECTORY_TEMP_SUFFIX ".temp"
/**
* \brief CPipelineInterfaceImpl
* \date 2012-02-25 12:21GMT

@ -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
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "pipeline_process_impl.h"
// STL includes
#include <sstream>
// NeL includes
#include <nel/misc/time_nl.h>
#include <nel/misc/app_context.h>
#include <nel/misc/debug.h>
// 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 */

@ -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 @@
* <http://www.gnu.org/licenses/>.
*/
#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 <nel/misc/types_nl.h>
// 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 */

@ -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);

@ -4,7 +4,10 @@
<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"/>
<ELEMENT Name="InfoType" Type="Type" Filename="pipeline_plugin_process_type.typ"/>
<ELEMENT Name="Info" 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>
Sat Feb 18 13:44:42 2012 (Kaetemi) Dfn Structure =
Sat Mar 03 11:06:35 2012 (Kaetemi) Dfn Structure = </LOG>
</DFN>

@ -6,6 +6,7 @@
<ATOM Name="Process" Value="ExportShape"/>
<ATOM Name="HandlerType" Value="RegisteredClass"/>
<ATOM Name="Handler" Value="CProcessMaxShape"/>
<ATOM Name="Info" Value="CProcessMaxShapeInfo"/>
</STRUCT>
</ARRAY>
</STRUCT>
@ -16,5 +17,6 @@
<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>
Sat Mar 03 10:55:24 2012 (Kaetemi) formName Resized = 1
Sat Mar 03 11:07:09 2012 (Kaetemi) .ProcessHandlers[0].Info = CProcessMaxShapeInfo</LOG>
</FORM>

@ -6,6 +6,7 @@
<ATOM Name="Process" Value="Interface"/>
<ATOM Name="HandlerType" Value="RegisteredClass"/>
<ATOM Name="Handler" Value="CProcessInterface"/>
<ATOM Name="Info" Value="CProcessInterfaceInfo"/>
</STRUCT>
</ARRAY>
</STRUCT>
@ -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</LOG>
Sat Mar 03 10:56:08 2012 (Kaetemi) .ProcessHandlers[0].Process = Interface
Sat Mar 03 11:13:55 2012 (Kaetemi) .ProcessHandlers[0].Info = CProcessInterfaceInfo</LOG>
</FORM>

Loading…
Cancel
Save