dune-functions 2.9.0
interfaces.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_FUNCTIONS_COMMON_INTERFACES_HH
4#define DUNE_FUNCTIONS_COMMON_INTERFACES_HH
5
6#include <type_traits>
7
8
9namespace Dune {
10namespace Functions {
11
12
13
23template<class Interface>
25{
26public:
27
30 {}
31
40 virtual Interface* clone() const = 0;
41
51 virtual Interface* clone(void* buffer) const = 0;
52
62 virtual Interface* move(void* buffer) = 0;
63};
64
65
66
67}} // namespace Dune::Functions
68
69#endif // DUNE_FUNCTIONS_COMMON_EXTENDED_CLONEABLE_HH
Definition: polynomial.hh:10
Base class with polymorphic type boiler plate code.
Definition: interfaces.hh:25
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:29