dune-typetree 2.10
Loading...
Searching...
No Matches
traversal.hh File Reference
#include <utility>
#include <dune/common/hybridutilities.hh>
#include <dune/common/std/type_traits.hh>
#include <dune/typetree/childextraction.hh>
#include <dune/typetree/nodetags.hh>
#include <dune/typetree/treepath.hh>
#include <dune/typetree/visitor.hh>

Go to the source code of this file.

Namespaces

namespace  Dune
namespace  Dune::TypeTree
namespace  Dune::TypeTree::Detail

Typedefs

template<class Tree>
using Dune::TypeTree::Detail::DynamicTraversalConcept
template<class Tree>
using Dune::TypeTree::Detail::StaticTraversalConcept

Functions

template<class Tree, TreePathType::Type pathType, class Prefix, std::enable_if_t< Tree::isLeaf, int > = 0>
constexpr auto Dune::TypeTree::Detail::leafTreePathTuple (Prefix prefix)
template<class Tree, TreePathType::Type pathType, class Prefix, std::enable_if_t< not Tree::isLeaf, int > = 0>
constexpr auto Dune::TypeTree::Detail::leafTreePathTuple (Prefix prefix)
template<class Tree, TreePathType::Type pathType, class Prefix, std::size_t... indices, std::enable_if_t<(Tree::isComposite or(Tree::isPower and(pathType!=TreePathType::dynamic))), int > = 0>
constexpr auto Dune::TypeTree::Detail::leafTreePathTuple (Prefix prefix, std::index_sequence< indices... >)
template<class Tree, TreePathType::Type pathType, class Prefix, std::size_t... indices, std::enable_if_t<(Tree::isPower and(pathType==TreePathType::dynamic)), int > = 0>
constexpr auto Dune::TypeTree::Detail::leafTreePathTuple (Prefix prefix, std::index_sequence< indices... >)
template<class T, class TreePath, class V, std::enable_if_t< std::decay_t< T >::isLeaf, int > = 0>
void Dune::TypeTree::Detail::applyToTree (T &&tree, TreePath treePath, V &&visitor)
template<class T, class TreePath, class V, std::enable_if_t< not std::decay_t< T >::isLeaf, int > = 0>
void Dune::TypeTree::Detail::applyToTree (T &&tree, TreePath treePath, V &&visitor)
template<class T, class TreePath, class PreFunc, class LeafFunc, class PostFunc>
void Dune::TypeTree::Detail::forEachNode (T &&tree, TreePath treePath, PreFunc &&preFunc, LeafFunc &&leafFunc, PostFunc &&postFunc)
template<class Tree, TreePathType::Type pathType = TreePathType::dynamic>
constexpr auto Dune::TypeTree::leafTreePathTuple ()
 Create tuple of tree paths to leafs.
template<typename Tree, typename Visitor>
void Dune::TypeTree::applyToTree (Tree &&tree, Visitor &&visitor)
 Apply visitor to TypeTree.
template<class Tree, class NodeFunc>
void Dune::TypeTree::forEachNode (Tree &&tree, NodeFunc &&nodeFunc)
 Traverse tree and visit each node.
template<class Tree, class LeafFunc>
void Dune::TypeTree::forEachLeafNode (Tree &&tree, LeafFunc &&leafFunc)
 Traverse tree and visit each leaf node.