Convenience initialiser with bounds checking for dynamic containers. More...
#include <initialiser.hpp>
Public Member Functions | |
BoundedListInitialiser (const Type &value, Iterator iter, std::size_t bound) | |
BoundedListInitialiser< Type, Iterator, DynamicStorage > & | operator, (const Type &value) |
virtual | ~BoundedListInitialiser () |
Protected Attributes | |
std::size_t | current_size |
Iterator | iterator |
const std::size_t | upper_bound |
Convenience initialiser with bounds checking for dynamic containers.
Initialises containers in a manner similar to that used in Blitz++ and Eigen2 with a comma separated list. It also does range checking in debug mode. The containers are assumed to have dynamic storage length retrievable from the container class itself.
This is a specialisation of the fixed container bounded list initialiser.
Definition at line 129 of file initialiser.hpp.
ecl::containers::BoundedListInitialiser< Type, Iterator, DynamicStorage >::BoundedListInitialiser | ( | const Type & | value, |
Iterator | iter, | ||
std::size_t | bound | ||
) |
Gets a handle to an iterator of the underlying container and adds the first value.
value | : first element to be added to the initialiser. |
iter | : a pointer to the current element to be added to the container. |
bound | : size of the container it is initialising. |
StandardException | : throws if this container has no storage capacity [debug mode only]. |
Definition at line 167 of file initialiser.hpp.
|
inlinevirtual |
Definition at line 145 of file initialiser.hpp.
BoundedListInitialiser< Type, Iterator, DynamicStorage > & ecl::containers::BoundedListInitialiser< Type, Iterator, DynamicStorage >::operator, | ( | const Type & | value | ) |
Convenience operator for initialising container types with a comma separated list. It uses a current BoundedListInitialiser instance to add the next value to the underlying class and returns the same instance with incremented iterator.
value | : the value to be inserted at the location of the stored iterator. |
StandardException | : throws if the range has been exceeded [debug mode only]. |
Definition at line 177 of file initialiser.hpp.
|
protected |
Definition at line 160 of file initialiser.hpp.
|
protected |
Definition at line 159 of file initialiser.hpp.
|
protected |
Definition at line 161 of file initialiser.hpp.