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_IMPL_H
8
#define GRAPHDOM_VERTEX_BASE_HANDLE_IMPL_H
9
10
#include "../../graph.h"
11
#include "../vertex_container.h"
12
#include "../vertex_base_handle.h"
13
14
template
<
typename
VertexType>
15
template
<
typename
VertexContainerPo
int
erType>
16
graphdom::graph<VertexType>::vertex_base_handle<VertexContainerPointerType>::vertex_base_handle(
17
const
graph<VertexType>* vertex_container_owner_ptr,
18
const
graph_edges_type vertex_container_owner_et,
19
const
VertexContainerPointerType vertex_container_ptr ) :
20
vertex_container_owner_graph_pointer(vertex_container_owner_ptr),
21
vertex_container_owner_graph_edges_type(vertex_container_owner_et),
22
vertex_container_pointer(vertex_container_ptr) {}
23
24
template
<
typename
VertexType>
25
template
<
typename
VertexContainerPo
int
erType>
26
constexpr
auto
& graphdom::graph<VertexType>::vertex_base_handle<VertexContainerPointerType>::operator*()
const
{
27
return
vertex_container_pointer->vertex;
28
}
29
30
template
<
typename
VertexType>
31
template
<
typename
VertexContainerPo
int
erType>
32
constexpr
auto
* graphdom::graph<VertexType>::vertex_base_handle<VertexContainerPointerType>::operator->()
const
{
33
return
&( vertex_container_pointer->vertex );
34
}
35
36
template
<
typename
VertexType>
37
template
<
typename
VertexContainerPo
int
erType>
38
template
<
typename
K>
39
constexpr
bool
graphdom::graph<VertexType>::vertex_base_handle<VertexContainerPointerType>::operator==(
40
const
vertex_base_handle<K>& other_handle)
const
{
41
return
this->vertex_container_pointer == other_handle.vertex_container_pointer;
42
}
43
44
template
<
typename
VertexType>
45
template
<
typename
VertexContainerPo
int
erType>
46
template
<
typename
K>
47
constexpr
bool
graphdom::graph<VertexType>::vertex_base_handle<VertexContainerPointerType>::operator!=(
48
const
vertex_base_handle<K>& other_handle)
const
{
49
return
this->vertex_container_pointer != other_handle.vertex_container_pointer;
50
}
51
52
#endif
//GRAPHDOM_VERTEX_BASE_HANDLE_IMPL_H
include
graphdom
detail
impl
vertex_base_handle.h
Generated by
1.17.0