Dune Core Modules (2.9.0)

Dune::TypeTree::DynamicChildAccessors< ProxiedNode > Class Template Reference

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

#include <dune/typetree/proxynode.hh>

Public Member Functions

Child Access (Dynamic methods)
template<bool enabled = !proxiedNodeIsConst, typename std::enable_if< enabled, int >::type = 0>
auto & child (std::size_t i)
 Returns the i-th child. More...
 
const auto & child (std::size_t i) const
 Returns the i-th child (const version). More...
 
template<bool enabled = !proxiedNodeIsConst, typename std::enable_if< enabled, int >::type = 0>
auto childStorage (std::size_t i)
 Returns the storage of the i-th child. More...
 
auto childStorage (std::size_t i) const
 Returns the storage of the i-th child (const version). More...
 
template<class ProxyChild , bool enabled = !proxiedNodeIsConst>
void setChild (std::size_t i, ProxyChild &&child, typename std::enable_if< enabled, void * >::type=0)
 Sets the i-th child to the passed-in value.
 
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. More...
 
template<std::size_t k>
const auto & child (index_constant< k >={}) const
 Returns the i-th child (const version). More...
 
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. More...
 
template<std::size_t k>
auto childStorage (index_constant< k >={}) const
 Returns the storage of the i-th child (const version). More...
 
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::DynamicChildAccessors< ProxiedNode >

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

This class also provides the compile-time parameter based methods, as multiple inheritance from both DynamicChildAccessors and StaticChildAccessors creates ambigous method lookups.

Member Function Documentation

◆ child() [1/4]

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 >  = {})
inlineinherited

Returns the i-th child.

Returns
a reference to the i-th child.

Referenced by Dune::TypeTree::StaticChildAccessors< ProxiedNode >::setChild().

◆ child() [2/4]

template<typename ProxiedNode >
template<std::size_t k>
const auto & Dune::TypeTree::StaticChildAccessors< ProxiedNode >::child ( index_constant< k >  = {}) const
inlineinherited

Returns the i-th child (const version).

Returns
a const reference to the i-th child.

◆ child() [3/4]

template<typename ProxiedNode >
template<bool enabled = !proxiedNodeIsConst, typename std::enable_if< enabled, int >::type = 0>
auto & Dune::TypeTree::DynamicChildAccessors< ProxiedNode >::child ( std::size_t  i)
inline

Returns the i-th child.

Returns
a reference to the i-th child.

Referenced by Dune::TypeTree::DynamicChildAccessors< ProxiedNode >::setChild().

◆ child() [4/4]

template<typename ProxiedNode >
const auto & Dune::TypeTree::DynamicChildAccessors< ProxiedNode >::child ( std::size_t  i) const
inline

Returns the i-th child (const version).

Returns
a const reference to the i-th child.

◆ childStorage() [1/4]

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 >  = {})
inlineinherited

Returns the storage of the i-th child.

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

◆ childStorage() [2/4]

template<typename ProxiedNode >
template<std::size_t k>
auto Dune::TypeTree::StaticChildAccessors< ProxiedNode >::childStorage ( index_constant< k >  = {}) const
inlineinherited

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.

◆ childStorage() [3/4]

template<typename ProxiedNode >
template<bool enabled = !proxiedNodeIsConst, typename std::enable_if< enabled, int >::type = 0>
auto Dune::TypeTree::DynamicChildAccessors< ProxiedNode >::childStorage ( std::size_t  i)
inline

Returns the storage of the i-th child.

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

◆ childStorage() [4/4]

template<typename ProxiedNode >
auto Dune::TypeTree::DynamicChildAccessors< ProxiedNode >::childStorage ( std::size_t  i) 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.

The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)