DUNE-FUNCTIONS (unstable)

interfaces.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3
4// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file AUTHORS.md
5// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
6
7#ifndef DUNE_FUNCTIONS_COMMON_INTERFACES_HH
8#define DUNE_FUNCTIONS_COMMON_INTERFACES_HH
9
10#include <type_traits>
11
12
13namespace Dune {
14namespace Functions {
15
16
17
27template<class Interface>
29{
30public:
31
34 {}
35
44 virtual Interface* clone() const = 0;
45
55 virtual Interface* clone(void* buffer) const = 0;
56
66 virtual Interface* move(void* buffer) = 0;
67};
68
69
70
71}} // namespace Dune::Functions
72
73#endif // DUNE_FUNCTIONS_COMMON_EXTENDED_CLONEABLE_HH
Base class with polymorphic type boiler plate code.
Definition: interfaces.hh:29
virtual Interface * clone(void *buffer) const =0
Clones the object into buffer.
virtual Interface * clone() const =0
Clones the object.
virtual Interface * move(void *buffer)=0
Move object into buffer.
virtual ~PolymorphicType()
Destructor.
Definition: interfaces.hh:33
Definition: polynomial.hh:17
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Aug 13, 22:30, 2024)