ufe 5.5
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 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.11-windows/ufe/include/runTimeMgr.h"
2#ifndef _runTimeMgr
3#define _runTimeMgr
4// ===========================================================================
5// Copyright 2022 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 "attributesHandler.h"
13#include "connectionHandler.h"
14#include "contextOpsHandler.h"
15#include "hierarchyHandler.h"
16#include "object3dHandler.h"
17#include "materialHandler.h"
18#include "sceneItemOpsHandler.h"
19#include "sceneSegmentHandler.h"
20#include "transform3dHandler.h"
21#include "uiInfoHandler.h"
22#include "cameraHandler.h"
23#include "lightHandler.h"
24#include "pathMappingHandler.h"
25#include "nodeDefHandler.h"
27#include "batchOpsHandler.h"
28#include "clipboardHandler.h"
29#include "handlerInterface.h"
30#include "rtid.h"
31
32// Can't forward declare std::list or std::string.
33#include <list>
34#include <string>
35
37
39
48{
49public:
50
53
55 RunTimeMgr(const RunTimeMgr&) = delete;
57 RunTimeMgr& operator=(const RunTimeMgr&) = delete;
58
59
98 };
99
109 const std::string& rtName,
110 const Handlers& handlers
111 );
117 bool unregister(const Rtid& rtId);
118
121 std::string getName(const Rtid& rtId) const;
122
125 Rtid getId(const std::string& rtName) const;
126
128 bool hasId(const Rtid& rtId) const;
129
136 const Rtid& rtId, const HierarchyHandler::Ptr& hierarchyHandler
137 );
138
145 const Rtid& rtId, const Transform3dHandler::Ptr& transform3dHandler
146 );
147
154 const Rtid& rtId, const SceneItemOpsHandler::Ptr& sceneItemOpsHandler
155 );
156
163 const Rtid& rtId, const AttributesHandler::Ptr& attributesHandler
164 );
165
172 const Rtid& rtId, const ConnectionHandler::Ptr& connectionHandler
173 );
174
181 const Rtid& rtId, const UINodeGraphNodeHandler::Ptr& uiNodeGraphNodeHandler
182 );
183
190 const Rtid& rtId, const Object3dHandler::Ptr& object3dHandler
191 );
192
199 const Rtid& rtId, const MaterialHandler::Ptr& materialHandler
200 );
201
208 const Rtid& rtId, const ContextOpsHandler::Ptr& contextOpsHandler
209 );
210
217 const Rtid& rtId, const UIInfoHandler::Ptr& uiInfoHandler
218 );
219
226 const Rtid& rtId, const CameraHandler::Ptr& cameraHandler
227 );
228
235 const Rtid &rtId, const LightHandler::Ptr &lightHandler);
236
243 const Rtid& rtId, const PathMappingHandler::Ptr& pathMappingHandler
244 );
245
252 const Rtid& rtId, const NodeDefHandler::Ptr& nodeDefHandler
253 );
254
261 const Rtid& rtId, const SceneSegmentHandler::Ptr& sceneSegmentHandler
262 );
263
270 const Rtid& rtId, const BatchOpsHandler::Ptr& batchOpsHandler
271 );
272
279 const Rtid& rtId, const ClipboardHandler::Ptr& clipboardHandler
280 );
281
289
296 const HierarchyHandler& hierarchyHandlerRef(const Rtid& rtId) const;
297
305
313
321
329
337
345
353
361
369
377
385
393
402
411
419
427
429 std::list<Rtid> getIds() const;
430
437 void registerHandler(const Ufe::Rtid& rtId,
438 const std::string& handlerId,
439 const HandlerInterface::Ptr& handler);
440
446 void unregisterHandler(const Ufe::Rtid& rtId, const std::string& handlerId);
447
454 template <typename T> std::shared_ptr<T> handler(const Ufe::Rtid& rtId)
455 {
456 static_assert(std::is_base_of<HandlerInterface, T>::value, "Only Ufe::HandlerInterface types are allowed");
457 return std::static_pointer_cast<T>(resolveHandler(rtId, T::id));
458 }
459
460private:
461
464
466
467};
468
469}
470
471#endif /* _runTimeMgr */
std::shared_ptr< AttributesHandler > Ptr
std::shared_ptr< BatchOpsHandler > Ptr
std::shared_ptr< CameraHandler > Ptr
Definition: cameraHandler.h:30
std::shared_ptr< ClipboardHandler > Ptr
std::shared_ptr< ConnectionHandler > Ptr
std::shared_ptr< ContextOpsHandler > Ptr
std::shared_ptr< HandlerInterface > Ptr
Factory base class for scene hierarchy interface.
std::shared_ptr< HierarchyHandler > Ptr
std::shared_ptr< LightHandler > Ptr
Definition: lightHandler.h:29
std::shared_ptr< MaterialHandler > Ptr
std::shared_ptr< NodeDefHandler > Ptr
std::shared_ptr< Object3dHandler > Ptr
std::shared_ptr< PathMappingHandler > Ptr
Singleton class to manage UFE runtimes.
Definition: runTimeMgr.h:48
std::list< Rtid > getIds() const
SceneItemOpsHandler::Ptr sceneItemOpsHandler(const Rtid &rtId) const
void registerHandler(const Ufe::Rtid &rtId, const std::string &handlerId, const HandlerInterface::Ptr &handler)
AttributesHandler::Ptr attributesHandler(const Rtid &rtId) const
void setContextOpsHandler(const Rtid &rtId, const ContextOpsHandler::Ptr &contextOpsHandler)
RunTimeMgr(const RunTimeMgr &)=delete
Cannot copy the runtime manager singleton.
void setPathMappingHandler(const Rtid &rtId, const PathMappingHandler::Ptr &pathMappingHandler)
void setBatchOpsHandler(const Rtid &rtId, const BatchOpsHandler::Ptr &batchOpsHandler)
UINodeGraphNodeHandler::Ptr uiNodeGraphNodeHandler(const Rtid &rtId) const
void setAttributesHandler(const Rtid &rtId, const AttributesHandler::Ptr &attributesHandler)
void setObject3dHandler(const Rtid &rtId, const Object3dHandler::Ptr &object3dHandler)
UIInfoHandler::Ptr uiInfoHandler(const Rtid &rtId) const
BatchOpsHandler::Ptr batchOpsHandler(const Rtid &rtId) const
Object3dHandler::Ptr object3dHandler(const Rtid &rtId) const
PathMappingHandler::Ptr pathMappingHandler(const Rtid &rtId) const
Transform3dHandler::Ptr transform3dHandler(const Rtid &rtId) const
std::shared_ptr< T > handler(const Ufe::Rtid &rtId)
Definition: runTimeMgr.h:454
const HierarchyHandler & hierarchyHandlerRef(const Rtid &rtId) const
void setCameraHandler(const Rtid &rtId, const CameraHandler::Ptr &cameraHandler)
CameraHandler::Ptr cameraHandler(const Rtid &rtId) const
bool unregister(const Rtid &rtId)
void unregisterHandler(const Ufe::Rtid &rtId, const std::string &handlerId)
bool hasId(const Rtid &rtId) const
void setConnectionHandler(const Rtid &rtId, const ConnectionHandler::Ptr &connectionHandler)
RunTimeMgr()
Cannot create a runtime manager aside from the singleton instance.
void setLightHandler(const Rtid &rtId, const LightHandler::Ptr &lightHandler)
void setSceneSegmentHandler(const Rtid &rtId, const SceneSegmentHandler::Ptr &sceneSegmentHandler)
NodeDefHandler::Ptr nodeDefHandler(const Rtid &rtId) const
static RunTimeMgr & instance()
MaterialHandler::Ptr materialHandler(const Rtid &rtId) const
void setTransform3dHandler(const Rtid &rtId, const Transform3dHandler::Ptr &transform3dHandler)
ConnectionHandler::Ptr connectionHandler(const Rtid &rtId) const
HierarchyHandler::Ptr hierarchyHandler(const Rtid &rtId) const
std::string getName(const Rtid &rtId) const
ContextOpsHandler::Ptr contextOpsHandler(const Rtid &rtId) const
void setUIInfoHandler(const Rtid &rtId, const UIInfoHandler::Ptr &uiInfoHandler)
void setSceneItemOpsHandler(const Rtid &rtId, const SceneItemOpsHandler::Ptr &sceneItemOpsHandler)
Rtid register_(const std::string &rtName, const Handlers &handlers)
void setHierarchyHandler(const Rtid &rtId, const HierarchyHandler::Ptr &hierarchyHandler)
LightHandler::Ptr lightHandler(const Rtid &rtId) const
Rtid getId(const std::string &rtName) const
ClipboardHandler::Ptr clipboardHandler(const Rtid &rtId) const
HandlerInterface::Ptr resolveHandler(const Ufe::Rtid &rtId, const std::string &handlerId)
SceneSegmentHandler::Ptr sceneSegmentHandler(const Rtid &rtId) const
RunTimeMgr & operator=(const RunTimeMgr &)=delete
Cannot assign the runtime manager singleton.
void setMaterialHandler(const Rtid &rtId, const MaterialHandler::Ptr &materialHandler)
void setUINodeGraphNodeHandler(const Rtid &rtId, const UINodeGraphNodeHandler::Ptr &uiNodeGraphNodeHandler)
void setNodeDefHandler(const Rtid &rtId, const NodeDefHandler::Ptr &nodeDefHandler)
void setClipboardHandler(const Rtid &rtId, const ClipboardHandler::Ptr &clipboardHandler)
std::shared_ptr< SceneItemOpsHandler > Ptr
std::shared_ptr< SceneSegmentHandler > Ptr
std::shared_ptr< Transform3dHandler > Ptr
std::shared_ptr< UIInfoHandler > Ptr
Definition: uiInfoHandler.h:72
std::shared_ptr< UINodeGraphNodeHandler > Ptr
std::string string(const Path &path)
uint32_t Rtid
Definition: rtid.h:26
Object3dHandler::Ptr object3dHandler
the Object3d interface factory.
Definition: runTimeMgr.h:75
PathMappingHandler::Ptr pathMappingHandler
the path mapping handler.
Definition: runTimeMgr.h:87
CameraHandler::Ptr cameraHandler
the camera handler.
Definition: runTimeMgr.h:83
ContextOpsHandler::Ptr contextOpsHandler
the ContextOps interface factory.
Definition: runTimeMgr.h:79
LightHandler::Ptr lightHandler
the light handler.
Definition: runTimeMgr.h:85
NodeDefHandler::Ptr nodeDefHandler
the node definition handler.
Definition: runTimeMgr.h:89
UINodeGraphNodeHandler::Ptr uiNodeGraphNodeHandler
the UINodeGraphNode interface factory.
Definition: runTimeMgr.h:95
MaterialHandler::Ptr materialHandler
the Material interface factory.
Definition: runTimeMgr.h:77
BatchOpsHandler::Ptr batchOpsHandler
the BatchOps handler.
Definition: runTimeMgr.h:97
AttributesHandler::Ptr attributesHandler
the Attributes interface factory.
Definition: runTimeMgr.h:73
HierarchyHandler::Ptr hierarchyHandler
the Hierarchy interface factory.
Definition: runTimeMgr.h:67
ConnectionHandler::Ptr connectionHandler
the Connections interface factory.
Definition: runTimeMgr.h:93
UIInfoHandler::Ptr uiInfoHandler
the UIInfo handler.
Definition: runTimeMgr.h:81
SceneItemOpsHandler::Ptr sceneItemOpsHandler
the SceneItemOps interface factory.
Definition: runTimeMgr.h:71
SceneSegmentHandler::Ptr sceneSegmentHandler
the scene segment handler
Definition: runTimeMgr.h:91
Transform3dHandler::Ptr transform3dHandler
the Transform3d interface factory.
Definition: runTimeMgr.h:69
#define UFE_NS_DEF
Definition: ufe.h:35
#define UFE_SDK_DECL
Definition: ufeExport.h:36