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

Abstract base class for NodeDef interface. More...

#include <nodeDef.h>

Public Types

typedef std::shared_ptr< NodeDefPtr
 

Public Member Functions

virtual ~NodeDef ()
 Destructor. More...
 
virtual std::string type () const =0
 
virtual std::size_t nbClassifications () const =0
 
virtual std::string classification (std::size_t level) const =0
 
virtual std::vector< std::string > inputNames () const =0
 
virtual bool hasInput (const std::string &name) const =0
 
virtual AttributeDef::ConstPtr input (const std::string &name) const =0
 
virtual ConstAttributeDefs inputs () const =0
 
virtual std::vector< std::string > outputNames () const =0
 
virtual bool hasOutput (const std::string &name) const =0
 
virtual AttributeDef::ConstPtr output (const std::string &name) const =0
 
virtual ConstAttributeDefs outputs () const =0
 
virtual Value getMetadata (const std::string &key) const =0
 
virtual bool hasMetadata (const std::string &key) const =0
 Returns true if metadata key has a non-empty value. More...
 
virtual SceneItem::Ptr createNode (const SceneItem::Ptr &parent, const PathComponent &name) const =0
 
virtual InsertChildCommand::Ptr createNodeCmd (const SceneItem::Ptr &parent, const PathComponent &name) const =0
 

Static Public Member Functions

static Ptr definition (const Rtid &id, const std::string &type)
 

Protected Member Functions

 NodeDef ()
 Constructor. More...
 

Detailed Description

Abstract base class for NodeDef interface.

This base class defines an interface to retrieve node definition information.

Definition at line 37 of file nodeDef.h.

Member Typedef Documentation

◆ Ptr

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

Definition at line 40 of file nodeDef.h.

Constructor & Destructor Documentation

◆ ~NodeDef()

virtual Ufe::NodeDef::~NodeDef ( )
virtual

Destructor.

◆ NodeDef()

Ufe::NodeDef::NodeDef ( )
protected

Constructor.

Member Function Documentation

◆ classification()

virtual std::string Ufe::NodeDef::classification ( std::size_t  level) const
pure virtual

Gets the classification label applicable to this NodeNef for the requested classification level. The most precise classification level corresponds to level zero.

Parameters
levelThe classification level to query.
Returns
The classification label for this node at this level.

◆ createNode()

virtual SceneItem::Ptr Ufe::NodeDef::createNode ( const SceneItem::Ptr parent,
const PathComponent name 
) const
pure virtual

Create a new object in the data model using the current node definition as template, and return a SceneItem pointer for it.

Parameters
parentItem under which the node is to be created.
nameName of the new node.
Returns
SceneItem for the created node, at its new path. Returns a null pointer on failure.

◆ createNodeCmd()

virtual InsertChildCommand::Ptr Ufe::NodeDef::createNodeCmd ( const SceneItem::Ptr parent,
const PathComponent name 
) const
pure virtual

Create a command to create a SceneItem using the current node definition as template. The command is not executed.

Parameters
parentItem under which the node is to be created.
nameName of the new node.
Returns
Command whose execution will create the node.

◆ definition()

static Ptr Ufe::NodeDef::definition ( const Rtid id,
const std::string &  type 
)
static
Returns
The definition associated with the provided type.

◆ getMetadata()

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

Get the value of the metadata named key.

Parameters
[in]keyThe metadata key to query.
Returns
The value of the metadata key. If the key does not exist an empty Value is returned.

◆ hasInput()

virtual bool Ufe::NodeDef::hasInput ( const std::string &  name) const
pure virtual

Queries whether an input exists with the given name.

Parameters
nameThe input name to check.
Returns
True if the object contains an input matching the name.

◆ hasMetadata()

virtual bool Ufe::NodeDef::hasMetadata ( const std::string &  key) const
pure virtual

Returns true if metadata key has a non-empty value.

◆ hasOutput()

virtual bool Ufe::NodeDef::hasOutput ( const std::string &  name) const
pure virtual

Queries whether an output exists with the given name.

Parameters
nameThe output name to check.
Returns
True if the object contains an output matching the name.

◆ input()

virtual AttributeDef::ConstPtr Ufe::NodeDef::input ( const std::string &  name) const
pure virtual

Creates an AttributeDef interface for the given input name.

Parameters
nameName of the input to retrieve.
Returns
AttributeDef interface for the given name. Returns a null pointer if no input exists for the given name.

◆ inputNames()

virtual std::vector< std::string > Ufe::NodeDef::inputNames ( ) const
pure virtual
Returns
List of all the input names for this node definition.

◆ inputs()

virtual ConstAttributeDefs Ufe::NodeDef::inputs ( ) const
pure virtual
Returns
The inputs of the node definition.

◆ nbClassifications()

virtual std::size_t Ufe::NodeDef::nbClassifications ( ) const
pure virtual

Queries the number of classification levels available for this node. This can vary across runtimes. A biology implementation would have species as the "type" and genus, family, order, class, phylum, kingdom representing the 6 available levels.

Returns
The number of classification levels.

◆ output()

virtual AttributeDef::ConstPtr Ufe::NodeDef::output ( const std::string &  name) const
pure virtual

Creates an AttributeDef interface for the given output name.

Parameters
nameName of the output to retrieve.
Returns
AttributeDef interface for the given name. Returns a null pointer if no output exists for the given name.

◆ outputNames()

virtual std::vector< std::string > Ufe::NodeDef::outputNames ( ) const
pure virtual
Returns
List of all the output names for this node definition.

◆ outputs()

virtual ConstAttributeDefs Ufe::NodeDef::outputs ( ) const
pure virtual
Returns
The outputs of the node definition.

◆ type()

virtual std::string Ufe::NodeDef::type ( ) const
pure virtual
Returns
The type of the node definition.

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