NodeList is a container that works as input and output node listing for filtering and rendering. More...
#include <kanzi/core.ui/graphics3d/node_list.hpp>
Public Types | |
using | DiffNodeContainer = flat_set< NodeWeakPtr, owner_less< NodeWeakPtr > > |
Container type for added or removed nodes. More... | |
Public Types inherited from kanzi::TypedValueRange< NodeWeakPtr > | |
using | const_iterator = typename vector< NodeWeakPtr >::const_iterator |
Const iterator type for values. More... | |
using | iterator = typename vector< NodeWeakPtr >::iterator |
Iterator type for values. More... | |
Public Member Functions | |
DiffNodeContainer::const_iterator | beginAddedNodes () const |
Returns an iterator to the beginning of the added nodes list. More... | |
DiffNodeContainer::const_iterator | beginRemovedNodes () const |
Returns an iterator to the beginning of the removed nodes list. More... | |
void | clear () |
Clear the node list. More... | |
void | copyListData (const NodeList &other) |
Assign contents from another node list. More... | |
DiffNodeContainer::const_iterator | endAddedNodes () const |
Returns an iterator to the beginning of the added nodes list. More... | |
DiffNodeContainer::const_iterator | endRemovedNodes () const |
Returns an iterator to the beginning of the removed nodes list. More... | |
iterator | filterPassBegin () |
Begins the extract or filtering pass. More... | |
void | filterPassEnd (iterator lastLocation) |
Ends the extract or filtering pass. More... | |
iterator | insert (iterator insertLocation, NodeSharedPtr node) |
Insert new node into the end of the list. More... | |
bool | isDirty () const |
Indicates whether the node list is dirty, i.e. More... | |
void | setDirty (bool flag) |
Sets the dirty flag in the node list. More... | |
Public Member Functions inherited from kanzi::TypedValueRange< NodeWeakPtr > | |
iterator | begin () |
Gets an iterator to the beginning of the range. More... | |
const_iterator | begin () const |
Gets an iterator to the beginning of the range. More... | |
const_iterator | cbegin () const |
Gets an iterator to the beginning of the range. More... | |
const_iterator | cend () const |
Gets an iterator to the end of the range. More... | |
void | clear () |
Clears all values from internal storage. More... | |
iterator | end () |
Gets an iterator to the end of the range. More... | |
const_iterator | end () const |
Gets an iterator to the end of the range. More... | |
vector< NodeWeakPtr >::reference | operator[] (size_t index) |
Access operator. More... | |
vector< NodeWeakPtr >::const_reference | operator[] (size_t index) const |
Const access operator. More... | |
void | push_back (const NodeWeakPtr &value) |
Appends a value to the end of internal storage. More... | |
void | push_back (NodeWeakPtr &&value) |
Appends a value to the end of internal storage. More... | |
void | setValue (size_t index, const NodeWeakPtr &value) |
Sets a value to the internal storage index. More... | |
size_t | size () const |
Tells the number of elements in the range. More... | |
Public Member Functions inherited from kanzi::AbstractIndexedRange | |
PropertyObjectSharedPtr | getPropertyObjectByIndex (size_t index) |
Gets a property object by index. More... | |
bool | getPropertyValueByIndex (size_t index, AbstractPropertyType propertyType, Variant &value) |
Access a property in a property object at an index. More... | |
size_t | getSize () |
Gets the size of the indexed range. More... | |
bool | getValueByIndex (size_t index, Variant &value) |
Reads a value by index and writes it to a variant. More... | |
Public Member Functions inherited from kanzi::AbstractRange | |
bool | adaptView (AbstractRange &potentialViewRange, size_t length) |
Attempts to reuse a view over this range. More... | |
AbstractRangeIterator | beginIteration () |
Gets an iterator to the beginning of this range. More... | |
AbstractRangeSharedPtr | createView (size_t length) |
Creates a view over this range. More... | |
AbstractRangeSharedPtr | evaluate () |
Evaluate the abstract range. More... | |
AbstractRangeLocationPtr | locationBegin () |
Gets an iteratable location to beginning of the range. More... | |
virtual | ~AbstractRange ()=default |
Destructor. More... | |
Static Public Member Functions | |
static NodeListSharedPtr | create () |
Create a node list. More... | |
Static Public Member Functions inherited from kanzi::TypedValueRange< NodeWeakPtr > | |
static shared_ptr< TypedValueRange > | create () |
Creates a new typed value range. More... | |
Protected Attributes | |
DiffNodeContainer | m_addedNodes |
List of added nodes that became a part of the list. More... | |
bool | m_dirty |
Was the node list dirty (changed in any way)? More... | |
DiffNodeContainer | m_removedNodes |
List of removed nodes no longer part of the list. More... | |
Protected Attributes inherited from kanzi::TypedValueRange< NodeWeakPtr > | |
vector< NodeWeakPtr > | m_values |
Container for single type of value. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from kanzi::TypedValueRange< NodeWeakPtr > | |
PropertyObjectSharedPtr | getPropertyObjectByIndexOverride (size_t index) override |
AbstractIndexedRange::getPropertyObjectByIndexOverride() implementation. More... | |
bool | getPropertyValueByIndexOverride (size_t index, AbstractPropertyType propertyType, Variant &value) override |
AbstractIndexedRange::getPropertyValueByIndexOverride() implementation. More... | |
size_t | getSizeOverride () override |
AbstractIndexedRange::getSizeOverride() implementation. More... | |
bool | getValueByIndexOverride (size_t index, Variant &value) override |
AbstractIndexedRange::getValueByIndexeOverride() implementation. More... | |
AbstractRangeLocationPtr | locationBeginOverride () override |
AbstractRange::locationBeginOverride() implementation. More... | |
TypedValueRange ()=default | |
Default constructor. More... | |
Protected Member Functions inherited from kanzi::AbstractIndexedRange | |
bool | adaptViewOverride (AbstractRange &potentialViewRange, size_t length) override |
AbstractRange::adaptViewOverride() implementation. More... | |
AbstractRangeSharedPtr | createViewOverride (size_t length) override |
AbstractRange::createViewOverride() implementation. More... | |
Protected Member Functions inherited from kanzi::AbstractRange | |
AbstractRange ()=default | |
Constructor. More... | |
virtual AbstractRangeSharedPtr | evaluateOverride () |
Implementation-dependent evaluation of the range. More... | |
NodeList is a container that works as input and output node listing for filtering and rendering.
Main usage points are:
Viewport2D contains a root NodeListRenderPass used as input for other node list or draw objects render passes. It is used if no specific input NodeListRenderPass is defined.
using kanzi::NodeList::DiffNodeContainer = flat_set<NodeWeakPtr, owner_less<NodeWeakPtr> > |
Container type for added or removed nodes.
|
static |
Create a node list.
void kanzi::NodeList::clear | ( | ) |
Clear the node list.
iterator kanzi::NodeList::filterPassBegin | ( | ) |
Begins the extract or filtering pass.
During the pass, the node list is assumed to be in the same state as on the last pass. Inconsistencies during insertion alter the internal state for removed nodes and mark the list dirty. The user must call insert() to insert a node into the node list into the current iterator location. The cycle must be manually ended when the iteration stops.
void kanzi::NodeList::filterPassEnd | ( | iterator | lastLocation | ) |
Ends the extract or filtering pass.
lastLocation | Last location returned from insert(). |
iterator kanzi::NodeList::insert | ( | iterator | insertLocation, |
NodeSharedPtr | node | ||
) |
Insert new node into the end of the list.
insertLocation | Location to insert to, must come from an earlier call to insert() or filterPassBegin(). |
node | Node to insert. |
void kanzi::NodeList::copyListData | ( | const NodeList & | other | ) |
Assign contents from another node list.
Dirty flag is set.
other | Source node list. |
|
inline |
Returns an iterator to the beginning of the added nodes list.
|
inline |
Returns an iterator to the beginning of the added nodes list.
|
inline |
Returns an iterator to the beginning of the removed nodes list.
|
inline |
Returns an iterator to the beginning of the removed nodes list.
|
inline |
Indicates whether the node list is dirty, i.e.
has changed in any way.
|
inline |
Sets the dirty flag in the node list.
flag | New dirty flag state. |
|
protected |
List of added nodes that became a part of the list.
|
protected |
List of removed nodes no longer part of the list.
|
protected |
Was the node list dirty (changed in any way)?