Added: #1440 First registration to the class registry
--HG-- branch : build_pipeline_v3hg/feature/build_pipeline_v3
parent
e9a179b203
commit
3184ce4edc
@ -0,0 +1,49 @@
|
||||
/**
|
||||
* \file super_class_desc.cpp
|
||||
* \brief CSuperClassDesc
|
||||
* \date 2012-08-22 11:19GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CSuperClassDesc
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 "super_class_desc.h"
|
||||
|
||||
// STL includes
|
||||
|
||||
// NeL includes
|
||||
// #include <nel/misc/debug.h>
|
||||
|
||||
// Project includes
|
||||
|
||||
// using namespace std;
|
||||
// using namespace NLMISC;
|
||||
|
||||
namespace PIPELINE {
|
||||
namespace MAX {
|
||||
|
||||
void nyannyannyan() { }
|
||||
|
||||
} /* namespace MAX */
|
||||
} /* namespace PIPELINE */
|
||||
|
||||
/* end of file */
|
@ -0,0 +1,83 @@
|
||||
/**
|
||||
* \file super_class_desc.h
|
||||
* \brief CSuperClassDesc
|
||||
* \date 2012-08-22 11:19GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CSuperClassDesc
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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_SUPER_CLASS_DESC_H
|
||||
#define PIPELINE_SUPER_CLASS_DESC_H
|
||||
#include <nel/misc/types_nl.h>
|
||||
|
||||
// STL includes
|
||||
|
||||
// NeL includes
|
||||
|
||||
// Project includes
|
||||
#include "scene_class_unknown.h"
|
||||
|
||||
namespace PIPELINE {
|
||||
namespace MAX {
|
||||
|
||||
/**
|
||||
* \brief ISuperClassDesc
|
||||
* \date 2012-08-22 09:42GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* ISuperClassDesc
|
||||
*/
|
||||
class ISuperClassDesc
|
||||
{
|
||||
public:
|
||||
/// Create an unknown class that inherits from this superclass
|
||||
virtual CSceneClass *createUnknown(const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const = 0;
|
||||
/// Get an internal name associated with unknown classes of this superclass
|
||||
virtual const char *internalNameUnknown() const = 0;
|
||||
/// Return the class description that directly implements this superclass
|
||||
virtual const ISceneClassDesc *classDesc() const = 0;
|
||||
|
||||
}; /* class ISceneClassDesc */
|
||||
|
||||
/**
|
||||
* \brief CSuperClassDesc
|
||||
* \date 2012-08-22 09:42GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* ISuperClassDesc
|
||||
*/
|
||||
template <typename T>
|
||||
class CSuperClassDesc : public ISuperClassDesc
|
||||
{
|
||||
public:
|
||||
CSuperClassDesc(const ISceneClassDesc *classDesc) : m_ClassDesc(classDesc) { }
|
||||
virtual CSceneClass *createUnknown(const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const { return static_cast<CSceneClass *>(new CSceneClassUnknown<T>(classId, m_ClassDesc->superClassId(), displayName,internalNameUnknown(), dllFilename, dllDescription)); }
|
||||
virtual const char *internalNameUnknown() const { return T::InternalNameUnknown; }
|
||||
virtual const ISceneClassDesc *classDesc() const { return m_ClassDesc; }
|
||||
private:
|
||||
const ISceneClassDesc *m_ClassDesc;
|
||||
}; /* class ISceneClassDesc */
|
||||
|
||||
} /* namespace MAX */
|
||||
} /* namespace PIPELINE */
|
||||
|
||||
#endif /* #ifndef PIPELINE_SUPER_CLASS_DESC_H */
|
||||
|
||||
/* end of file */
|
Loading…
Reference in New Issue