GraphDom
Loading...
Searching...
No Matches
vertex_handle.h
1/*
2 * Copyright 2026 Michele Comparini
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef GRAPHDOM_VERTEX_HANDLE_H
8#define GRAPHDOM_VERTEX_HANDLE_H
9
10#include "../graph.h"
11#include "vertex_container.h"
12#include "vertex_base_handle.h"
13#include "../multiset_graph.h"
14#include "multiset_graph_vertex_handle.h"
15
16namespace graphdom {
31 template <typename VertexType>
32 class graph<VertexType>::vertex_handle final : public graph<VertexType>::vertex_base_handle< const graph<VertexType>::vertex_container* > {
33 public:
34 vertex_handle() = delete;
43 vertex_handle(const vertex_handle& other);
52 vertex_handle(const typename multiset_graph<VertexType>::vertex_handle& other);
53
54 ~vertex_handle() = default;
55
63 explicit operator typename multiset_graph<VertexType>::vertex_handle() const;
64
65 vertex_handle& operator=(const vertex_handle& other);
66
67 [[nodiscard]] graph<VertexType>::adj_list adj_list() const;
68 [[nodiscard]] graph<VertexType>::adj_list adj_list(edge_type edge_type) const;
69 [[nodiscard]] graph<VertexType>::const_adj_list const_adj_list() const;
70 [[nodiscard]] graph<VertexType>::const_adj_list const_adj_list(edge_type edge_type) const;
71
75 friend typename graph<VertexType>::adj_list_iterator;
76 friend graph<VertexType>;
78 private:
79 vertex_handle(
80 const graph<VertexType>* vertex_container_owner_ptr,
81 graph<VertexType>::graph_edges_type vertex_container_owner_et,
82 const graph<VertexType>::vertex_container* vertex_container_ptr
83 );
84 };
85}
86
87#include "impl/vertex_handle.h"
88
89#endif //GRAPHDOM_VERTEX_HANDLE_H
Every valid instance of this class is a "container-like and non-owning" handle to a subset of the set...
Definition adj_list.h:32
Every valid instance of this class is a "container-like and non-owning" handle to a subset of the set...
Definition const_adj_list.h:35
Every valid instance of this class can be used to identify a specific vertex of a graph and to access...
Definition vertex_const_handle.h:35
vertex_handle(const vertex_handle &other)
Every graph created using this library is an instance of a concrete class publicly derived,...
Definition graph.h:43
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
Definition adj_list.h:16
edge_type
The enumerated type whose values represent the two types of edges of a graph.
Definition graph.h:21