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 const_iterator = NodeContainer::const_iterator
 Const iterator type. More...
 
using DiffNodeContainer = flat_set< NodeWeakPtr, owner_less< NodeWeakPtr > >
 Container type for added or removed nodes. More...
 
using iterator = NodeContainer::iterator
 Iterator type. More...
 
using NodeContainer = vector< NodeWeakPtr >
 Container type for Nodes. More...
 

Public Member Functions

iterator begin ()
 Returns an iterator to the beginning of the node list. More...
 
const_iterator begin () const
 Returns an iterator to the beginning of the node list. More...
 
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...
 
const_iterator cbegin () const
 Returns an iterator to the beginning of the node list. More...
 
const_iterator cend () const
 Returns an iterator to the end of the node list. More...
 
void clear ()
 Clear the node list. More...
 
void copyListData (const NodeList &other)
 Assign contents from another node list. More...
 
iterator end ()
 Returns an iterator to the end of the node list. More...
 
const_iterator end () const
 Returns an iterator to the end of the 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...
 
size_t size () const
 Tells the number of nodes in the list. More...
 

Static Public Member Functions

static NodeListSharedPtr create ()
 Create a node list render pass. 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...
 
NodeContainer m_nodes
 List of nodes after running the filter. More...
 
DiffNodeContainer m_removedNodes
 List of removed nodes no longer part of the list. 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 Nodes.

using kanzi::NodeList::iterator = NodeContainer::iterator

Iterator type.

using kanzi::NodeList::const_iterator = NodeContainer::const_iterator

Const iterator type.

Container type for added or removed nodes.

Member Function Documentation

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

Create a node list render pass.

Parameters
domainThe domain to use.
nameThe name for the render pass.
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 not modified.

Parameters
otherSource node list.
iterator kanzi::NodeList::begin ( )
inline

Returns an iterator to the beginning of the node list.

Returns
Iterator to the beginning.
const_iterator kanzi::NodeList::begin ( ) const
inline

Returns an iterator to the beginning of the node list.

Returns
Iterator to the beginning.
const_iterator kanzi::NodeList::cbegin ( ) const
inline

Returns an iterator to the beginning of the node list.

Returns
Iterator to the beginning.
iterator kanzi::NodeList::end ( )
inline

Returns an iterator to the end of the node list.

Returns
Iterator to the end.
const_iterator kanzi::NodeList::end ( ) const
inline

Returns an iterator to the end of the node list.

Returns
Iterator to the end.
const_iterator kanzi::NodeList::cend ( ) const
inline

Returns an iterator to the end of the node list.

Returns
Iterator to the end.
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.
size_t kanzi::NodeList::size ( ) const
inline

Tells the number of nodes in the list.

Returns
Node count.

Member Data Documentation

NodeContainer kanzi::NodeList::m_nodes
protected

List of nodes after running the filter.

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: