Loading...
Searching...
No Matches
Dune::TypeTree::StaticChildAccessors< ProxiedNode > Class Template Reference
dune-typetree » Nodes

Mixin class providing methods for child access with compile-time parameter. More...

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

Inheritance diagram for Dune::TypeTree::StaticChildAccessors< ProxiedNode >:

## Classes

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

## Public Member Functions

Child Access
template<std::size_t k, typename std::enable_if< lazy_enabled< k >::value, int >::type = 0>
auto & | child (index_constant< k >={})
| Returns the i-th child.
template<std::size_t k>
const auto & | child (index_constant< k >={}) const
| Returns the i-th child (const version).
template<std::size_t k, typename std::enable_if< lazy_enabled< k >::value, int >::type = 0>
auto | childStorage (index_constant< k >={})
| Returns the storage of the i-th child.
template<std::size_t k>
auto | childStorage (index_constant< k >={}) const
| Returns the storage of the i-th child (const version).
template<std::size_t k, class ProxyChild>
void | setChild (ProxyChild &&child, typename std::enable_if< lazy_enabled< k >::value, void * >::type=0)
| Sets the i-th child to the passed-in value.
const ProxiedNode::NodeStorage & | nodeStorage () const

## Detailed Description

template<typename ProxiedNode>
class Dune::TypeTree::StaticChildAccessors< ProxiedNode >

Mixin class providing methods for child access with compile-time parameter.

## Member Function Documentation

## child() [1/2]

template<typename ProxiedNode>
template<std::size_t k, typename std::enable_if< lazy_enabled< k >::value, int >::type = 0>

auto & Dune::TypeTree::StaticChildAccessors< ProxiedNode >::child | ( | index_constant< k > | = {} | ) |

inline

Returns the i-th child.

Returns
  a reference to the i-th child.

## child() [2/2]

template<typename ProxiedNode>
template<std::size_t k>

const auto & Dune::TypeTree::StaticChildAccessors< ProxiedNode >::child | ( | index_constant< k > | = {} | ) | const

inline

Returns the i-th child (const version).

Returns
  a const reference to the i-th child.

## childStorage() [1/2]

template<typename ProxiedNode>
template<std::size_t k, typename std::enable_if< lazy_enabled< k >::value, int >::type = 0>

auto Dune::TypeTree::StaticChildAccessors< ProxiedNode >::childStorage | ( | index_constant< k > | = {} | ) |

inline

Returns the storage of the i-th child.

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

## childStorage() [2/2]

template<typename ProxiedNode>
template<std::size_t k>

auto Dune::TypeTree::StaticChildAccessors< ProxiedNode >::childStorage | ( | index_constant< k > | = {} | ) | const

inline

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

This method is only important if the child is stored as some kind of pointer, as this allows the pointee type to become const.

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

## nodeStorage()

template<typename ProxiedNode>

const ProxiedNode::NodeStorage & Dune::TypeTree::StaticChildAccessors< ProxiedNode >::nodeStorage | ( |  | ) | const

inline

## setChild()

template<typename ProxiedNode>
template<std::size_t k, class ProxyChild>

void Dune::TypeTree::StaticChildAccessors< ProxiedNode >::setChild | ( | ProxyChild && | child,
|  | typename std::enable_if< lazy_enabled< k >::value, void * >::type | = 0 )

inline

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

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

- proxynode.hh