![]() |
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
|
Selection list for objects in the scene. More...
#include <selection.h>
Public Types | |
typedef SceneItemList::const_iterator | const_iterator |
typedef SceneItemList::const_reverse_iterator | const_reverse_iterator |
Public Member Functions | |
Selection () | |
Constructor. More... | |
Selection (const Selection &) | |
Default copy constructor. More... | |
virtual | ~Selection () |
Destructor. More... | |
Selection & | operator= (const Selection &) |
Syntactic convenience that calls replaceWith. More... | |
Selection (Selection &&) | |
Move construction. postClear is called on the argument. More... | |
Selection & | operator= (Selection &&rhs) |
Move assignment. postClear is first called on rhs, then postReplaceWith on this. More... | |
std::size_t | size () const |
bool | empty () const |
bool | append (const SceneItem::Ptr &item) |
bool | remove (const SceneItem::Ptr &item) |
void | clear () |
void | replaceWith (const Selection &selection) |
bool | contains (const Path &path) const |
bool | containsDescendant (const Path &path) const |
bool | containsAncestor (const Path &path) const |
const_iterator | cbegin () const |
Iteration interface on SceneItems. More... | |
const_iterator | begin () const |
Iteration interface on SceneItems. More... | |
const_iterator | cend () const |
Iteration interface on SceneItems. More... | |
const_iterator | end () const |
Iteration interface on SceneItems. More... | |
const_reverse_iterator | crbegin () const |
Iteration interface on SceneItems. More... | |
const_reverse_iterator | rbegin () const |
Iteration interface on SceneItems. More... | |
const_reverse_iterator | crend () const |
Iteration interface on SceneItems. More... | |
const_reverse_iterator | rend () const |
Iteration interface on SceneItems. More... | |
Protected Member Functions | |
bool | doAppend (const SceneItem::Ptr &item) |
bool | doRemove (const SceneItem::Ptr &item) |
void | doClear () |
void | doReplaceWith (const Selection &selection) |
virtual void | postAppend (const SceneItem::Ptr &item) |
virtual void | postRemove (const SceneItem::Ptr &item) |
virtual void | postClear () |
virtual void | postReplaceWith () |
Private Attributes | |
SceneItemList | fList |
void * | fTrieStorage [2] |
SelectionTrie & | trie () |
const SelectionTrie & | trie () const |
Selection list for objects in the scene.
This class provides an ordered list composed of selection items. It uses a backing trie data structure so that on average, for a path with c components, addition, lookup, and removal from the selection can be done in O(c) time.
Definition at line 28 of file selection.h.
typedef SceneItemList::const_iterator Ufe::Selection::const_iterator |
Definition at line 32 of file selection.h.
typedef SceneItemList::const_reverse_iterator Ufe::Selection::const_reverse_iterator |
Definition at line 33 of file selection.h.
Ufe::Selection::Selection | ( | ) |
Constructor.
Ufe::Selection::Selection | ( | const Selection & | ) |
Default copy constructor.
|
virtual |
Destructor.
Ufe::Selection::Selection | ( | Selection && | ) |
Move construction. postClear is called on the argument.
bool Ufe::Selection::append | ( | const SceneItem::Ptr & | item | ) |
If the item is not on the selection list, append it at the end and return true. If the item is already in the list, do nothing and return false.
item | SceneItem to append to the selection list. |
std::invalid_argument | if the argument is a null pointer. |
const_iterator Ufe::Selection::begin | ( | ) | const |
Iteration interface on SceneItems.
const_iterator Ufe::Selection::cbegin | ( | ) | const |
Iteration interface on SceneItems.
const_iterator Ufe::Selection::cend | ( | ) | const |
Iteration interface on SceneItems.
void Ufe::Selection::clear | ( | ) |
Remove all SceneItems from the selection list.
bool Ufe::Selection::contains | ( | const Path & | path | ) | const |
bool Ufe::Selection::containsAncestor | ( | const Path & | path | ) | const |
Query whether the selection contains an ancestor of the argument path. Must be a strict ancestor: if the selection contains only the argument itself, returns false. If the argument path is empty, returns false.
path | descendant Path |
bool Ufe::Selection::containsDescendant | ( | const Path & | path | ) | const |
Query whether the selection contains a descendant of the argument path. Must be a strict descendant: if the selection contains only the argument itself, returns false. If the argument path is empty, returns false.
path | ancestor Path |
const_reverse_iterator Ufe::Selection::crbegin | ( | ) | const |
Iteration interface on SceneItems.
const_reverse_iterator Ufe::Selection::crend | ( | ) | const |
Iteration interface on SceneItems.
|
protected |
Engine methods for append, remove, clear, and replaceWith, to implement the Template Method design pattern. See
|
protected |
Engine methods for append, remove, clear, and replaceWith, to implement the Template Method design pattern. See
|
protected |
Engine methods for append, remove, clear, and replaceWith, to implement the Template Method design pattern. See
|
protected |
Engine methods for append, remove, clear, and replaceWith, to implement the Template Method design pattern. See
bool Ufe::Selection::empty | ( | ) | const |
const_iterator Ufe::Selection::end | ( | ) | const |
Iteration interface on SceneItems.
Syntactic convenience that calls replaceWith.
Move assignment. postClear is first called on rhs, then postReplaceWith on this.
|
protectedvirtual |
Reimplemented in Ufe::ObservableSelection.
|
protectedvirtual |
Reimplemented in Ufe::ObservableSelection.
|
protectedvirtual |
Reimplemented in Ufe::ObservableSelection.
|
protectedvirtual |
Reimplemented in Ufe::ObservableSelection.
const_reverse_iterator Ufe::Selection::rbegin | ( | ) | const |
Iteration interface on SceneItems.
bool Ufe::Selection::remove | ( | const SceneItem::Ptr & | item | ) |
Remove the item from the selection list, if present, and return true. If no such item is on the list, return false.
item | SceneItem to remove from selection list. |
std::invalid_argument | if the argument is a null pointer. |
const_reverse_iterator Ufe::Selection::rend | ( | ) | const |
Iteration interface on SceneItems.
void Ufe::Selection::replaceWith | ( | const Selection & | selection | ) |
Replace all SceneItems in the selection list with those from the argument selection list. The items are shared between both lists (shallow copy).
selection | Selection to replace with. |
std::size_t Ufe::Selection::size | ( | ) | const |
|
inlineprivate |
Hidden trie-based acceleration structure access and untyped storage. The untyped storage avoids a dynamic memory allocation.
|
inlineprivate |
Hidden trie-based acceleration structure access and untyped storage. The untyped storage avoids a dynamic memory allocation.
|
private |
Definition at line 154 of file selection.h.
|
private |
Hidden trie-based acceleration structure access and untyped storage. The untyped storage avoids a dynamic memory allocation.
Definition at line 162 of file selection.h.