Construct version 5.4.3
An agent based modeling framework
typeless_graph_iterator Struct Reference

Parent class for Graph's iterators. More...

Inheritance diagram for typeless_graph_iterator:

Public Member Functions

 typeless_graph_iterator (unsigned int row=0, unsigned int col=0, void *ptr=NULL)
 
unsigned int row (void) const noexcept
 The row index this iterator is pointing to.
 
unsigned int col (void) const noexcept
 The column index this iterator is pointing to.
 
virtual unsigned int index () const noexcept
 Depending on implementation, returns either row or col. More...
 
virtual unsigned int max () const noexcept
 Returns the maximum value that Construct can return. More...
 
virtual const typeless_graph_iteratoroperator++ (void) const
 Depending on implementation, increments the iterator to point to the next relevant element. More...
 

Public Attributes

void * _ptr
 
unsigned int _row
 
unsigned int _col
 

Detailed Description

Parent class for Graph's iterators.

By having Graph's iterators inheiret from this parent class, we can compare and operate different types of iterators. This allows for the creation of an end iterator without allocating the associated pointers. It also allows for iterators to be added a data structure for alignment such as in graph_utils::it_align.

Member Function Documentation

◆ index()

unsigned int typeless_graph_iterator::index ( void  ) const
virtualnoexcept

Depending on implementation, returns either row or col.

Reimplemented in graph_utils::row_graph_iterator< link_type >, and graph_utils::col_graph_iterator< link_type >.

◆ max()

unsigned int typeless_graph_iterator::max ( void  ) const
virtualnoexcept

Returns the maximum value that Construct can return.

Reimplemented in graph_utils::row_graph_iterator< link_type >, and graph_utils::col_graph_iterator< link_type >.

◆ operator++()

const typeless_graph_iterator & typeless_graph_iterator::operator++ ( void  ) const
virtual

Member Data Documentation

◆ _col

unsigned int typeless_graph_iterator::_col
mutable

summary>

◆ _ptr

void* typeless_graph_iterator::_ptr
mutable

summary>

◆ _row

unsigned int typeless_graph_iterator::_row
mutable

summary>