|
dune-typetree 2.12-git
|
Loading...
Searching...
No Matches
compositenode.hh
Go to the documentation of this file.
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
151 // * the first argument is not a valid flat index, i.e. either a std::size_t or an index_constant.
156 // We have to do a lazy lookup of the return type after SFINAE has succeeded, otherwise the return
218 template<typename... Args, typename = typename std::enable_if<(sizeof...(Args) == degree())>::type>
STL namespace.
decltype(auto) child(Node &&node, TreePath< Indices... > treePath)
std::shared_ptr< T > stackobject_to_shared_ptr(T &t)
Base class for composite nodes based on variadic templates.
Definition compositenode.hh:28
static const bool isLeaf
Mark this class as non leaf in the dune-typetree.
Definition compositenode.hh:42
ImplementationDefined & child(Indices... indices)
Returns the child given by the list of indices.
Definition compositenode.hh:166
static const bool isComposite
Mark this class as a composite in the dune-typetree.
Definition compositenode.hh:48
CompositeNode()
Default constructor.
Definition compositenode.hh:214
CompositeNodeTag NodeTag
The type tag that describes a CompositeNode.
Definition compositenode.hh:33
void setChild(typename Child< k >::Type &child, index_constant< k >={})
Sets the k-th child to the passed-in value.
Definition compositenode.hh:113
void setChild(typename Child< k >::Type &&child, index_constant< k >={})
Store the passed value in k-th child.
Definition compositenode.hh:120
const NodeStorage & nodeStorage() const
Definition compositenode.hh:132
CompositeNode(std::shared_ptr< Children >... children)
Initialize the CompositeNode with copies of the passed in Storage objects.
Definition compositenode.hh:224
std::shared_ptr< typename Child< k >::Type > childStorage(index_constant< k >={})
Returns the storage of the k-th child.
Definition compositenode.hh:96
std::tuple< Children... > ChildTypes
A tuple storing the types of all children.
Definition compositenode.hh:39
void setChild(std::shared_ptr< typename Child< k >::Type > child, index_constant< k >={})
Sets the storage of the k-th child to the passed-in value.
Definition compositenode.hh:127
const ImplementationDefined & child(Indices... indices)
Returns the child given by the list of indices.
Definition compositenode.hh:186
static const bool isPower
Mark this class as a non power in the dune-typetree.
Definition compositenode.hh:45
std::shared_ptr< const typename Child< k >::Type > childStorage(index_constant< k >={}) const
Returns the storage of the k-th child (const version).
Definition compositenode.hh:106
Child< k >::Type & child(index_constant< k >={})
Returns the k-th child.
Definition compositenode.hh:76
CompositeNode(const NodeStorage &children)
Initialize the CompositeNode with a copy of the passed-in storage type.
Definition compositenode.hh:229
std::tuple< std::shared_ptr< Children >... > NodeStorage
The type used for storing the children.
Definition compositenode.hh:36
const Child< k >::Type & child(index_constant< k >={}) const
Returns the k-th child (const version).
Definition compositenode.hh:86
Access to the type and storage type of the i-th child.
Definition compositenode.hh:57
std::tuple_element< k, ChildTypes >::type Type
The type of the child.
Definition compositenode.hh:62
std::tuple_element< k, ChildTypes >::type type
The type of the child.
Definition compositenode.hh:65
T reduce(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8