Kanzi  3.9.7
Kanzi Engine API
kanzi::NodeList Class Reference

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>

Inheritance diagram for kanzi::NodeList:
[legend]

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< TypedValueRangecreate ()
 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< NodeWeakPtrm_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...
 

Detailed Description

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.

Since
Kanzi 3.9.0

Member Typedef Documentation

Container type for added or removed nodes.

Member Function Documentation

static NodeListSharedPtr kanzi::NodeList::create ( )
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.

Parameters
lastLocationLast location returned from insert().
iterator kanzi::NodeList::insert ( iterator  insertLocation,
NodeSharedPtr  node 
)

Insert new node into the end of the list.

Parameters
insertLocationLocation to insert to, must come from an earlier call to insert() or filterPassBegin().
nodeNode to insert.
Returns
Next insert location.
void kanzi::NodeList::copyListData ( const NodeList other)

Assign contents from another node list.

Dirty flag is set.

Parameters
otherSource node list.
DiffNodeContainer::const_iterator kanzi::NodeList::beginAddedNodes ( ) const
inline

Returns an iterator to the beginning of the added nodes list.

Returns
Iterator to the beginning of added nodes.
DiffNodeContainer::const_iterator kanzi::NodeList::endAddedNodes ( ) const
inline

Returns an iterator to the beginning of the added nodes list.

Returns
Iterator to the beginning of added nodes.
DiffNodeContainer::const_iterator kanzi::NodeList::beginRemovedNodes ( ) const
inline

Returns an iterator to the beginning of the removed nodes list.

Returns
Iterator to the beginning of removed nodes.
DiffNodeContainer::const_iterator kanzi::NodeList::endRemovedNodes ( ) const
inline

Returns an iterator to the beginning of the removed nodes list.

Returns
Iterator to the beginning of removed nodes.
bool kanzi::NodeList::isDirty ( ) const
inline

Indicates whether the node list is dirty, i.e.

has changed in any way.

Returns
True if the list is in dirty state, false otherwise.
void kanzi::NodeList::setDirty ( bool  flag)
inline

Sets the dirty flag in the node list.

Parameters
flagNew dirty flag state.

Member Data Documentation

DiffNodeContainer kanzi::NodeList::m_addedNodes
protected

List of added nodes that became a part of the list.

DiffNodeContainer kanzi::NodeList::m_removedNodes
protected

List of removed nodes no longer part of the list.

bool kanzi::NodeList::m_dirty
protected

Was the node list dirty (changed in any way)?


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