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
Ufe::RunTimeMgr Class Reference

Singleton class to manage UFE runtimes. More...

#include <runTimeMgr.h>

Classes

struct  Handlers
 

Public Member Functions

 RunTimeMgr (const RunTimeMgr &)=delete
 Cannot copy the runtime manager singleton. More...
 
RunTimeMgroperator= (const RunTimeMgr &)=delete
 Cannot assign the runtime manager singleton. More...
 
Rtid register_ (const std::string &rtName, const Handlers &handlers)
 
bool unregister (const Rtid &rtId)
 
std::string getName (const Rtid &rtId) const
 
Rtid getId (const std::string &rtName) const
 
bool hasId (const Rtid &rtId) const
 
void setHierarchyHandler (const Rtid &rtId, const HierarchyHandler::Ptr &hierarchyHandler)
 
void setTransform3dHandler (const Rtid &rtId, const Transform3dHandler::Ptr &transform3dHandler)
 
void setSceneItemOpsHandler (const Rtid &rtId, const SceneItemOpsHandler::Ptr &sceneItemOpsHandler)
 
void setAttributesHandler (const Rtid &rtId, const AttributesHandler::Ptr &attributesHandler)
 
void setConnectionHandler (const Rtid &rtId, const ConnectionHandler::Ptr &connectionHandler)
 
void setUINodeGraphNodeHandler (const Rtid &rtId, const UINodeGraphNodeHandler::Ptr &uiNodeGraphNodeHandler)
 
void setObject3dHandler (const Rtid &rtId, const Object3dHandler::Ptr &object3dHandler)
 
void setMaterialHandler (const Rtid &rtId, const MaterialHandler::Ptr &materialHandler)
 
void setContextOpsHandler (const Rtid &rtId, const ContextOpsHandler::Ptr &contextOpsHandler)
 
void setUIInfoHandler (const Rtid &rtId, const UIInfoHandler::Ptr &uiInfoHandler)
 
void setCameraHandler (const Rtid &rtId, const CameraHandler::Ptr &cameraHandler)
 
void setLightHandler (const Rtid &rtId, const LightHandler::Ptr &lightHandler)
 
void setPathMappingHandler (const Rtid &rtId, const PathMappingHandler::Ptr &pathMappingHandler)
 
void setNodeDefHandler (const Rtid &rtId, const NodeDefHandler::Ptr &nodeDefHandler)
 
void setSceneSegmentHandler (const Rtid &rtId, const SceneSegmentHandler::Ptr &sceneSegmentHandler)
 
void setBatchOpsHandler (const Rtid &rtId, const BatchOpsHandler::Ptr &batchOpsHandler)
 
void setClipboardHandler (const Rtid &rtId, const ClipboardHandler::Ptr &clipboardHandler)
 
HierarchyHandler::Ptr hierarchyHandler (const Rtid &rtId) const
 
const HierarchyHandlerhierarchyHandlerRef (const Rtid &rtId) const
 
Transform3dHandler::Ptr transform3dHandler (const Rtid &rtId) const
 
SceneItemOpsHandler::Ptr sceneItemOpsHandler (const Rtid &rtId) const
 
AttributesHandler::Ptr attributesHandler (const Rtid &rtId) const
 
ConnectionHandler::Ptr connectionHandler (const Rtid &rtId) const
 
UINodeGraphNodeHandler::Ptr uiNodeGraphNodeHandler (const Rtid &rtId) const
 
Object3dHandler::Ptr object3dHandler (const Rtid &rtId) const
 
MaterialHandler::Ptr materialHandler (const Rtid &rtId) const
 
ContextOpsHandler::Ptr contextOpsHandler (const Rtid &rtId) const
 
UIInfoHandler::Ptr uiInfoHandler (const Rtid &rtId) const
 
CameraHandler::Ptr cameraHandler (const Rtid &rtId) const
 
LightHandler::Ptr lightHandler (const Rtid &rtId) const
 
PathMappingHandler::Ptr pathMappingHandler (const Rtid &rtId) const
 
NodeDefHandler::Ptr nodeDefHandler (const Rtid &rtId) const
 
SceneSegmentHandler::Ptr sceneSegmentHandler (const Rtid &rtId) const
 
BatchOpsHandler::Ptr batchOpsHandler (const Rtid &rtId) const
 
ClipboardHandler::Ptr clipboardHandler (const Rtid &rtId) const
 
std::list< RtidgetIds () const
 
void registerHandler (const Ufe::Rtid &rtId, const std::string &handlerId, const HandlerInterface::Ptr &handler)
 
void unregisterHandler (const Ufe::Rtid &rtId, const std::string &handlerId)
 
template<typename T >
std::shared_ptr< T > handler (const Ufe::Rtid &rtId)
 

Static Public Member Functions

static RunTimeMgrinstance ()
 

Private Member Functions

 RunTimeMgr ()
 Cannot create a runtime manager aside from the singleton instance. More...
 
HandlerInterface::Ptr resolveHandler (const Ufe::Rtid &rtId, const std::string &handlerId)
 

Detailed Description

Singleton class to manage UFE runtimes.

This singleton class is where UFE runtimes register handlers for different interfaces. Clients that wish to use interfaces ask the runtime manager to return the appropriate handler for that interface, for the appropriate runtime.

Definition at line 47 of file runTimeMgr.h.

Constructor & Destructor Documentation

◆ RunTimeMgr() [1/2]

Ufe::RunTimeMgr::RunTimeMgr ( const RunTimeMgr )
delete

Cannot copy the runtime manager singleton.

◆ RunTimeMgr() [2/2]

Ufe::RunTimeMgr::RunTimeMgr ( )
private

Cannot create a runtime manager aside from the singleton instance.

Member Function Documentation

◆ attributesHandler()

AttributesHandler::Ptr Ufe::RunTimeMgr::attributesHandler ( const Rtid rtId) const

Retrieve the Attributes handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
AttributesHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ batchOpsHandler()

BatchOpsHandler::Ptr Ufe::RunTimeMgr::batchOpsHandler ( const Rtid rtId) const

Retrieve the BatchOps handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
BatchOpsHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ cameraHandler()

CameraHandler::Ptr Ufe::RunTimeMgr::cameraHandler ( const Rtid rtId) const

Retrieve the Camera handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
CameraHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ clipboardHandler()

ClipboardHandler::Ptr Ufe::RunTimeMgr::clipboardHandler ( const Rtid rtId) const

Retrieve the clipboard handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
ClipboardHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ connectionHandler()

ConnectionHandler::Ptr Ufe::RunTimeMgr::connectionHandler ( const Rtid rtId) const

Retrieve the ConnectionHandler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
ConnectionHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ contextOpsHandler()

ContextOpsHandler::Ptr Ufe::RunTimeMgr::contextOpsHandler ( const Rtid rtId) const

Retrieve the ContextOps handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
ContextOpsHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ getId()

Rtid Ufe::RunTimeMgr::getId ( const std::string &  rtName) const
Exceptions
InvalidRunTimeNameThrown if argument runtime name does not exist.
Returns
The runtime ID corresponding to the argument name.

◆ getIds()

std::list< Rtid > Ufe::RunTimeMgr::getIds ( ) const
Returns
List of all registered runtime IDs.

◆ getName()

std::string Ufe::RunTimeMgr::getName ( const Rtid rtId) const
Exceptions
InvalidRunTimeIdThrown if argument runtime ID does not exist.
Returns
The runtime name corresponding to the argument ID.

◆ handler()

template<typename T >
std::shared_ptr< T > Ufe::RunTimeMgr::handler ( const Ufe::Rtid rtId)
inline

Provides a pointer to a handler of type T in the specified runtime.

Parameters
rtIdthe ID of the runtime the handler is register to.
Returns
A handler of type T that is derived from HandlerInterface. nullptr if no handler of such type was found on this runtime.

Definition at line 454 of file runTimeMgr.h.

◆ hasId()

bool Ufe::RunTimeMgr::hasId ( const Rtid rtId) const
Returns
True if the runtime ID exists.

◆ hierarchyHandler()

HierarchyHandler::Ptr Ufe::RunTimeMgr::hierarchyHandler ( const Rtid rtId) const

Retrieve the HierarchyHandler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
HierarchyHandler corresponding to runtime type. Null pointer if the argument runtime does not exist

◆ hierarchyHandlerRef()

const HierarchyHandler & Ufe::RunTimeMgr::hierarchyHandlerRef ( const Rtid rtId) const

Retrieve the Hierarchy handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
HierarchyHandler corresponding to runtime type.
Exceptions
InvalidRunTimeIdThrown if argument runtime does not exist.

◆ instance()

static RunTimeMgr & Ufe::RunTimeMgr::instance ( )
static
Returns
The runtime manager singleton instance.

◆ lightHandler()

LightHandler::Ptr Ufe::RunTimeMgr::lightHandler ( const Rtid rtId) const

Retrieve the Light handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
LightHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ materialHandler()

MaterialHandler::Ptr Ufe::RunTimeMgr::materialHandler ( const Rtid rtId) const

Retrieve the Material handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
MaterialHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ nodeDefHandler()

NodeDefHandler::Ptr Ufe::RunTimeMgr::nodeDefHandler ( const Rtid rtId) const

Retrieve the node definition handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
NodeDefHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ object3dHandler()

Object3dHandler::Ptr Ufe::RunTimeMgr::object3dHandler ( const Rtid rtId) const

Retrieve the Object3d handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
Object3dHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ operator=()

RunTimeMgr & Ufe::RunTimeMgr::operator= ( const RunTimeMgr )
delete

Cannot assign the runtime manager singleton.

◆ pathMappingHandler()

PathMappingHandler::Ptr Ufe::RunTimeMgr::pathMappingHandler ( const Rtid rtId) const

Retrieve the path mapping handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
PathMappingHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ register_()

Rtid Ufe::RunTimeMgr::register_ ( const std::string &  rtName,
const Handlers handlers 
)

Register a runtime and its handlers to create interfaces. register is a reserved C++ keyword, using register_ instead.

See also
unregister
Parameters
rtNamethe name of the runtime for the handlers.
handlersthe handlers for each interface to be registered.
Exceptions
InvalidRunTimeNameThrown if argument runtime name already exists.
Returns
The allocated runtime ID.

◆ registerHandler()

void Ufe::RunTimeMgr::registerHandler ( const Ufe::Rtid rtId,
const std::string &  handlerId,
const HandlerInterface::Ptr handler 
)

Registers a dynamic handler given a handler id.

Parameters
rtIdthe ID of the runtime for the handler to register to.
handlerIdthe ID of the handler to be registered for the runtime.
handlerpointer to the handler object

◆ resolveHandler()

HandlerInterface::Ptr Ufe::RunTimeMgr::resolveHandler ( const Ufe::Rtid rtId,
const std::string &  handlerId 
)
private

◆ sceneItemOpsHandler()

SceneItemOpsHandler::Ptr Ufe::RunTimeMgr::sceneItemOpsHandler ( const Rtid rtId) const

Retrieve the SceneItemOps handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
SceneItemOpsHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ sceneSegmentHandler()

SceneSegmentHandler::Ptr Ufe::RunTimeMgr::sceneSegmentHandler ( const Rtid rtId) const

Retrieve the scene segment handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
SceneSegmentHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ setAttributesHandler()

void Ufe::RunTimeMgr::setAttributesHandler ( const Rtid rtId,
const AttributesHandler::Ptr attributesHandler 
)

Set an AttributesHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
attributesHandlerthe Attributes interface factory.

◆ setBatchOpsHandler()

void Ufe::RunTimeMgr::setBatchOpsHandler ( const Rtid rtId,
const BatchOpsHandler::Ptr batchOpsHandler 
)

Set a BatchOpsHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
batchOpsHandlerthe BatchOps interface factory.

◆ setCameraHandler()

void Ufe::RunTimeMgr::setCameraHandler ( const Rtid rtId,
const CameraHandler::Ptr cameraHandler 
)

Set a CameraHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
cameraHandlerthe CameraHandler object.

◆ setClipboardHandler()

void Ufe::RunTimeMgr::setClipboardHandler ( const Rtid rtId,
const ClipboardHandler::Ptr clipboardHandler 
)

Set a ClipboardHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
clipboardHandlerthe Clipboard interface factory.

◆ setConnectionHandler()

void Ufe::RunTimeMgr::setConnectionHandler ( const Rtid rtId,
const ConnectionHandler::Ptr connectionHandler 
)

Set a ConnectionHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
connectionHandlerthe Connections interface factory.

◆ setContextOpsHandler()

void Ufe::RunTimeMgr::setContextOpsHandler ( const Rtid rtId,
const ContextOpsHandler::Ptr contextOpsHandler 
)

Set a ContextOpsHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
contextOpsHandlerthe ContextOps interface factory.

◆ setHierarchyHandler()

void Ufe::RunTimeMgr::setHierarchyHandler ( const Rtid rtId,
const HierarchyHandler::Ptr hierarchyHandler 
)

Set a HierarchyHandler to a given runtime ID

Parameters
rtIdthe ID of the runtime for the handler.
hierarchyHandlerthe Hierarchy interface factory.

◆ setLightHandler()

void Ufe::RunTimeMgr::setLightHandler ( const Rtid rtId,
const LightHandler::Ptr lightHandler 
)

Set a LightHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
lightHandlerthe LightHandler object.

◆ setMaterialHandler()

void Ufe::RunTimeMgr::setMaterialHandler ( const Rtid rtId,
const MaterialHandler::Ptr materialHandler 
)

Set a MaterialHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
materialHandlerthe Material interface factory.

◆ setNodeDefHandler()

void Ufe::RunTimeMgr::setNodeDefHandler ( const Rtid rtId,
const NodeDefHandler::Ptr nodeDefHandler 
)

Set a NodeDefHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
nodeDefHandlerthe NodeDefHandler object.

◆ setObject3dHandler()

void Ufe::RunTimeMgr::setObject3dHandler ( const Rtid rtId,
const Object3dHandler::Ptr object3dHandler 
)

Set an Object3dHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
object3dHandlerthe Object3d interface factory.

◆ setPathMappingHandler()

void Ufe::RunTimeMgr::setPathMappingHandler ( const Rtid rtId,
const PathMappingHandler::Ptr pathMappingHandler 
)

Set a PathMappingHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
pathMappingHandlerthe PathMappingHandler object.

◆ setSceneItemOpsHandler()

void Ufe::RunTimeMgr::setSceneItemOpsHandler ( const Rtid rtId,
const SceneItemOpsHandler::Ptr sceneItemOpsHandler 
)

Set a SceneItemOpsHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
sceneItemOpsHandlerthe SceneItemOps interface factory.

◆ setSceneSegmentHandler()

void Ufe::RunTimeMgr::setSceneSegmentHandler ( const Rtid rtId,
const SceneSegmentHandler::Ptr sceneSegmentHandler 
)

Set a SceneSegmentHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
sceneSegmentHandlerthe SceneSegmentHandler object.

◆ setTransform3dHandler()

void Ufe::RunTimeMgr::setTransform3dHandler ( const Rtid rtId,
const Transform3dHandler::Ptr transform3dHandler 
)

Set a Transform3dHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
transform3dHandlerthe Transform3d interface factory.

◆ setUIInfoHandler()

void Ufe::RunTimeMgr::setUIInfoHandler ( const Rtid rtId,
const UIInfoHandler::Ptr uiInfoHandler 
)

Set a UIInfoHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
uiInfoHandlerthe UIInfoHandler object.

◆ setUINodeGraphNodeHandler()

void Ufe::RunTimeMgr::setUINodeGraphNodeHandler ( const Rtid rtId,
const UINodeGraphNodeHandler::Ptr uiNodeGraphNodeHandler 
)

Set a UINodeGraphNodeHandler to a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
uiNodeGraphNodeHandlerthe UINodeGraphNode interface factory.

◆ transform3dHandler()

Transform3dHandler::Ptr Ufe::RunTimeMgr::transform3dHandler ( const Rtid rtId) const

Retrieve the Transform3d handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
Transform3dHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ uiInfoHandler()

UIInfoHandler::Ptr Ufe::RunTimeMgr::uiInfoHandler ( const Rtid rtId) const

Retrieve the UI Info handler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
UIInfoHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ uiNodeGraphNodeHandler()

UINodeGraphNodeHandler::Ptr Ufe::RunTimeMgr::uiNodeGraphNodeHandler ( const Rtid rtId) const

Retrieve the UINodeGraphNodeHandler of a given runtime ID.

Parameters
rtIdthe ID of the runtime for the handler.
Returns
UINodeGraphNodeHandler corresponding to runtime type. Null pointer if the argument runtime does not exist.

◆ unregister()

bool Ufe::RunTimeMgr::unregister ( const Rtid rtId)

Unregister the given runtime ID.

Parameters
rtIdthe ID of the runtime for the handlers.
Returns
True if the runtime was unregistered.

◆ unregisterHandler()

void Ufe::RunTimeMgr::unregisterHandler ( const Ufe::Rtid rtId,
const std::string &  handlerId 
)

Unregisters a dynamic handler given a handler id and a runtime id.

Parameters
rtIdthe ID of the runtime this handler was registered to.
handlerIdthe ID of the handler to be unregistered.

The documentation for this class was generated from the following file: