10 #ifndef ecl_containers_SPECIALISATIONS_HPP_ 11 #define ecl_containers_SPECIALISATIONS_HPP_ 73 array(underlying_array),
95 Stencil(iterator underlying_array,
const unsigned int& length,
const unsigned int& start_index = 0,
const unsigned int &n = 0) ecl_assert_throw_decl(
StandardException) :
96 array(underlying_array),
98 b_iter(array+start_index),
99 e_iter(array+start_index+n)
142 b_iter = array+start_index;
143 e_iter = array+start_index+n;
241 return reverse_iterator(end());
251 return const_reverse_iterator(end());
261 return reverse_iterator(begin());
271 return const_reverse_iterator(begin());
365 if ( b_iter+i <= array )
369 if ( b_iter+i >= array+length )
389 if ( b_iter+i <= array )
393 if ( b_iter+i >= array+length )
409 {
return e_iter-b_iter;}
429 template <
typename OutputStream>
430 friend OutputStream& operator<<(OutputStream &ostream , const Stencil<unsigned char*> &stencil);
487 array(underlying_array),
509 Stencil(const_iterator underlying_array,
const unsigned int& length,
const unsigned int& start_index = 0,
const unsigned int &n = 0) ecl_assert_throw_decl(
StandardException) :
510 array(underlying_array),
512 b_iter(array+start_index),
513 e_iter(array+start_index+n)
556 b_iter = array+start_index;
557 e_iter = array+start_index+n;
634 return reverse_iterator(end());
644 return const_reverse_iterator(end());
654 return reverse_iterator(begin());
664 return const_reverse_iterator(begin());
758 if ( b_iter+i <= array )
762 if ( b_iter+i >= array+length )
782 if ( b_iter+i <= array )
786 if ( b_iter+i >= array+length )
802 {
return e_iter-b_iter;}
822 template <
typename OutputStream>
823 friend OutputStream& operator<<(OutputStream &ostream , const Stencil<const unsigned char*> &stencil);
reference operator[](size_type i) ecl_assert_throw_decl(StandardException)
const_iterator begin() const ecl_assert_throw_decl(StandardException)
Stencil(const_iterator underlying_array, const unsigned int &length, const unsigned int &start_index=0, const unsigned int &n=0) ecl_assert_throw_decl(StandardException)
Initialises with a reference to the underlying array and boundary constraints.
const unsigned char * iterator
Uses the array's iterator type.
Embedded control libraries.
const unsigned char * const_iterator
Uses the array's constant iterator type.
void resettle(const unsigned int &start_index, const unsigned int &n) ecl_assert_throw_decl(StandardException)
Resettle the stencil on a different range over the same underlying array.
const_iterator begin() const ecl_assert_throw_decl(StandardException)
reverse_iterator rend() ecl_assert_throw_decl(StandardException)
Stencil< unsigned char * > & operator=(const Stencil< unsigned char * > &s) ecl_assert_throw_decl(StandardException)
This either resettles this stencil or copies across to it (depending on the rhs stencil).
const_iterator end() const ecl_assert_throw_decl(StandardException)
reference operator[](size_type i) ecl_assert_throw_decl(StandardException)
unsigned char value_type
Uses the array's element type.
unsigned char * iterator
Uses the array's iterator type.
std::reverse_iterator< const_iterator > const_reverse_iterator
Uses the array's constant reverse iterator type.
const_reference operator[](size_type i) const ecl_assert_throw_decl(StandardException)
std::size_t size_type
Uses the array's type used to denote the length of the array.
reference at(size_type i)
const_reference back() const ecl_assert_throw_decl(StandardException)
#define ecl_assert_throw(expression, exception)
Stencil< unsigned char * > stencil(const unsigned int &start_index, const unsigned int &n) const ecl_assert_throw_decl(StandardException)
Generate a sub-stencil.
iterator begin() ecl_assert_throw_decl(StandardException)
std::size_t size_type
Uses the array's type used to denote the length of the array.
const_reference at(size_type i) const
Stencil variant operating on a raw const unsigned char array.
iterator end() ecl_assert_throw_decl(StandardException)
Stencil(iterator underlying_array, const unsigned int &length, iterator begin_iter, iterator end_iter) ecl_assert_throw_decl(StandardException)
Initialises with a pointer to the underlying array with boundary constraints.
std::ptrdiff_t difference_type
Stencil variant operating on a raw unsigned char array.
unsigned char & reference
Uses the array's element reference type.
reference back() ecl_assert_throw_decl(StandardException)
reference back() ecl_assert_throw_decl(StandardException)
void resettle(const unsigned int &start_index, const unsigned int &n) ecl_assert_throw_decl(StandardException)
Resettle the stencil on a different range over the same underlying array.
const_reference back() const ecl_assert_throw_decl(StandardException)
const_reverse_iterator rbegin() const ecl_assert_throw_decl(StandardException)
const_reference operator[](size_type i) const ecl_assert_throw_decl(StandardException)
std::reverse_iterator< iterator > reverse_iterator
Uses the array's reverse iterator type.
reference at(size_type i)
iterator end() ecl_assert_throw_decl(StandardException)
const_reverse_iterator rend() const ecl_assert_throw_decl(StandardException)
unsigned char value_type
Uses the array's element type.
reverse_iterator rbegin() ecl_assert_throw_decl(StandardException)
const unsigned char & const_reference
Uses the array's element const reference type.
Convenience initialiser with bounds checking for fixed size containers.
reverse_iterator rbegin() ecl_assert_throw_decl(StandardException)
const_reverse_iterator rend() const ecl_assert_throw_decl(StandardException)
#define ecl_assert_throw_decl(exception)
const unsigned char & reference
Uses the array's element reference type.
A safe windowing class that opens onto array-like containers.
const_iterator end() const ecl_assert_throw_decl(StandardException)
OutputStream & operator<<(OutputStream &ostream, Format< std::string > &formatter) ecl_assert_throw_decl(StandardException)
const unsigned char & const_reference
Uses the array's element const reference type.
const unsigned char * const_iterator
Uses the array's constant iterator type.
reverse_iterator rend() ecl_assert_throw_decl(StandardException)
const_reference front() const ecl_assert_throw_decl(StandardException)
Windows over ecl type containers.
Stencil< const unsigned char * > & operator=(const Stencil< const unsigned char * > &s) ecl_assert_throw_decl(StandardException)
This either resettles this stencil or copies across to it (depending on the rhs stencil).
reference front() ecl_assert_throw_decl(StandardException)
iterator begin() ecl_assert_throw_decl(StandardException)
reference front() ecl_assert_throw_decl(StandardException)
const_reverse_iterator rbegin() const ecl_assert_throw_decl(StandardException)
Stencil(const_iterator underlying_array, const unsigned int &length, const_iterator begin_iter, const_iterator end_iter) ecl_assert_throw_decl(StandardException)
Initialises with a pointer to the underlying array with boundary constraints.
const_reference front() const ecl_assert_throw_decl(StandardException)
Stencil< const unsigned char * > stencil(const unsigned int &start_index, const unsigned int &n) const ecl_assert_throw_decl(StandardException)
Generate a sub-stencil.
Stencil(iterator underlying_array, const unsigned int &length, const unsigned int &start_index=0, const unsigned int &n=0) ecl_assert_throw_decl(StandardException)
Initialises with a reference to the underlying array and boundary constraints.
std::reverse_iterator< const_iterator > const_reverse_iterator
Uses the array's constant reverse iterator type.
std::ptrdiff_t difference_type
std::reverse_iterator< iterator > reverse_iterator
Uses the array's reverse iterator type.
const_reference at(size_type i) const