ufe  2.0
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 run-times. More...

#include <runTimeMgr.h>

Classes

struct  Handlers
 

Public Member Functions

 RunTimeMgr (const RunTimeMgr &)=delete
 Cannot copy the run-time manager singleton. More...
 
RunTimeMgroperator= (const RunTimeMgr &)=delete
 Cannot assign the run-time 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 setObject3dHandler (const Rtid &rtId, const Object3dHandler::Ptr &object3dHandler)
 
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)
 
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
 
Object3dHandler::Ptr object3dHandler (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
 
std::list< RtidgetIds () const
 

Static Public Member Functions

static RunTimeMgrinstance ()
 

Private Member Functions

 RunTimeMgr ()
 Cannot create a run-time manager aside from the singleton instance. More...
 

Detailed Description

Singleton class to manage UFE run-times.

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

Definition at line 37 of file runTimeMgr.h.

Constructor & Destructor Documentation

◆ RunTimeMgr() [1/2]

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

Cannot copy the run-time manager singleton.

◆ RunTimeMgr() [2/2]

Ufe::RunTimeMgr::RunTimeMgr ( )
private

Cannot create a run-time 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 run-time ID.

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

◆ cameraHandler()

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

Retrieve the Camera handler of a given run-time ID.

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

◆ contextOpsHandler()

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

Retrieve the ContextOps handler of a given run-time ID.

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

◆ getId()

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

◆ getIds()

std::list<Rtid> Ufe::RunTimeMgr::getIds ( ) const
Returns
List of all register run-time IDs.

◆ getName()

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

◆ hasId()

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

◆ hierarchyHandler()

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

Retrieve the HierarchyHandler of a given run-time ID.

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

◆ hierarchyHandlerRef()

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

Retrieve the Hierarchy handler of a given run-time ID.

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

◆ instance()

static RunTimeMgr& Ufe::RunTimeMgr::instance ( )
static
Returns
The run-time manager singleton instance.

◆ object3dHandler()

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

Retrieve the Object3d handler of a given run-time ID.

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

◆ operator=()

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

Cannot assign the run-time manager singleton.

◆ register_()

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

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

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

◆ sceneItemOpsHandler()

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

Retrieve the SceneItemOps handler of a given run-time ID.

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

◆ setAttributesHandler()

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

Set an AttributesHandler to a given run-time ID.

Parameters
rtIdthe ID of the run-time for the handler.
attributesHandlerthe Attributes interface factory.

◆ setCameraHandler()

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

Set a CameraHandler to a given run-time ID.

Parameters
rtIdthe ID of the run-time for the handler.
cameraHandlerthe CameraHandler object.

◆ setContextOpsHandler()

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

Set a ContextOpsHandler to a given run-time ID.

Parameters
rtIdthe ID of the run-time 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 run-time ID

Parameters
rtIdthe ID of the run-time for the handler.
hierarchyHandlerthe Hierarchy interface factory.

◆ setObject3dHandler()

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

Set an Object3dHandler to a given run-time ID.

Parameters
rtIdthe ID of the run-time for the handler.
object3dHandlerthe Object3d interface factory.

◆ setSceneItemOpsHandler()

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

Set a SceneItemOpsHandler to a given run-time ID.

Parameters
rtIdthe ID of the run-time for the handler.
sceneItemOpsHandlerthe SceneItemOps interface factory.

◆ setTransform3dHandler()

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

Set a Transform3dHandler to a given run-time ID.

Parameters
rtIdthe ID of the run-time 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 run-time ID.

Parameters
rtIdthe ID of the run-time for the handler.
uiInfoHandlerthe UIInfoHandler object.

◆ transform3dHandler()

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

Retrieve the Transform3d handler of a given run-time ID.

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

◆ uiInfoHandler()

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

Retrieve the UI Info handler of a given run-time ID.

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

◆ unregister()

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

Unregister the given run-time ID.

Parameters
rtIdthe ID of the run-time for the handlers.
Returns
True if the run-time was unregistered.

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