oln::impl::image_array< T, Exact > Class Template Reference

#include <image_array.hh>

Inheritance diagram for oln::impl::image_array< T, Exact >:

Inheritance graph
[legend]
Collaboration diagram for oln::impl::image_array< T, Exact >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef impl_traits< Exact
>::point_type 
point_type
typedef impl_traits< Exact
>::value_type 
value_type
typedef impl_traits< Exact
>::size_type 
size_type
typedef Exact exact_type
typedef image_impl< Exact > super_type
typedef image_array< T, Exact > self_type
enum  { dim = impl_traits<Exact>::dim }

Public Member Functions

 image_array (const size_type &s)
 Constructor that allocates buffer_ to be an array of s value_type.

 image_array (const self_type &)
void operator= (const self_type &)
const T * buffer () const
 Return a constant pointer to the data array.

T * buffer ()
 Return a point to the data array.

size_t len () const
 Return the length of the data array.

size_t len (const size_type &s) const
 Return the length of the data array.


Protected Member Functions

void clone_to_ (exact_type *output_data) const
 Perform a deep copy of the current data array. This copy is pointed to by output_data.


Protected Attributes

T * buffer_

Friends

class image_impl< Exact >

Detailed Description

template<class T, class Exact>
class oln::impl::image_array< T, Exact >

Array implementation of image data.

Definition at line 95 of file image_array.hh.


Constructor & Destructor Documentation

template<class T, class Exact>
oln::impl::image_array< T, Exact >::image_array const size_type &  s  )  [inline]
 

Constructor that allocates buffer_ to be an array of s value_type.

Precondition:
s > 0

Definition at line 119 of file image_array.hh.

00119                                      : super_type(s), buffer_(0)
00120       {
00121         allocate_data_(buffer_, len(s));
00122       }


Member Function Documentation

template<class T, class Exact>
T* oln::impl::image_array< T, Exact >::buffer  )  [inline]
 

Return a point to the data array.

Invariant:
buffer_ != 0

Definition at line 150 of file image_array.hh.

00151       {
00152         invariant(buffer_ != 0);
00153         return buffer_;
00154       }

template<class T, class Exact>
const T* oln::impl::image_array< T, Exact >::buffer  )  const [inline]
 

Return a constant pointer to the data array.

Invariant:
buffer_ != 0

Definition at line 138 of file image_array.hh.

00139       {
00140         invariant(buffer_ != 0);
00141         return buffer_;
00142       }

template<class T, class Exact>
void oln::impl::image_array< T, Exact >::clone_to_ exact_type *  output_data  )  const [inline, protected]
 

Perform a deep copy of the current data array. This copy is pointed to by output_data.

Precondition:
output_data != 0

output_data->len() == len()

Definition at line 188 of file image_array.hh.

00189       {
00190         precondition(output_data != 0);
00191         precondition(output_data->len() == len());
00192         memcpy(output_data->buffer(),
00193                buffer_,
00194                len() * sizeof(T));
00195       }


The documentation for this class was generated from the following file:
Generated on Thu Apr 15 20:16:13 2004 for Olena by doxygen 1.3.6-20040222