dune-typetree  2.6-rc1
leafnode.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 
4 #ifndef DUNE_TYPETREE_LEAFNODE_HH
5 #define DUNE_TYPETREE_LEAFNODE_HH
6 
8 #include <cstddef>
9 
10 namespace Dune {
11  namespace TypeTree {
12 
24  class LeafNode
25  {
26 
27  public:
28 
30  static const bool isLeaf = true;
31 
33  static const bool isPower = false;
34 
36  static const bool isComposite = false;
37 
39  static const std::size_t CHILDREN = 0;
40 
43 
44  static constexpr std::size_t degree()
45  {
46  return 0;
47  }
48 
49  protected:
50 
52 
57  LeafNode() {}
58  };
59 
61 
62  } // namespace TypeTree
63 } //namespace Dune
64 
65 #endif // DUNE_TYPETREE_POWERNODE_HH
static const std::size_t CHILDREN
Leafs have no children.
Definition: leafnode.hh:39
static const bool isLeaf
Mark this class as a leaf in a dune-typetree.
Definition: leafnode.hh:30
Definition: accumulate_static.hh:13
static const bool isPower
Mark this class as a non power in the dune-typetree.
Definition: leafnode.hh:33
static const bool isComposite
Mark this class as a non composite in the dune-typetree.
Definition: leafnode.hh:36
Tag designating a leaf node.
Definition: nodetags.hh:16
LeafNode()
Default constructor.
Definition: leafnode.hh:57
Base class for leaf nodes in a dune-typetree.
Definition: leafnode.hh:24
LeafNodeTag NodeTag
The type tag that describes a LeafNode.
Definition: leafnode.hh:42
static constexpr std::size_t degree()
Definition: leafnode.hh:44