Loading...
Searching...
No Matches
Dune::TypeTree::FilteredCompositeNode< Node, Filter > Class Template Reference
dune-typetree » Nodes

Base class for composite nodes representing a filtered view on an underlying composite node. More...

`#include <dune/typetree/filteredcompositenode.hh>`

## Classes

struct | Child
| Access to the type and storage type of the i-th child. More...

## Public Types

typedef CompositeNodeTag | NodeTag
| The type tag that describes a CompositeNode.
typedef mapped_children::NodeStorage | NodeStorage
| The type used for storing the children.
typedef mapped_children::ChildTypes | ChildTypes
| A tuple storing the types of all children.

## Public Member Functions

Child Access
template<std::size_t k, typename std::enable_if< lazy_enable< k >::value, int >::type = 0>
auto & | child (index_constant< k >={})
| Returns the k-th child.
template<std::size_t k>
const auto & | child (index_constant< k >={}) const
| Returns the k-th child (const version).
template<std::size_t k, typename std::enable_if< lazy_enable< k >::value, int >::type = 0>
auto | childStorage (index_constant< k >={})
| Returns the storage of the k-th child.
template<std::size_t k>
auto | childStorage (index_constant< k >={}) const
| Returns the storage of the k-th child (const version).
template<std::size_t k, class ChildType>
void | setChild (ChildType &&child, typename std::enable_if< lazy_enable< k >::value, void * >::type=0)
| Sets the k-th child to the passed-in value.
Constructors
| FilteredCompositeNode (std::shared_ptr< Node > node)
| Initialize the CompositeNode with copies of the passed in Storage objects.
| FilteredCompositeNode (Node &node)
| Initialize the CompositeNode with a copy of the passed-in storage type.

## Static Public Member Functions

static constexpr auto | degree ()

## Static Public Attributes

static const bool | isLeaf = false
| Mark this class as non leaf in the dune-typetree.
static const bool | isPower = false
| Mark this class as a non power in the dune-typetree.
static const bool | isComposite = true
| Mark this class as a composite in the dune-typetree.

## Protected Member Functions

Access to unfiltered node
template<bool enabled = !nodeIsConst>
std::enable_if< enabled, Node & >::type | unfiltered ()
| Returns the unfiltered node.
const Node & | unfiltered () const
| Returns the unfiltered node (const version).
template<bool enabled = !nodeIsConst>
std::enable_if< enabled, std::shared_ptr< Node > >::type | unfilteredStorage ()
| Returns the storage object of the unfiltered node.
std::shared_ptr< const Node > | unfilteredStorage () const
| Returns the storage object of the unfiltered node (const version).

## Detailed Description

template<typename Node, typename Filter>
class Dune::TypeTree::FilteredCompositeNode< Node, Filter >

Base class for composite nodes representing a filtered view on an underlying composite node.

## Member Typedef Documentation

## ChildTypes

template<typename Node, typename Filter>

typedef mapped_children::ChildTypes Dune::TypeTree::FilteredCompositeNode< Node, Filter >::ChildTypes

A tuple storing the types of all children.

## NodeStorage

template<typename Node, typename Filter>

typedef mapped_children::NodeStorage Dune::TypeTree::FilteredCompositeNode< Node, Filter >::NodeStorage

The type used for storing the children.

## NodeTag

template<typename Node, typename Filter>

typedef CompositeNodeTag Dune::TypeTree::FilteredCompositeNode< Node, Filter >::NodeTag

The type tag that describes a CompositeNode.

## Constructor & Destructor Documentation

## FilteredCompositeNode() [1/2]

template<typename Node, typename Filter>

Dune::TypeTree::FilteredCompositeNode< Node, Filter >::FilteredCompositeNode | ( | std::shared_ptr< Node > | node | ) |

inline

Initialize the CompositeNode with copies of the passed in Storage objects.

## FilteredCompositeNode() [2/2]

template<typename Node, typename Filter>

Dune::TypeTree::FilteredCompositeNode< Node, Filter >::FilteredCompositeNode | ( | Node & | node | ) |

inline

Initialize the CompositeNode with a copy of the passed-in storage type.

## Member Function Documentation

## child() [1/2]

template<typename Node, typename Filter>
template<std::size_t k, typename std::enable_if< lazy_enable< k >::value, int >::type = 0>

auto & Dune::TypeTree::FilteredCompositeNode< Node, Filter >::child | ( | index_constant< k > | = {} | ) |

inline

Returns the k-th child.

Returns
  a reference to the k-th child.

## child() [2/2]

template<typename Node, typename Filter>
template<std::size_t k>

const auto & Dune::TypeTree::FilteredCompositeNode< Node, Filter >::child | ( | index_constant< k > | = {} | ) | const

inline

Returns the k-th child (const version).

Returns
  a const reference to the k-th child.

## childStorage() [1/2]

template<typename Node, typename Filter>
template<std::size_t k, typename std::enable_if< lazy_enable< k >::value, int >::type = 0>

auto Dune::TypeTree::FilteredCompositeNode< Node, Filter >::childStorage | ( | index_constant< k > | = {} | ) |

inline

Returns the storage of the k-th child.

Returns
  a copy of the object storing the k-th child.

## childStorage() [2/2]

template<typename Node, typename Filter>
template<std::size_t k>

auto Dune::TypeTree::FilteredCompositeNode< Node, Filter >::childStorage | ( | index_constant< k > | = {} | ) | const

inline

Returns the storage of the k-th child (const version).

Returns
  a copy of the object storing the k-th child.

## degree()

template<typename Node, typename Filter>

constexpr auto Dune::TypeTree::FilteredCompositeNode< Node, Filter >::degree | ( |  | ) |

inline static constexpr

## setChild()

template<typename Node, typename Filter>
template<std::size_t k, class ChildType>

void Dune::TypeTree::FilteredCompositeNode< Node, Filter >::setChild | ( | ChildType && | child,
|  | typename std::enable_if< lazy_enable< k >::value, void * >::type | = 0 )

inline

Sets the k-th child to the passed-in value.

## unfiltered() [1/2]

template<typename Node, typename Filter>
template<bool enabled = !nodeIsConst>

std::enable_if< enabled, Node & >::type Dune::TypeTree::FilteredCompositeNode< Node, Filter >::unfiltered | ( |  | ) |

inline protected

Returns the unfiltered node.

Returns
  A reference to the original, unfiltered node.

## unfiltered() [2/2]

template<typename Node, typename Filter>

const Node & Dune::TypeTree::FilteredCompositeNode< Node, Filter >::unfiltered | ( |  | ) | const

inline protected

Returns the unfiltered node (const version).

Returns
  A const reference to the original, unfiltered node.

## unfilteredStorage() [1/2]

template<typename Node, typename Filter>
template<bool enabled = !nodeIsConst>

std::enable_if< enabled, std::shared_ptr< Node > >::type Dune::TypeTree::FilteredCompositeNode< Node, Filter >::unfilteredStorage | ( |  | ) |

inline protected

Returns the storage object of the unfiltered node.

Returns
  A shared_ptr to the original, unfiltered node.

## unfilteredStorage() [2/2]

template<typename Node, typename Filter>

std::shared_ptr< const Node > Dune::TypeTree::FilteredCompositeNode< Node, Filter >::unfilteredStorage | ( |  | ) | const

inline protected

Returns the storage object of the unfiltered node (const version).

Returns
  A shared_ptr to the original, unfiltered node.

## Member Data Documentation

## isComposite

template<typename Node, typename Filter>

const bool Dune::TypeTree::FilteredCompositeNode< Node, Filter >::isComposite = true

static

Mark this class as a composite in the dune-typetree.

## isLeaf

template<typename Node, typename Filter>

const bool Dune::TypeTree::FilteredCompositeNode< Node, Filter >::isLeaf = false

static

Mark this class as non leaf in the dune-typetree.

## isPower

template<typename Node, typename Filter>

const bool Dune::TypeTree::FilteredCompositeNode< Node, Filter >::isPower = false

static

Mark this class as a non power in the dune-typetree.

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

- filteredcompositenode.hh