Loading...
Searching...
No Matches
interfaces.hh
Go to the documentation of this file.
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file AUTHORS.md
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
#ifndef DUNE_FUNCTIONS_COMMON_INTERFACES_HH
#define DUNE_FUNCTIONS_COMMON_INTERFACES_HH
#include <type_traits>
namespace Dune {
namespace Functions {
template<class Interface>
class PolymorphicType
{
public:
virtual ~PolymorphicType()
{}
virtual Interface* clone() const = 0;
virtual Interface* clone(void* buffer) const = 0;
virtual Interface* move(void* buffer) = 0;
};
}} // namespace Dune::Functions
#endif // DUNE_FUNCTIONS_COMMON_EXTENDED_CLONEABLE_HH
Dune
Definition monomialset.hh:19
Dune::Functions
Definition monomialset.hh:19
Dune::Functions::PolymorphicType
Base class with polymorphic type boiler plate code.
Definition interfaces.hh:29
Dune::Functions::PolymorphicType::clone
virtual Interface * clone(void *buffer) const =0
Clones the object into buffer.
Dune::Functions::PolymorphicType::clone
virtual Interface * clone() const =0
Clones the object.
Dune::Functions::PolymorphicType::move
virtual Interface * move(void *buffer)=0
Move object into buffer.
Dune::Functions::PolymorphicType::~PolymorphicType
virtual ~PolymorphicType()
Destructor.
Definition interfaces.hh:33