Dune Core Modules (2.9.0)

leafnode.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 #ifndef DUNE_TYPETREE_LEAFNODE_HH
5 #define DUNE_TYPETREE_LEAFNODE_HH
6 
7 #include <dune/typetree/nodetags.hh>
8 #include <cstddef>
9 #include <type_traits>
10 
11 namespace Dune {
12  namespace TypeTree {
13 
25  class LeafNode
26  {
27 
28  public:
29 
31  static const bool isLeaf = true;
32 
34  static const bool isPower = false;
35 
37  static const bool isComposite = false;
38 
40  [[deprecated("Will be removed after release 2.9. Use degree()")]]
41  static const std::size_t CHILDREN = 0;
42 
45 
46  static constexpr auto degree()
47  {
48  return std::integral_constant<std::size_t,0>{};
49  }
50 
51  protected:
52 
54 
59  LeafNode() {}
60  };
61 
63 
64  } // namespace TypeTree
65 } //namespace Dune
66 
67 #endif // DUNE_TYPETREE_POWERNODE_HH
Base class for leaf nodes in a dune-typetree.
Definition: leafnode.hh:26
LeafNodeTag NodeTag
The type tag that describes a LeafNode.
Definition: leafnode.hh:44
static const bool isLeaf
Mark this class as a leaf in a dune-typetree.
Definition: leafnode.hh:31
static const std::size_t CHILDREN
Leafs have no children.
Definition: leafnode.hh:41
static const bool isPower
Mark this class as a non power in the dune-typetree.
Definition: leafnode.hh:34
LeafNode()
Default constructor.
Definition: leafnode.hh:59
static const bool isComposite
Mark this class as a non composite in the dune-typetree.
Definition: leafnode.hh:37
Dune namespace.
Definition: alignedallocator.hh:13
Tag designating a leaf node.
Definition: nodetags.hh:16
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 26, 22:29, 2024)