|
dune-typetree 2.12-git
|
Loading...
Searching...
No Matches
powernode.hh
Go to the documentation of this file.
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
251 // * the first argument is not a valid flat index, i.e. either a std::size_t or an index_constant.
256 // We have to do a lazy lookup of the return type after SFINAE has succeeded, otherwise the return
352 static_assert(degree() == sizeof...(Children), "PowerNode constructor is called with incorrect number of children");
362 static_assert(degree() == sizeof...(Children), "PowerNode constructor is called with incorrect number of children");
decltype(auto) child(Node &&node, TreePath< Indices... > treePath)
std::shared_ptr< T > stackobject_to_shared_ptr(T &t)
Collect k instances of type T within a dune-typetree.
Definition powernode.hh:52
void setChild(T &t, index_constant< i >={})
Sets the i-th child to the passed-in value.
Definition powernode.hh:143
T & child(std::size_t i)
Returns the i-th child.
Definition powernode.hh:175
const T & child(index_constant< i >={}) const
Returns the i-th child (const version).
Definition powernode.hh:113
void setChild(std::shared_ptr< T > st, index_constant< i >={})
Sets the stored value representing the i-th child to the passed-in value.
Definition powernode.hh:159
std::shared_ptr< T > childStorage(index_constant< i >={})
Returns the storage of the i-th child.
Definition powernode.hh:124
PowerNode(T &t1, T &t2,...)
Initialize all children with the passed-in objects.
Definition powernode.hh:341
const NodeStorage & nodeStorage() const
Definition powernode.hh:232
std::array< std::shared_ptr< T >, k > NodeStorage
The type used for storing the children.
Definition powernode.hh:77
std::shared_ptr< const T > childStorage(index_constant< i >={}) const
Returns the storage of the i-th child (const version).
Definition powernode.hh:135
PowerNode(T &t, bool distinct_objects=true)
Initialize all children with copies of a storage object constructed from the parameter t.
Definition powernode.hh:324
PowerNodeTag NodeTag
The type tag that describes a PowerNode.
Definition powernode.hh:71
const T & child(std::size_t i) const
Returns the i-th child (const version).
Definition powernode.hh:185
std::shared_ptr< const T > childStorage(std::size_t i) const
Returns the storage of the i-th child (const version).
Definition powernode.hh:205
void setChild(std::size_t i, std::shared_ptr< T > st)
Sets the stored value representing the i-th child to the passed-in value.
Definition powernode.hh:226
static const bool isComposite
Mark this class as a non composite in the dune-typetree.
Definition powernode.hh:63
static const bool isLeaf
Mark this class as non leaf in the dune-typetree.
Definition powernode.hh:57
static const bool isPower
Mark this class as a power in the dune-typetree.
Definition powernode.hh:60
PowerNode(const NodeStorage &children)
Initialize the PowerNode with a copy of the passed-in storage type.
Definition powernode.hh:319
T & child(index_constant< i >={})
Returns the i-th child.
Definition powernode.hh:102
ImplementationDefined & child(Indices... indices)
Returns the child given by the list of indices.
Definition powernode.hh:266
void setChild(std::size_t i, T &&t)
Store the passed value in i-th child.
Definition powernode.hh:219
void setChild(T &&t, index_constant< i >={})
Store the passed value in i-th child.
Definition powernode.hh:151
const ImplementationDefined & child(Indices... indices)
Returns the child given by the list of indices.
Definition powernode.hh:286
void setChild(std::size_t i, T &t)
Sets the i-th child to the passed-in value.
Definition powernode.hh:212
std::shared_ptr< T > childStorage(std::size_t i)
Returns the storage of the i-th child.
Definition powernode.hh:195
Access to the type and storage type of the i-th child.
Definition powernode.hh:83
T begin(T... args)
T end(T... args)
T fill(T... args)
T reduce(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8