vil_memory_chunk Class Reference

#include <vil_memory_chunk.h>

List of all members.


Detailed Description

Ref. counted block of data on the heap.

Image data block used by vil_image_view<T>.

Definition at line 15 of file vil_memory_chunk.h.


Public Member Functions

 vil_memory_chunk ()
 Dflt ctor.
 vil_memory_chunk (unsigned long n, vil_pixel_format pixel_format)
 Allocate n bytes of memory.
 vil_memory_chunk (const vil_memory_chunk &)
 Copy ctor.
vil_memory_chunkoperator= (const vil_memory_chunk &)
 Copy operator.
virtual ~vil_memory_chunk ()
 Destructor.
void ref ()
 Increment reference count.
void unref ()
 Decrement reference count.
int ref_count () const
 Number of objects referring to this data.
void * data ()
 Pointer to first element of data.
void * const_data () const
 Pointer to first element of data.
vil_pixel_format pixel_format () const
 Indicate what format data is to be saved as in binary IO.
unsigned long size () const
 Number of bytes allocated.
void set_size (unsigned long n, vil_pixel_format pixel_format)
 Create space for n bytes.

Private Attributes

void * data_
 Data.
unsigned long size_
 Number of elements (bytes).
vil_pixel_format pixel_format_
 Indicate what format data is (used for binary IO).
vcl_atomic_count ref_count_
 Reference count.

Constructor & Destructor Documentation

vil_memory_chunk::vil_memory_chunk (  ) 

Dflt ctor.

Definition at line 11 of file vil_memory_chunk.cxx.

vil_memory_chunk::vil_memory_chunk ( unsigned long  n,
vil_pixel_format  pixel_format 
)

Allocate n bytes of memory.

Parameters:
pixel_format indicates what format to be used for binary IO, and should always be a scalar type.

Definition at line 17 of file vil_memory_chunk.cxx.

vil_memory_chunk::vil_memory_chunk ( const vil_memory_chunk  ) 

Copy ctor.

Definition at line 30 of file vil_memory_chunk.cxx.

vil_memory_chunk::~vil_memory_chunk (  )  [virtual]

Destructor.

Definition at line 24 of file vil_memory_chunk.cxx.


Member Function Documentation

vil_memory_chunk & vil_memory_chunk::operator= ( const vil_memory_chunk  ) 

Copy operator.

Definition at line 37 of file vil_memory_chunk.cxx.

void vil_memory_chunk::ref (  )  [inline]

Increment reference count.

Definition at line 49 of file vil_memory_chunk.h.

void vil_memory_chunk::unref (  ) 

Decrement reference count.

Definition at line 47 of file vil_memory_chunk.cxx.

int vil_memory_chunk::ref_count (  )  const [inline]

Number of objects referring to this data.

Definition at line 55 of file vil_memory_chunk.h.

void* vil_memory_chunk::data (  )  [inline]

Pointer to first element of data.

Definition at line 58 of file vil_memory_chunk.h.

void* vil_memory_chunk::const_data (  )  const [inline]

Pointer to first element of data.

Definition at line 61 of file vil_memory_chunk.h.

vil_pixel_format vil_memory_chunk::pixel_format (  )  const [inline]

Indicate what format data is to be saved as in binary IO.

Definition at line 64 of file vil_memory_chunk.h.

unsigned long vil_memory_chunk::size (  )  const [inline]

Number of bytes allocated.

Definition at line 67 of file vil_memory_chunk.h.

void vil_memory_chunk::set_size ( unsigned long  n,
vil_pixel_format  pixel_format 
)

Create space for n bytes.

pixel_format indicates what format to be used for binary IO

Definition at line 60 of file vil_memory_chunk.cxx.


Member Data Documentation

void* vil_memory_chunk::data_ [private]

Data.

Definition at line 18 of file vil_memory_chunk.h.

unsigned long vil_memory_chunk::size_ [private]

Number of elements (bytes).

Definition at line 21 of file vil_memory_chunk.h.

vil_pixel_format vil_memory_chunk::pixel_format_ [private]

Indicate what format data is (used for binary IO).

Should always be a scalar type.

Definition at line 25 of file vil_memory_chunk.h.

vcl_atomic_count vil_memory_chunk::ref_count_ [private]

Reference count.

Definition at line 28 of file vil_memory_chunk.h.


The documentation for this class was generated from the following files:
Generated on Tue Dec 2 05:08:03 2008 for core/vil by  doxygen 1.5.1