Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
IEdge.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
18
22#include <string>
23
24namespace shamrock::solvergraph {
25
26 class INode;
27
28 class IEdge : public IFreeable {
29
33
34 public:
35 IEdge() = default;
36
37 IEdge(const IEdge &) = delete;
38 IEdge &operator=(const IEdge &) = delete;
39
42 IEdge(IEdge &&) noexcept = default;
43 IEdge &operator=(IEdge &&) noexcept = default;
44
45 inline std::string get_label() const { return _impl_get_dot_label(); }
46 inline std::string get_tex_symbol() const { return _impl_get_tex_symbol(); }
47
48 virtual std::string _impl_get_dot_label() const = 0;
49 virtual std::string _impl_get_tex_symbol() const = 0;
50
52 inline u64 get_uuid() const { return tracker.get_uuid(); }
53
54 inline virtual ~IEdge() {}
55 };
56
57} // namespace shamrock::solvergraph
Callback API to track the lifetime, state updates and operations of solvergraph objects.
std::uint64_t u64
64 bit unsigned integer
u64 get_uuid() const
Get the UUID of the edge.
Definition IEdge.hpp:52
IEdge(IEdge &&) noexcept=default
would duplicate the uuid
IEdge & operator=(const IEdge &)=delete
would duplicate the uuid
Interface for data edges that can free their allocated memory.
Definition IFreeable.hpp:28
Inode is node between data edges, takes multiple inputs, multiple outputs.
Definition INode.hpp:31
Tracks the lifetime of an object of type T and notifies observers through static callbacks.