Public Member Functions | Protected Attributes
ecl::containers::BoundedListInitialiser< Type, Iterator, N > Class Template Reference

Convenience initialiser with bounds checking for fixed size containers. More...

#include <initialiser.hpp>

List of all members.

Public Member Functions

 BoundedListInitialiser (const Type &value, Iterator iter)
BoundedListInitialiser< Type,
Iterator, N > & 
operator, (const Type &value) ecl_assert_throw_decl(StandardException)
virtual ~BoundedListInitialiser ()

Protected Attributes

std::size_t current_size
Iterator iterator

Detailed Description

template<class Type, class Iterator, std::size_t N = ecl::DynamicStorage>
class ecl::containers::BoundedListInitialiser< Type, Iterator, N >

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.

See also:
Array, DynamicArray.

Definition at line 49 of file initialiser.hpp.


Constructor & Destructor Documentation

template<typename Type , typename Iterator , std::size_t N>
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.

Parameters:
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.

template<class Type, class Iterator, std::size_t N = ecl::DynamicStorage>
virtual ecl::containers::BoundedListInitialiser< Type, Iterator, N >::~BoundedListInitialiser ( ) [inline, virtual]

Definition at line 60 of file initialiser.hpp.


Member Function Documentation

template<typename Type , typename Iterator , std::size_t N>
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.

Parameters:
value: the value to be inserted at the location of the stored iterator.
Returns:
BoundedListInitialiser : the initialiser class.
Exceptions:
StandardException: throws if the range has been exceeded [debug mode only].

Definition at line 92 of file initialiser.hpp.


Member Data Documentation

template<class Type, class Iterator, std::size_t N = ecl::DynamicStorage>
std::size_t ecl::containers::BoundedListInitialiser< Type, Iterator, N >::current_size [protected]

Definition at line 76 of file initialiser.hpp.

template<class Type, class Iterator, std::size_t N = ecl::DynamicStorage>
Iterator ecl::containers::BoundedListInitialiser< Type, Iterator, N >::iterator [protected]

Definition at line 75 of file initialiser.hpp.


The documentation for this class was generated from the following file:


ecl_containers
Author(s): Daniel Stonier (d.stonier@gmail.com)
autogenerated on Thu Jan 2 2014 11:12:25