7#ifndef GRAPHDOM_MULTISET_GRAPH_ADJ_LIST_ITERATOR_IMPL_H
8#define GRAPHDOM_MULTISET_GRAPH_ADJ_LIST_ITERATOR_IMPL_H
10#include "../../graph.h"
11#include "../adj_list_base_iterator.h"
12#include "../adj_list_iterator.h"
13#include "../../multiset_graph.h"
14#include "../multiset_graph_adj_list_iterator.h"
16template<
typename VertexType>
17graphdom::multiset_graph<VertexType>::adj_list_iterator::adj_list_iterator(
const adj_list_iterator& other) :
18graphdom::graph<VertexType>::template adj_list_base_iterator< typename graph<VertexType>::vertex_container* >( other ){}
20template<
typename VertexType>
21graphdom::multiset_graph<VertexType>::adj_list_iterator::adj_list_iterator(
const typename graph<VertexType>::adj_list_iterator& other) :
22graphdom::graph<VertexType>::template adj_list_base_iterator< typename graph<VertexType>::vertex_container* >(
23 other.iterator_owner_graph,
24 other.iterator_owner_graph_edges_type,
25 static_cast< typename graph<VertexType>::vertex_container* >( nullptr ),
26 other.edges_type_restriction,
27 other.inner_iterator_edge_current_type
30 throw std::runtime_error(
"Convertion error");
32 this->edge_begin_point_vertex_container =
const_cast< typename graph<VertexType>::vertex_container*
>( other.edge_begin_point_vertex_container );
33 this->inner_iterator = other.inner_iterator;
36template<
typename VertexType>
41template<
typename VertexType>
42typename graphdom::multiset_graph<VertexType>::vertex_handle graphdom::multiset_graph<VertexType>::adj_list_iterator::operator*()
const {
43 return graphdom::multiset_graph<VertexType>::vertex_handle(
44 this->iterator_owner_graph,
45 this->iterator_owner_graph_edges_type,
46 ( *( std::get<
typename graphdom::graph<VertexType>::template adj_set<
typename graphdom::graph<VertexType>::vertex_container*>::iterator >( this->inner_iterator ) ) )->vertex_container_ptr
50template<
typename VertexType>
51typename graphdom::multiset_graph<VertexType>::adj_list_iterator& graphdom::multiset_graph<VertexType>::adj_list_iterator::operator=(
const adj_list_iterator& other) {
52 if (
this != &other ) {
53 this->iterator_owner_graph = other.iterator_owner_graph;
54 this->iterator_owner_graph_edges_type = other.iterator_owner_graph_edges_type;
55 this->edge_begin_point_vertex_container = other.edge_begin_point_vertex_container;
56 this->edges_type_restriction = other.edges_type_restriction;
57 this->inner_iterator_edge_current_type = other.inner_iterator_edge_current_type;
58 this->inner_iterator = other.inner_iterator;
63template<
typename VertexType>
64typename graphdom::multiset_graph<VertexType>::adj_list_iterator& graphdom::multiset_graph<VertexType>::adj_list_iterator::operator++() {
65 this->internal_single_increment();
69template<
typename VertexType>
70typename graphdom::multiset_graph<VertexType>::adj_list_iterator graphdom::multiset_graph<VertexType>::adj_list_iterator::operator++(
int) {
71 auto to_return = *
this;
76template<
typename VertexType>
77graphdom::multiset_graph<VertexType>::adj_list_iterator::adj_list_iterator(
const typename graph<VertexType>::template adj_list_base_iterator<
typename graph<VertexType>::vertex_container*>& other) :
78graphdom::graph<VertexType>::template adj_list_base_iterator< typename graph<VertexType>::vertex_container* >( other ){}
80template<
typename VertexType>
81graphdom::multiset_graph<VertexType>::adj_list_iterator::adj_list_iterator(
82 const graph<VertexType>*
const iterator_owner_pointer,
83 const typename graph<VertexType>::graph_edges_type iterator_owner_graph_edges_type,
84 typename graph<VertexType>::vertex_container*
const edge_begin_point_vertex_container,
85 const typename graph<VertexType>::edges_type_selection_type edges_type_restriction,
87graphdom::graph<VertexType>::template adj_list_base_iterator< typename graph<VertexType>::vertex_container* >(
88 iterator_owner_pointer,
89 iterator_owner_graph_edges_type,
90 edge_begin_point_vertex_container,
91 edges_type_restriction,
92 inner_iterator_edge_current_type
95template<
typename VertexType>
96graphdom::multiset_graph<VertexType>::adj_list_iterator::adj_list_iterator(
97 const graph<VertexType> *iterator_owner_pointer,
98 const typename graph<VertexType>::graph_edges_type iterator_owner_graph_edges_type,
99 typename graph<VertexType>::vertex_container*
const edge_begin_point_vertex_container,
100 const typename graph<VertexType>::edges_type_selection_type edges_type_restriction,
102 const typename graph<VertexType>::template adj_set<
typename graph<VertexType>::vertex_container* >::iterator& inner_iterator) :
103graphdom::graph<VertexType>::template adj_list_base_iterator< typename graph<VertexType>::vertex_container* >(
104 iterator_owner_pointer,
105 iterator_owner_graph_edges_type,
106 edge_begin_point_vertex_container,
107 edges_type_restriction,
108 inner_iterator_edge_current_type,
Every valid instance of this class can be used to identify a specific vertex of a multiset graph and ...
Definition multiset_graph_vertex_handle.h:31
Every multiset graph created using this library is an instance of a concrete class publicly derived,...
Definition multiset_graph.h:19
edge_type
The enumerated type whose values represent the two types of edges of a graph.
Definition graph.h:21