Convenience initialiser with bounds checking for fixed size containers. More...
#include <initialiser.hpp>
Public Member Functions | |
BoundedListInitialiser (const Type &value, Iterator iter) | |
BoundedListInitialiser< Type, Iterator, N > & | operator, (const Type &value) |
virtual | ~BoundedListInitialiser () |
Protected Attributes | |
std::size_t | current_size |
Iterator | iterator |
Convenience initialiser with bounds checking for fixed size 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 fixed storage length specified by the third template parameter.
Error Handling
Out of range operations will always throw an exception in debug mode.
Definition at line 49 of file initialiser.hpp.
ecl::containers::BoundedListInitialiser< Type, Iterator, N >::BoundedListInitialiser | ( | const Type & | value, |
Iterator | iter | ||
) |
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. |
Definition at line 84 of file initialiser.hpp.
|
inlinevirtual |
Definition at line 60 of file initialiser.hpp.
BoundedListInitialiser< Type, Iterator, N > & ecl::containers::BoundedListInitialiser< Type, Iterator, N >::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 92 of file initialiser.hpp.
|
protected |
Definition at line 76 of file initialiser.hpp.
|
protected |
Definition at line 75 of file initialiser.hpp.