ufe  1.0
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
runTimeMgr.h
Go to the documentation of this file.
1 #line 1 "E:/jenkins/workspace/ufe-full-windows/ufe/include/runTimeMgr.h"
2 #ifndef _runTimeMgr
3 #define _runTimeMgr
4 // ===========================================================================
5 // Copyright 2018 Autodesk, Inc. All rights reserved.
6 //
7 // Use of this software is subject to the terms of the Autodesk license
8 // agreement provided at the time of installation or download, or which
9 // otherwise accompanies this software in either electronic or hard copy form.
10 // ===========================================================================
11 
12 #include "hierarchyHandler.h"
13 #include "transform3dHandler.h"
14 #include "sceneItemOpsHandler.h"
15 #include "rtid.h"
16 
17 // Can't forward declare std::list or std::string.
18 #include <list>
19 #include <string>
20 
21 UFE_NS_DEF {
22 
24 
33 {
34 public:
35 
37  static RunTimeMgr& instance();
38 
40  RunTimeMgr(const RunTimeMgr&) = delete;
42  RunTimeMgr& operator=(const RunTimeMgr&) = delete;
43 
54  Rtid register_(
55  const std::string& rtName,
56  const HierarchyHandler::Ptr& hierarchyHandler,
57  const Transform3dHandler::Ptr& transform3dHandler,
58  const SceneItemOpsHandler::Ptr& sceneItemOpsHandler
59  );
65  bool unregister(const Rtid& rtId);
66 
69  std::string getName(const Rtid& rtId) const;
70 
73  Rtid getId(const std::string& rtName) const;
74 
80  void setHierarchyHandler(
81  const Rtid& rtId, const HierarchyHandler::Ptr& hierarchyHandler
82  );
83 
89  void setTransform3dHandler(
90  const Rtid& rtId, const Transform3dHandler::Ptr& transform3dHandler
91  );
92 
98  void setSceneItemOpsHandler(
99  const Rtid& rtId, const SceneItemOpsHandler::Ptr& sceneItemOpsHandler
100  );
101 
108  HierarchyHandler::Ptr hierarchyHandler(const Rtid& rtId) const;
109 
116  const HierarchyHandler& hierarchyHandlerRef(const Rtid& rtId) const;
117 
124  Transform3dHandler::Ptr transform3dHandler(const Rtid& rtId) const;
125 
132  SceneItemOpsHandler::Ptr sceneItemOpsHandler(const Rtid& rtId) const;
133 
135  std::list<Rtid> getIds() const;
136 
137 private:
138 
140  RunTimeMgr();
141 };
142 
143 }
144 
145 #endif /* _runTimeMgr */
Factory base class for scene hierarchy interface.
std::shared_ptr< Transform3dHandler > Ptr
uint32_t Rtid
Definition: rtid.h:26
std::shared_ptr< SceneItemOpsHandler > Ptr
#define UFE_NS_DEF
Definition: ufe.h:35
std::shared_ptr< HierarchyHandler > Ptr
#define UFE_SDK_DECL
Definition: ufeExport.h:36
Singleton class to manage UFE run-times.
Definition: runTimeMgr.h:32