ROSE 0.11.145.141
Public Types | List of all members
Rose::metaprog::tree_traversal_factory_t< Predicate, Extract, Children >::preorder_depthfirst_t< RootTag > Struct Template Reference

Description

template<template< typename > class Predicate, template< typename > class Extract, template< typename > class Children>
template<typename RootTag>
struct Rose::metaprog::tree_traversal_factory_t< Predicate, Extract, Children >::preorder_depthfirst_t< RootTag >

Traverse a tree (pre-order, depth-first) and build a list of values.

Template Parameters
RootTag

Definition at line 201 of file metaprog.h.

#include <Rose/metaprog.h>

Public Types

using head = std::conditional_t< Predicate< RootTag >::value, List< typename Extract< RootTag >::type >, List<> >
 pseudo: head = Predicate<RootTag> ? List<Extract<RootTag>> : List<>;
 
using tail = typename Children< RootTag >::list::template map_ravel_t< preorder_depthfirst_t >
 pseudo: for (ChildTag: Children<RootTag>) tail += preorder_depthfirst_t<ChildTag>;
 
using list = typename head::template append_ravel< tail >
 pseudo: return head+tail;
 

Member Typedef Documentation

◆ head

template<template< typename > class Predicate, template< typename > class Extract, template< typename > class Children>
template<typename RootTag >
using Rose::metaprog::tree_traversal_factory_t< Predicate, Extract, Children >::preorder_depthfirst_t< RootTag >::head = std::conditional_t<Predicate<RootTag>::value, List<typename Extract<RootTag>::type>, List<> >

pseudo: head = Predicate<RootTag> ? List<Extract<RootTag>> : List<>;

Definition at line 203 of file metaprog.h.

◆ tail

template<template< typename > class Predicate, template< typename > class Extract, template< typename > class Children>
template<typename RootTag >
using Rose::metaprog::tree_traversal_factory_t< Predicate, Extract, Children >::preorder_depthfirst_t< RootTag >::tail = typename Children<RootTag>::list::template map_ravel_t<preorder_depthfirst_t>

pseudo: for (ChildTag: Children<RootTag>) tail += preorder_depthfirst_t<ChildTag>;

Definition at line 205 of file metaprog.h.

◆ list

template<template< typename > class Predicate, template< typename > class Extract, template< typename > class Children>
template<typename RootTag >
using Rose::metaprog::tree_traversal_factory_t< Predicate, Extract, Children >::preorder_depthfirst_t< RootTag >::list = typename head::template append_ravel<tail>

pseudo: return head+tail;

Definition at line 207 of file metaprog.h.


The documentation for this struct was generated from the following file: