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

Singleton class to manage UFE run-times. More...

#include <runTimeMgr.h>

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 HierarchyHandler::Ptr &hierarchyHandler, const Transform3dHandler::Ptr &transform3dHandler, const SceneItemOpsHandler::Ptr &sceneItemOpsHandler)
 
bool unregister (const Rtid &rtId)
 
std::string getName (const Rtid &rtId) const
 
Rtid getId (const std::string &rtName) 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)
 
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
 
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 32 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

◆ 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.

◆ 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.

◆ 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 HierarchyHandler::Ptr hierarchyHandler,
const Transform3dHandler::Ptr transform3dHandler,
const SceneItemOpsHandler::Ptr sceneItemOpsHandler 
)

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.
hierarchyHandlerthe Hierarchy interface factory.
transform3dHandlerthe Transform3d interface factory.
sceneItemOpsHandlerthe SceneItemOps interface factory.
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.

◆ 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.

◆ 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.

◆ 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.

◆ 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: