![]() |
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
|
Abstract base class for scene hierarchy interface. More...
#include <hierarchy.h>
Public Types | |
| typedef std::shared_ptr< Hierarchy > | Ptr |
| typedef std::list< ChildFilterFlag > | ChildFilter |
Public Member Functions | |
| Hierarchy () | |
| Constructor. More... | |
| Hierarchy (const Hierarchy &)=default | |
| Default copy constructor. More... | |
| virtual | ~Hierarchy () |
| Destructor. More... | |
| virtual SceneItem::Ptr | sceneItem () const =0 |
| Scene item accessor. More... | |
| virtual bool | hasChildren () const =0 |
| virtual SceneItemList | children () const =0 |
| virtual SceneItemList | filteredChildren (const ChildFilter &) const =0 |
| virtual SceneItem::Ptr | parent () const =0 |
| virtual SceneItem::Ptr | defaultParent () const =0 |
| virtual SceneItem::Ptr | insertChild (const SceneItem::Ptr &child, const SceneItem::Ptr &pos)=0 |
| virtual InsertChildCommand::Ptr | insertChildCmd (const SceneItem::Ptr &child, const SceneItem::Ptr &pos)=0 |
| InsertChildCommand::Ptr | appendChildCmd (const SceneItem::Ptr &child) |
| virtual SceneItem::Ptr | createGroup (const Selection &selection, const PathComponent &name) const =0 |
| virtual UndoableCommand::Ptr | createGroupCmd (const Selection &selection, const PathComponent &name) const =0 |
| virtual UndoableCommand::Ptr | reorderCmd (const Ufe::SceneItemList &orderedList) const =0 |
| virtual bool | reorder (const Ufe::SceneItemList &orderedList) |
Static Public Member Functions | |
| static Ptr | hierarchy (const SceneItem::Ptr &item) |
| static SceneItem::Ptr | createItem (const Path &path) |
Abstract base class for scene hierarchy interface.
This base class defines the interface that run-times can implement to navigate the scene hierarchy, for a given scene item. The Hierarchy interface supports parent-child hierarchy semantics and queries, with the following characteristics:
To avoid the memory-consuming "one proxy object per scene object" approach, Hierarchy interface objects should be obtained and used within a local scope, and not stored. Hierarchy interfaces should be considered stateless, and can be bound to new selection items.
Definition at line 89 of file hierarchy.h.
| typedef std::list<ChildFilterFlag> Ufe::Hierarchy::ChildFilter |
Definition at line 93 of file hierarchy.h.
| typedef std::shared_ptr<Hierarchy> Ufe::Hierarchy::Ptr |
Definition at line 92 of file hierarchy.h.
| Ufe::Hierarchy::Hierarchy | ( | ) |
Constructor.
|
default |
Default copy constructor.
|
virtual |
Destructor.
|
inline |
Create a command to remove the argument child from its existing parent, and append it as a child of this SceneItem. Because of name uniqueness, the child may be renamed. The command is not executed.
| child | Child item to be appended. |
Definition at line 170 of file hierarchy.h.
|
pure virtual |
|
pure virtual |
Create a new group object as a child of this object and move all items in the Selection under it. Returned SceneItem will be the newly created parent. The argument component is the desired name of the created group. The resulting name will be different if an existing sibling already has that name.
| selection | Items to be moved under the new group |
| name | Desired name of new group to create |
|
pure virtual |
Create a command to create a new group object as a child of this object and move all items in the Selection under it. The argument component is the desired name of the created group. The resulting name will be different if an existing sibling. The command is not executed. already has that name.
| selection | Items to be moved under the new group |
| name | Desired name of new group to create |
|
static |
Convenience method that calls the createItem method on the hierarchy handler for the item. Note that this method does not create an object in the run-time; rather, it creates a UFE scene item for an existing run-time object. Returns a null pointer if the argument is an empty path.
Referenced by Ufe::BaseUndoableCommand::sceneItem().

|
pure virtual |
Return the parent to which this SceneItem should be appended, if it is removed from its current parent (unparent). This will typically be the scene root, or a meaningful sub-root of a sub-hierarchy.
|
pure virtual |
|
pure virtual |
|
static |
|
pure virtual |
Remove the argument child from its existing parent, and append it as a child of this SceneItem, inserting before SceneItem pos. If pos is a null pointer, child is appended. Because of name uniqueness, the child may be renamed.
| child | Child item to be inserted. |
| pos | Item before which child is to be inserted. |
|
pure virtual |
Create a command to remove the argument child from its existing parent, and insert it as a child of this SceneItem, inserting before SceneItem pos. If pos is a null pointer, child is appended. Because of name uniqueness, the child may be renamed. The command is not executed.
| child | Child item to be inserted. |
| pos | Item before which child is to be inserted. |
|
pure virtual |
|
inlinevirtual |
Reorder the children of this scene item. Default implementation calls reorder command and executes.
| orderedList | list of already reordered children. |
Definition at line 206 of file hierarchy.h.
|
pure virtual |
Create a command to reorder the children of this scene item.
| orderedList | list of already reordered children. |
|
pure virtual |
Scene item accessor.