Loading...
Searching...
No Matches
leafnode.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-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
#ifndef DUNE_TYPETREE_LEAFNODE_HH
#define DUNE_TYPETREE_LEAFNODE_HH
#include <dune/typetree/nodetags.hh>
#include <cstddef>
#include <type_traits>
namespace Dune {
namespace TypeTree {
class LeafNode
{
public:
static const bool isLeaf = true;
static const bool isPower = false;
static const bool isComposite = false;
typedef LeafNodeTag NodeTag;
static constexpr auto degree()
{
return std::integral_constant<std::size_t,0>{};
}
protected:
LeafNode() {}
};
} // namespace TypeTree
} //namespace Dune
#endif // DUNE_TYPETREE_POWERNODE_HH
nodetags.hh
Dune
Definition accumulate_static.hh:17
Dune::TypeTree
Definition accumulate_static.hh:18
Dune::TypeTree::LeafNode::NodeTag
LeafNodeTag NodeTag
The type tag that describes a LeafNode.
Definition leafnode.hh:42
Dune::TypeTree::LeafNode::isLeaf
static const bool isLeaf
Mark this class as a leaf in a dune-typetree.
Definition leafnode.hh:33
Dune::TypeTree::LeafNode::isPower
static const bool isPower
Mark this class as a non power in the dune-typetree.
Definition leafnode.hh:36
Dune::TypeTree::LeafNode::LeafNode
LeafNode()
Default constructor.
Definition leafnode.hh:57
Dune::TypeTree::LeafNode::isComposite
static const bool isComposite
Mark this class as a non composite in the dune-typetree.
Definition leafnode.hh:39
Dune::TypeTree::LeafNode::degree
static constexpr auto degree()
Definition leafnode.hh:44
Dune::TypeTree::LeafNodeTag
Tag designating a leaf node.
Definition nodetags.hh:18