Collect k instances of type T within a dune-typetree.
More...
#include <dune/typetree/powernode.hh>
|
struct | Child |
| Access to the type and storage type of the i-th child. More...
|
|
template<typename T, std::size_t k>
class Dune::TypeTree::PowerNode< T, k >
Collect k instances of type T within a dune-typetree.
- Template Parameters
-
T | The base type |
k | The number of instances this node should collect |
template<typename T , std::size_t k>
The const version of the storage type of each child.
template<typename T , std::size_t k>
The storage type of each child.
template<typename T , std::size_t k>
template<typename T , std::size_t k>
The type used for storing the children.
template<typename T , std::size_t k>
template<typename T , std::size_t k>
Default constructor.
The default constructor is protected, as PowerNode is a utility class that needs to be filled with meaning by subclassing it and adding useful functionality to the subclass.
- Warning
- When using the default constructor, make sure to set ALL children by means of the setChild() methods!
template<typename T , std::size_t k>
Initialize the PowerNode with a copy of the passed-in storage type.
template<typename T , std::size_t k>
Initialize all children with copies of a storage object constructed from the parameter t
.
template<typename T , std::size_t k>
Initialize all children with the passed-in objects.
The availability of this constructor depends on the number of children and compiler support for C++0x: For 1 <= k <= 10, it is always present, but for k > 10, it requires C++0x support in the compiler. If your compiler doesn't, use PowerNode(const Storage& children) instead.
Moreover, the C++0x-based version also supports passing in temporary objects and will move those objects into the node. Attempting to do so with the legacy version will result in a compile error.
template<typename T , std::size_t k>
template<std::size_t i>
Returns the i-th child.
- Returns
- a reference to the i-th child.
template<typename T , std::size_t k>
template<std::size_t i>
Returns the i-th child (const version).
- Returns
- a const reference to the i-th child.
template<typename T , std::size_t k>
Returns the i-th child.
- Returns
- a reference to the i-th child.
template<typename T , std::size_t k>
Returns the i-th child (const version).
- Returns
- a const reference to the i-th child.
template<typename T , std::size_t k>
template<typename... Indices>
Returns the child given by the list of indices.
This method simply forwards to the freestanding function child(). See that function for further information.
template<typename T , std::size_t k>
template<typename... Indices>
Returns the child given by the list of indices.
This method simply forwards to the freestanding function child(). See that function for further information.
template<typename T , std::size_t k>
template<std::size_t i>
Returns the storage of the i-th child.
- Returns
- a copy of the object storing the i-th child.
template<typename T , std::size_t k>
template<std::size_t i>
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.
template<typename T , std::size_t k>
Returns the storage of the i-th child.
- Returns
- a copy of the object storing the i-th child.
template<typename T , std::size_t k>
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.
template<typename T , std::size_t k>
template<typename T , std::size_t k>
template<std::size_t i>
Sets the i-th child to the passed-in value.
template<typename T , std::size_t k>
template<std::size_t i>
Sets the stored value representing the i-th child to the passed-in value.
template<typename T , std::size_t k>
Sets the i-th child to the passed-in value.
template<typename T , std::size_t k>
Sets the stored value representing the i-th child to the passed-in value.
template<typename T , std::size_t k>
template<typename T , std::size_t k>
template<typename T , std::size_t k>
template<typename T , std::size_t k>
The documentation for this class was generated from the following file: