Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

dtpf::BufferDescriptor Class Reference

#include <BufferDescriptor.h>

List of all members.


Detailed Description

A BufferDescriptor encapsulates information related to a particular buffer of data.

The underlying memory is created by a BufferGroup.


Public Member Functions

uint32 FrameNumber () const
 Get the frame number for this buffer.
bigtime_t Timestamp ()
 Get the timestamp for this buffer.
uint8 * DataBytes () const
 Get a pointer to the start of this buffer's data region.
size_t DataSize () const
 Get the size of the buffer's data region.
DataFormatDataFormat () const
 Get the DataFormat for this buffer.
bool operator== (const BufferDescriptor &that) const
 Check if this buffer is equal to another.
bool operator!= (const BufferDescriptor &that) const
 Check if this buffer is not equal to another.

Static Public Attributes

const BufferDescriptor null
 A null (invalid) buffer descriptor.

Private Member Functions

 BufferDescriptor ()
 Class ctor, creates an unitialized buffer.
 ~BufferDescriptor ()
 Class dtor, keeps construction/destruction private.

Friends

class BufferGroup
 Give buffer groups access to our private members.


Constructor & Destructor Documentation

dtpf::BufferDescriptor::BufferDescriptor  )  [private]
 

Class ctor, creates an unitialized buffer.

dtpf::BufferDescriptor::~BufferDescriptor  )  [private]
 

Class dtor, keeps construction/destruction private.


Member Function Documentation

uint8* dtpf::BufferDescriptor::DataBytes  )  const
 

Get a pointer to the start of this buffer's data region.

The data in this region is organized according to the buffer's DataFormat.

Returns:
A pointer to the start of this buffer's data.

DataFormat* dtpf::BufferDescriptor::DataFormat  )  const
 

Get the DataFormat for this buffer.

The DataFormat is the same for all buffers in a buffer group, and is set when the buffer group is created.

Returns:
The DataFormat for this buffer.

size_t dtpf::BufferDescriptor::DataSize  )  const
 

Get the size of the buffer's data region.

Returns:
The length of this buffer's data in bytes.

uint32 dtpf::BufferDescriptor::FrameNumber  )  const
 

Get the frame number for this buffer.

The frame number is set by the Node a buffer originates from.

Returns:
The frame number for this buffer.

bool dtpf::BufferDescriptor::operator!= const BufferDescriptor that  )  const
 

Check if this buffer is not equal to another.

Parameters:
that The buffer to comapre to this buffer.
Returns:
True if this is not equal to that, false otherwise.

bool dtpf::BufferDescriptor::operator== const BufferDescriptor that  )  const
 

Check if this buffer is equal to another.

Two buffers are considered equal if they have the same frame number, timestamp and DataFormat, and refer to the same data region.

Parameters:
that The buffer to comapre to this buffer.
Returns:
True if this is equal to that, false otherwise.

bigtime_t dtpf::BufferDescriptor::Timestamp  ) 
 

Get the timestamp for this buffer.

This operation is intended to be used in real-time processing and may not have meaning for offline processing.

Returns:
The timestamp for this buffer, in microseconds from some reference time.


Friends And Related Function Documentation

friend class BufferGroup [friend]
 

Give buffer groups access to our private members.


Member Data Documentation

const BufferDescriptor dtpf::BufferDescriptor::null [static]
 

A null (invalid) buffer descriptor.

This is probably not needed, but it is here for now.


The documentation for this class was generated from the following file:
Generated on Wed Aug 3 07:26:19 2005 for DTPF by  doxygen 1.3.9.1