Added aqua_speed for rite geo 50 tryker
[ryzomcore.git] / nel / tools / 3d / pipeline_max / scene_class_registry.h
blobaf954c5338103ce3a9f7ba84bb0237d23a8f8536
1 /**
2 * \file scene_class_registry.h
3 * \brief CSceneClassRegistry
4 * \date 2012-08-20 09:57GMT
5 * \author Jan Boon (Kaetemi)
6 * CSceneClassRegistry
7 */
9 /*
10 * Copyright (C) 2012 by authors
12 * This file is part of RYZOM CORE PIPELINE.
13 * RYZOM CORE PIPELINE is free software: you can redistribute it
14 * and/or modify it under the terms of the GNU Affero General Public
15 * License as published by the Free Software Foundation, either
16 * version 3 of the License, or (at your option) any later version.
18 * RYZOM CORE PIPELINE is distributed in the hope that it will be
19 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
20 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Affero General Public License for more details.
23 * You should have received a copy of the GNU Affero General Public
24 * License along with RYZOM CORE PIPELINE. If not, see
25 * <http://www.gnu.org/licenses/>.
28 #ifndef PIPELINE_SCENE_CLASS_REGISTRY_H
29 #define PIPELINE_SCENE_CLASS_REGISTRY_H
30 #include <nel/misc/types_nl.h>
32 // STL includes
34 // NeL includes
36 // Project includes
37 #include "scene_class.h"
38 #include "super_class_desc.h"
40 namespace PIPELINE {
41 namespace MAX {
43 /**
44 * \brief CSceneClassRegistry
45 * \date 2012-08-20 09:57GMT
46 * \author Jan Boon (Kaetemi)
47 * CSceneClassRegistry
49 class CSceneClassRegistry
51 public:
52 CSceneClassRegistry();
53 virtual ~CSceneClassRegistry();
55 /// Add a class to the registry
56 void add(const ISceneClassDesc *desc);
57 /// Remove a class from the registry
58 void remove(TSClassId superClassId, const NLMISC::CClassId classId);
60 /// Add a superclass to the registry
61 void add(const ISuperClassDesc *desc);
62 /// Remove a superclass from the registry
63 void remove(const TSClassId superClassId);
65 /// Create a class by class id
66 CSceneClass *create(CScene *scene, TSClassId superClassId, const NLMISC::CClassId classId) const;
68 /// Create an unknown class by superclass id
69 CSceneClass *createUnknown(CScene *scene, TSClassId superClassId, const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const;
71 /// Destroy a class by pointer
72 void destroy(CSceneClass *sceneClass) const;
74 /// Return the description of a class by class id
75 const ISceneClassDesc *describe(TSClassId superClassId, const NLMISC::CClassId classId) const;
77 private:
78 struct TKey
80 TKey(TSClassId superClassId, NLMISC::CClassId classId);
81 TSClassId SuperClassId;
82 NLMISC::CClassId ClassId;
83 bool operator<(const TKey &right) const;
84 bool operator>(const TKey &right) const;
85 bool operator==(const TKey &right) const;
88 std::map<TKey, const ISceneClassDesc *> m_ClassDescriptions;
89 std::map<TSClassId, const ISuperClassDesc *> m_SuperClassDescriptions;
91 }; /* class CSceneClassRegistry */
93 } /* namespace MAX */
94 } /* namespace PIPELINE */
96 #endif /* #ifndef PIPELINE_SCENE_CLASS_REGISTRY_H */
98 /* end of file */