GraphDom
Loading...
Searching...
No Matches
base_adj_list.h
1/*
2 * Copyright 2026 Michele Comparini
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef GRAPHDOM_BASE_ADJ_LIST_H
8#define GRAPHDOM_BASE_ADJ_LIST_H
9
10#include "../graph.h"
11#include "adj_list_base_iterator.h"
12
13namespace graphdom {
14 template <typename VertexType>
15 template <typename VertexContainerPointerType>
16 class graph<VertexType>::base_adj_list {
17 public:
18 static_assert(
19 std::is_same< VertexContainerPointerType , graph<VertexType>::vertex_container* >::value ||
20 std::is_same< VertexContainerPointerType , const graph<VertexType>::vertex_container* >::value
21 ,
22 "The typename 'VertexContainerPointerType' of 'graphdom::graph<VertexType>::base_adj_list<VertexContainerPointerType>' class must be a pointer to graphdom::graph<VertexType>::vertex_container"
23 );
24
25 base_adj_list() = delete;
26
27 ~base_adj_list() = default;
28
29 base_adj_list& operator=(const base_adj_list&) = delete;
30 base_adj_list& operator=(base_adj_list&&) = delete;
31
33 template<typename>
34 friend class graph<VertexType>::base_adj_list;
36 protected:
37 base_adj_list(const base_adj_list&) = default;
38 base_adj_list(
39 const graph<VertexType>* adj_list_owner_graph_pointer,
40 graph_edges_type adj_list_owner_graph_edges_type,
41 VertexContainerPointerType adj_list_common_begin_point_vertex_container_pointer,
42 graph<VertexType>::edges_type_selection_type adj_list_edges_type_selection = none
43 );
44
45 template <typename K>
46 constexpr graph<VertexType>::adj_list_base_iterator<VertexContainerPointerType> internal_begin() const;
47
48 template <typename K>
49 constexpr graph<VertexType>::adj_list_base_iterator<VertexContainerPointerType> internal_end() const;
50
51 template <typename K>
52 constexpr graph<VertexType>::adj_set<K>* get_adj_set_if_accessible(graphdom::edge_type edge_type) const;
53
54 const graph<VertexType>* adj_list_owner_graph_pointer;
55 graph_edges_type adj_list_owner_graph_edges_type;
56 VertexContainerPointerType adj_list_common_begin_point_vertex_container_pointer;
57 edges_type_selection_type adj_list_edges_type_selection;
58 };
59}
60
61#include "impl/base_adj_list.h"
62
63#endif //GRAPHDOM_BASE_ADJ_LIST_H
Every graph created using this library is an instance of a concrete class publicly derived,...
Definition graph.h:43
Definition adj_list.h:16