Added: #1440 Plugin descriptions

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 12 years ago
parent 847ca01fb6
commit c1279c1a6e

@ -42,6 +42,10 @@ using namespace std;
namespace PIPELINE { namespace PIPELINE {
namespace MAX { namespace MAX {
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
CDllDirectory::CDllDirectory() CDllDirectory::CDllDirectory()
{ {
@ -250,6 +254,13 @@ IStorageObject *CDllDirectory::createChunkById(uint16 id, bool container)
return CStorageContainer::createChunkById(id, container); return CStorageContainer::createChunkById(id, container);
} }
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// Entries[5]: (DllEntry) [2] PARSED {
// DllDescription: ...
// DllFilename: ... }
CDllEntry::CDllEntry() : m_DllDescription(NULL), m_DllFilename(NULL) CDllEntry::CDllEntry() : m_DllDescription(NULL), m_DllFilename(NULL)
{ {
@ -273,7 +284,7 @@ void CDllEntry::toString(std::ostream &ostream, const std::string &pad)
std::string padpad = pad + "\t"; std::string padpad = pad + "\t";
ostream << "\n" << pad << "DllDescription: " << m_DllDescription->Value.toUtf8(); ostream << "\n" << pad << "DllDescription: " << m_DllDescription->Value.toUtf8();
ostream << "\n" << pad << "DllFilename: " << m_DllFilename->Value.toUtf8(); ostream << "\n" << pad << "DllFilename: " << m_DllFilename->Value.toUtf8();
ostream << "} "; ostream << " } ";
} }
else else
{ {
@ -329,6 +340,10 @@ IStorageObject *CDllEntry::createChunkById(uint16 id, bool container)
return CStorageContainer::createChunkById(id, container); return CStorageContainer::createChunkById(id, container);
} }
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
} /* namespace MAX */ } /* namespace MAX */
} /* namespace PIPELINE */ } /* namespace PIPELINE */

@ -0,0 +1,71 @@
/**
* \file dll_plugin_desc.cpp
* \brief CDllPluginDesc
* \date 2012-08-20 09:59GMT
* \author Jan Boon (Kaetemi)
* CDllPluginDesc
*/
/*
* 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 Affero General Public
* License as published by the Free Software Foundation, either
* version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "dll_plugin_desc.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
// using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
namespace MAX {
const ucchar *CDllPluginDescBuiltin::displayName() const
{
static const ucstring value = ucstring("Builtin");
return value.c_str();
}
const ucchar *CDllPluginDescBuiltin::internalName() const
{
static const ucstring value = ucstring("Builtin");
return value.c_str();
}
const ucchar *CDllPluginDescScript::displayName() const
{
static const ucstring value = ucstring("Script");
return value.c_str();
}
const ucchar *CDllPluginDescScript::internalName() const
{
static const ucstring value = ucstring("Script");
return value.c_str();
}
} /* namespace MAX */
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,103 @@
/**
* \file dll_plugin_desc.h
* \brief CDllPluginDesc
* \date 2012-08-20 09:59GMT
* \author Jan Boon (Kaetemi)
* CDllPluginDesc
*/
/*
* 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 Affero General Public
* License as published by the Free Software Foundation, either
* version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_DLL_PLUGIN_DESC_H
#define PIPELINE_DLL_PLUGIN_DESC_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
#include <nel/misc/ucstring.h>
// Project includes
namespace PIPELINE {
namespace MAX {
/**
* \brief IDllPluginDescInternal
* \date 2012-08-20 09:59GMT
* \author Jan Boon (Kaetemi)
* Used for internal plugin descriptions that have no actual plugin
* associated with them.
*/
class IDllPluginDescInternal
{
public:
virtual const ucchar *displayName() const = 0;
virtual const ucchar *internalName() const = 0;
}; /* class IDllPluginDescInternal */
/**
* \brief IDllPluginDesc
* \date 2012-08-20 09:59GMT
* \author Jan Boon (Kaetemi)
* Inherit from this when making a plugin
*/
class IDllPluginDesc : public IDllPluginDescInternal
{
public:
// virtual const ucchar *displayName() const = 0;
// virtual const ucchar *internalName() const = 0;
// TODO: list scene classes
}; /* class IDllPluginDesc */
/**
* \brief CDllPluginDescBuiltin
* \date 2012-08-20 09:59GMT
* \author Jan Boon (Kaetemi)
* Use only internally for builtin classes
* TODO: Move to separate header?
*/
class CDllPluginDescBuiltin : public IDllPluginDescInternal
{
virtual const ucchar *displayName() const;
virtual const ucchar *internalName() const;
}; /* class CDllPluginDescBuiltin */
/**
* \brief CDllPluginDescScript
* \date 2012-08-20 09:59GMT
* \author Jan Boon (Kaetemi)
* Use only internally for scripts
* TODO: Move to separate header?
*/
class CDllPluginDescScript : public IDllPluginDescInternal
{
virtual const ucchar *displayName() const;
virtual const ucchar *internalName() const;
}; /* class CDllPluginDescScript */
} /* namespace MAX */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_DLL_PLUGIN_DESC_H */
/* end of file */

@ -118,23 +118,6 @@ public:
}; /* class CSceneClassDesc */ }; /* class CSceneClassDesc */
/**
* \brief CSceneClassRegistry
* \date 2012-08-19 19:25GMT
* \author Jan Boon (Kaetemi)
* CSceneClassRegistry
*/
class CSceneClassRegistry
{
public:
void add(const NLMISC::CClassId, const ISceneClassDesc *desc);
void remove(const NLMISC::CClassId);
CSceneClass *create(const NLMISC::CClassId classid) const;
void destroy(CSceneClass *sceneClass) const;
const ISceneClassDesc *describe(const NLMISC::CClassId classid) const;
}; /* class ISceneClassConstructor */
} /* namespace MAX */ } /* namespace MAX */
} /* namespace PIPELINE */ } /* namespace PIPELINE */

@ -0,0 +1,57 @@
/**
* \file scene_class_registry.cpp
* \brief CSceneClassRegistry
* \date 2012-08-20 09:57GMT
* \author Jan Boon (Kaetemi)
* CSceneClassRegistry
*/
/*
* 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 Affero General Public
* License as published by the Free Software Foundation, either
* version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "scene_class_registry.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
namespace MAX {
CSceneClassRegistry::CSceneClassRegistry()
{
}
CSceneClassRegistry::~CSceneClassRegistry()
{
}
} /* namespace MAX */
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,67 @@
/**
* \file scene_class_registry.h
* \brief CSceneClassRegistry
* \date 2012-08-20 09:57GMT
* \author Jan Boon (Kaetemi)
* CSceneClassRegistry
*/
/*
* 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 Affero General Public
* License as published by the Free Software Foundation, either
* version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_SCENE_CLASS_REGISTRY_H
#define PIPELINE_SCENE_CLASS_REGISTRY_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
// Project includes
#include "scene_class.h"
namespace PIPELINE {
namespace MAX {
/**
* \brief CSceneClassRegistry
* \date 2012-08-20 09:57GMT
* \author Jan Boon (Kaetemi)
* CSceneClassRegistry
*/
class CSceneClassRegistry
{
public:
CSceneClassRegistry();
virtual ~CSceneClassRegistry();
void add(const NLMISC::CClassId, const ISceneClassDesc *desc);
void remove(const NLMISC::CClassId);
CSceneClass *create(const NLMISC::CClassId classid) const;
void destroy(CSceneClass *sceneClass) const;
const ISceneClassDesc *describe(const NLMISC::CClassId classid) const;
}; /* class CSceneClassRegistry */
} /* namespace MAX */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_SCENE_CLASS_REGISTRY_H */
/* end of file */
Loading…
Cancel
Save