GraphDom
Toggle main menu visibility
Loading...
Searching...
No Matches
vertex_base_handle.h
1
/*
2
* Copyright 2026 Michele Comparini
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef GRAPHDOM_VERTEX_BASE_HANDLE_H
8
#define GRAPHDOM_VERTEX_BASE_HANDLE_H
9
10
#include <type_traits>
11
12
#include "../graph.h"
13
#include "vertex_container.h"
14
15
namespace
graphdom
{
16
template
<
typename
VertexType>
17
template
<
typename
VertexContainerPo
int
erType>
18
class
graph
<VertexType>::vertex_base_handle {
19
public
:
20
static_assert
(
21
std::is_same< VertexContainerPointerType , graph<VertexType>::vertex_container* >::value ||
22
std::is_same< VertexContainerPointerType , const graph<VertexType>::vertex_container* >::value
23
,
24
"The typename 'VertexContainerPointerType' of 'graphdom::graph<VertexType>::vertex_base_handle<VertexContainerPointerType>' class must be a pointer to graphdom::graph<VertexType>::vertex_container"
25
);
26
27
vertex_base_handle() =
delete
;
28
29
~vertex_base_handle() =
default
;
30
39
[[nodiscard]]
constexpr
auto
* operator->()
const
;
48
[[nodiscard]]
constexpr
auto
& operator*()
const
;
59
template
<
typename
K>
60
[[nodiscard]]
constexpr
bool
operator==(
const
vertex_base_handle<K>& other_handle)
const
;
69
template
<
typename
K>
70
[[nodiscard]]
constexpr
bool
operator!=(
const
vertex_base_handle<K>& other_handle)
const
;
71
72
template
<
typename
>
73
friend
class
graph<VertexType>::vertex_base_handle;
74
protected
:
75
vertex_base_handle(const vertex_base_handle&) = default;
76
vertex_base_handle(
77
const graph<VertexType>* vertex_container_owner_ptr,
78
graph_edges_type vertex_container_owner_et,
79
VertexContainerPointerType vertex_container_ptr
80
);
81
82
const graph<VertexType>* vertex_container_owner_graph_pointer;
83
graph_edges_type vertex_container_owner_graph_edges_type;
84
VertexContainerPointerType vertex_container_pointer;
85
};
86
}
87
88
#include "impl/vertex_base_handle.h"
89
90
#endif
//GRAPHDOM_VERTEX_BASE_HANDLE_H
graphdom::graph
Every graph created using this library is an instance of a concrete class publicly derived,...
Definition
graph.h:43
graphdom
Definition
adj_list.h:16
include
graphdom
detail
vertex_base_handle.h
Generated by
1.17.0