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::SceneItem Class Referenceabstract

Universal Front End abstract scene item. More...

#include <sceneItem.h>

Collaboration diagram for Ufe::SceneItem:

Public Types

typedef std::shared_ptr< SceneItemPtr
 

Public Member Functions

 SceneItem (const Path &path)
 
 SceneItem (const SceneItem &)=default
 Default copy constructor. More...
 
virtual ~SceneItem ()
 Destructor. More...
 
const Pathpath () const
 
Rtid runTimeId () const
 
bool operator== (const SceneItem &rhs) const
 
bool operator!= (const SceneItem &rhs) const
 
std::string nodeName () const
 
virtual std::string nodeType () const =0
 
virtual std::vector< std::string > ancestorNodeTypes () const
 
virtual bool isProperty () const
 
virtual Ufe::Value getMetadata (const std::string &key) const =0
 
virtual UndoableCommandPtr setMetadataCmd (const std::string &key, const Ufe::Value &value)=0
 
virtual void setMetadata (const std::string &key, const Ufe::Value &value)
 
virtual UndoableCommandPtr clearMetadataCmd (const std::string &key="")=0
 
virtual void clearMetadata (const std::string &key="")
 
virtual Ufe::Value getGroupMetadata (const std::string &group, const std::string &key) const =0
 
virtual UndoableCommandPtr setGroupMetadataCmd (const std::string &group, const std::string &key, const Ufe::Value &value)=0
 
virtual void setGroupMetadata (const std::string &group, const std::string &key, const Ufe::Value &value)
 
virtual UndoableCommandPtr clearGroupMetadataCmd (const std::string &group, const std::string &key="")=0
 
virtual void clearGroupMetadata (const std::string &group, const std::string &key="")
 

Private Attributes

Path fPath
 

Detailed Description

Universal Front End abstract scene item.

A scene item identifies an object or 3D path in the scene, independent of its underlying runtime. It consists of a path that identifies an object in the scene.

A scene item may optionally represent a property associated with a given scene object. A property represents data associated with a single node or object. In different runtimes, it is variously known as an attribute, a component, or an underworld path, but is always associated with a single node or object.

Definition at line 41 of file sceneItem.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<SceneItem> Ufe::SceneItem::Ptr

Definition at line 44 of file sceneItem.h.

Constructor & Destructor Documentation

◆ SceneItem() [1/2]

Ufe::SceneItem::SceneItem ( const Path path)

Constructor.

Parameters
pathPath of the scene item to build.

◆ SceneItem() [2/2]

Ufe::SceneItem::SceneItem ( const SceneItem )
default

Default copy constructor.

◆ ~SceneItem()

virtual Ufe::SceneItem::~SceneItem ( )
virtual

Destructor.

Member Function Documentation

◆ ancestorNodeTypes()

virtual std::vector< std::string > Ufe::SceneItem::ancestorNodeTypes ( ) const
virtual

Return a list of all ancestor types (including the type of the scene item itself) in order from closest ancestor to farthest. The starting type is itself included, as the first element of the results vector. The implementation in this class returns a vector containing a single item, the nodeType of this scene item.

Returns
List of all ancestor types (including this one).

◆ clearGroupMetadata()

virtual void Ufe::SceneItem::clearGroupMetadata ( const std::string &  group,
const std::string &  key = "" 
)
virtual

Virtual method to clear a meta data and execute its UndoableCommand

Parameters
groupThe group this key is going to be cleared from
keyThe key to be cleared

◆ clearGroupMetadataCmd()

virtual UndoableCommandPtr Ufe::SceneItem::clearGroupMetadataCmd ( const std::string &  group,
const std::string &  key = "" 
)
pure virtual

Pure virtual method to clear a meta data The returned command is not executed; it is up to the caller to call execute().

Parameters
groupThe group this key is going to be cleared from
keyThe key to be cleared
Returns
UndoableCommandPtr of the clear action.

◆ clearMetadata()

virtual void Ufe::SceneItem::clearMetadata ( const std::string &  key = "")
virtual

Virtual method to clear a meta data and execute its UndoableCommand

Parameters
keyThe key to clear

◆ clearMetadataCmd()

virtual UndoableCommandPtr Ufe::SceneItem::clearMetadataCmd ( const std::string &  key = "")
pure virtual

Pure virtual method to clear a meta data The returned command is not executed; it is up to the caller to call execute().

Parameters
keyThe key to clear
Returns
UndoableCommandPtr of the clear action

◆ getGroupMetadata()

virtual Ufe::Value Ufe::SceneItem::getGroupMetadata ( const std::string &  group,
const std::string &  key 
) const
pure virtual

Pure virtual method to return meta data for a given key in a given group

Parameters
groupThe group that contains the given key
keyKey to look for in meta data
Returns
Ufe::Value of the found key, otherwise the default Ufe::Value()

◆ getMetadata()

virtual Ufe::Value Ufe::SceneItem::getMetadata ( const std::string &  key) const
pure virtual

Pure virtual method to return meta data for a given key

Parameters
keyKey to look for in meta data
Returns
Ufe::Value of the found key, otherwise the default Ufe::Value()

◆ isProperty()

virtual bool Ufe::SceneItem::isProperty ( ) const
virtual

Return whether this scene item represents a property. The implementation in this class returns false.

Returns
true if this scene item represents a property.

◆ nodeName()

std::string Ufe::SceneItem::nodeName ( ) const
Returns
Convenience to return the name of the node at the tail of the Path.

◆ nodeType()

virtual std::string Ufe::SceneItem::nodeType ( ) const
pure virtual

Pure virtual method to return the type of the last node

Returns
type of node at the tail of the Path.

◆ operator!=()

bool Ufe::SceneItem::operator!= ( const SceneItem rhs) const

◆ operator==()

bool Ufe::SceneItem::operator== ( const SceneItem rhs) const

Unfortunately no compiler-generated default equality operators. Items are equal if their path is equal.

◆ path()

const Path & Ufe::SceneItem::path ( ) const
Returns
Path of the SceneItem.

◆ runTimeId()

Rtid Ufe::SceneItem::runTimeId ( ) const
Returns
Convenience to obtain the runtime ID of the Path.

◆ setGroupMetadata()

virtual void Ufe::SceneItem::setGroupMetadata ( const std::string &  group,
const std::string &  key,
const Ufe::Value value 
)
virtual

Virtual method to set a meta data and execute its UndoableCommand

Parameters
groupThe group this key is going to be set on
keyThe key to set the value on
valueThe value for the given key

◆ setGroupMetadataCmd()

virtual UndoableCommandPtr Ufe::SceneItem::setGroupMetadataCmd ( const std::string &  group,
const std::string &  key,
const Ufe::Value value 
)
pure virtual

Pure virtual method to set a meta data and return an UndoableCommand pointer The returned command is not executed; it is up to the caller to call execute().

Parameters
groupThe group this key is going to be set on
keyThe key to set the value on
valueThe value for the given key
Returns
UndoableCommandPtr of the set key action

◆ setMetadata()

virtual void Ufe::SceneItem::setMetadata ( const std::string &  key,
const Ufe::Value value 
)
virtual

Virtual method to set a meta data and execute its UndoableCommand

Parameters
keyThe key to set the value on
valueThe value for the given key

◆ setMetadataCmd()

virtual UndoableCommandPtr Ufe::SceneItem::setMetadataCmd ( const std::string &  key,
const Ufe::Value value 
)
pure virtual

Pure virtual method to set a meta data and return an UndoableCommand pointer The returned command is not executed; it is up to the caller to call execute().

Parameters
keyThe key to set the value on
valueThe value for the given key
Returns
UndoableCommandPtr of the set key action

Member Data Documentation

◆ fPath

Path Ufe::SceneItem::fPath
private

Definition at line 150 of file sceneItem.h.


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