Kanzi 3.9.10
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
 Container type for added or removed nodes.
 
- Public Types inherited from kanzi::TypedValueRange< NodeWeakPtr >
using const_iterator
 Const iterator type for values.
 
using iterator
 Iterator type for values.
 

Public Member Functions

DiffNodeContainer::const_iterator beginAddedNodes () const
 Returns an iterator to the beginning of the added nodes list.
 
DiffNodeContainer::const_iterator beginRemovedNodes () const
 Returns an iterator to the beginning of the removed nodes list.
 
void clear ()
 Clear the node list.
 
void copyListData (const NodeList &other)
 Assign contents from another node list.
 
DiffNodeContainer::const_iterator endAddedNodes () const
 Returns an iterator to the beginning of the added nodes list.
 
DiffNodeContainer::const_iterator endRemovedNodes () const
 Returns an iterator to the beginning of the removed nodes list.
 
iterator filterPassBegin ()
 Begins the extract or filtering pass.
 
void filterPassEnd (iterator lastLocation)
 Ends the extract or filtering pass.
 
iterator insert (iterator insertLocation, NodeSharedPtr node)
 Insert new node into the end of the list.
 
bool isDirty () const
 Indicates whether the node list is dirty, i.e.
 
void setDirty (bool flag)
 Sets the dirty flag in the node list.
 
- Public Member Functions inherited from kanzi::TypedValueRange< NodeWeakPtr >
iterator begin ()
 Gets an iterator to the beginning of the range.
 
const_iterator begin () const
 Gets an iterator to the beginning of the range.
 
const_iterator cbegin () const
 Gets an iterator to the beginning of the range.
 
const_iterator cend () const
 Gets an iterator to the end of the range.
 
void clear ()
 Clears all values from internal storage.
 
iterator end ()
 Gets an iterator to the end of the range.
 
const_iterator end () const
 Gets an iterator to the end of the range.
 
vector< NodeWeakPtr >::reference operator[] (size_t index)
 Access operator.
 
vector< NodeWeakPtr >::const_reference operator[] (size_t index) const
 Const access operator.
 
void push_back (const NodeWeakPtr &value)
 Appends a value to the end of internal storage.
 
void push_back (NodeWeakPtr &&value)
 Appends a value to the end of internal storage.
 
void setValue (size_t index, const NodeWeakPtr &value)
 Sets a value to the internal storage index.
 
size_t size () const
 Tells the number of elements in the range.
 
- Public Member Functions inherited from kanzi::AbstractIndexedRange
PropertyObjectSharedPtr getPropertyObjectByIndex (size_t index)
 Gets a property object by index.
 
bool getPropertyValueByIndex (size_t index, AbstractPropertyType propertyType, Variant &value)
 Access a property in a property object at an index.
 
size_t getSize ()
 Gets the size of the indexed range.
 
bool getValueByIndex (size_t index, Variant &value)
 Reads a value by index and writes it to a variant.
 
- Public Member Functions inherited from kanzi::AbstractRange
bool adaptView (AbstractRange &potentialViewRange, size_t length)
 Attempts to reuse a view over this range.
 
AbstractRangeIterator beginIteration ()
 Gets an iterator to the beginning of this range.
 
AbstractRangeSharedPtr createView (size_t length)
 Creates a view over this range.
 
AbstractRangeSharedPtr evaluate ()
 Evaluate the abstract range.
 
AbstractRangeLocationPtr locationBegin ()
 Gets an iteratable location to beginning of the range.
 
virtual ~AbstractRange ()=default
 Destructor.
 

Static Public Member Functions

static NodeListSharedPtr create ()
 Create a node list.
 
- Static Public Member Functions inherited from kanzi::TypedValueRange< NodeWeakPtr >
static shared_ptr< TypedValueRangecreate ()
 Creates a new typed value range.
 

Protected Attributes

DiffNodeContainer m_addedNodes
 List of added nodes that became a part of the list.
 
bool m_dirty
 Was the node list dirty (changed in any way)?
 
DiffNodeContainer m_removedNodes
 List of removed nodes no longer part of the list.
 
- Protected Attributes inherited from kanzi::TypedValueRange< NodeWeakPtr >
vector< NodeWeakPtrm_values
 Container for single type of value.
 

Additional Inherited Members

- Protected Member Functions inherited from kanzi::TypedValueRange< NodeWeakPtr >
PropertyObjectSharedPtr getPropertyObjectByIndexOverride (size_t index) override
 AbstractIndexedRange::getPropertyObjectByIndexOverride() implementation.
 
bool getPropertyValueByIndexOverride (size_t index, AbstractPropertyType propertyType, Variant &value) override
 AbstractIndexedRange::getPropertyValueByIndexOverride() implementation.
 
size_t getSizeOverride () override
 AbstractIndexedRange::getSizeOverride() implementation.
 
bool getValueByIndexOverride (size_t index, Variant &value) override
 AbstractIndexedRange::getValueByIndexOverride() implementation.
 
AbstractRangeLocationPtr locationBeginOverride () override
 AbstractRange::locationBeginOverride() implementation.
 
 TypedValueRange ()=default
 Default constructor.
 
- Protected Member Functions inherited from kanzi::AbstractIndexedRange
bool adaptViewOverride (AbstractRange &potentialViewRange, size_t length) override
 AbstractRange::adaptViewOverride() implementation.
 
AbstractRangeSharedPtr createViewOverride (size_t length) override
 AbstractRange::createViewOverride() implementation.
 
- Protected Member Functions inherited from kanzi::AbstractRange
 AbstractRange ()=default
 Constructor.
 
virtual AbstractRangeSharedPtr evaluateOverride ()
 Implementation-dependent evaluation of the range.
 

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

◆ DiffNodeContainer

Container type for added or removed nodes.

Member Function Documentation

◆ create()

static NodeListSharedPtr kanzi::NodeList::create ( )
static

Create a node list.

◆ clear()

void kanzi::NodeList::clear ( )

Clear the node list.

◆ filterPassBegin()

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.

◆ filterPassEnd()

void kanzi::NodeList::filterPassEnd ( iterator lastLocation)

Ends the extract or filtering pass.

Parameters
lastLocationLast location returned from insert().

◆ 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.

◆ copyListData()

void kanzi::NodeList::copyListData ( const NodeList & other)

Assign contents from another node list.

Dirty flag is set.

Parameters
otherSource node list.

◆ beginAddedNodes()

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.

◆ endAddedNodes()

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.

◆ beginRemovedNodes()

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.

◆ endRemovedNodes()

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.

◆ isDirty()

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.

◆ setDirty()

void kanzi::NodeList::setDirty ( bool flag)
inline

Sets the dirty flag in the node list.

Parameters
flagNew dirty flag state.

Member Data Documentation

◆ m_addedNodes

DiffNodeContainer kanzi::NodeList::m_addedNodes
protected

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

◆ m_removedNodes

DiffNodeContainer kanzi::NodeList::m_removedNodes
protected

List of removed nodes no longer part of the list.

◆ m_dirty

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: