CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
IOPosBuffer Struct Reference

#include <IOPosBuffer.h>

Public Member Functions

void * data (void) const
 
 IOPosBuffer (void)
 
 IOPosBuffer (IOOffset offset, void *data, IOSize length)
 
 IOPosBuffer (IOOffset offset, const void *data, IOSize length)
 
IOOffset offset (void) const
 
void set_data (void *new_buffer)
 
void set_offset (IOOffset new_offset)
 
void set_size (IOSize new_size)
 
IOSize size (void) const
 

Private Attributes

void * m_data
 
IOSize m_length
 
IOOffset m_offset
 

Detailed Description

Buffer for I/O operations.

Definition at line 7 of file IOPosBuffer.h.

Constructor & Destructor Documentation

IOPosBuffer::IOPosBuffer ( void  )
inline

Construct a null I/O buffer.

Definition at line 30 of file IOPosBuffer.h.

31  : m_offset (0),
32  m_data (nullptr),
33  m_length (0)
34 {}
IOSize m_length
Definition: IOPosBuffer.h:25
IOOffset m_offset
Definition: IOPosBuffer.h:23
void * m_data
Definition: IOPosBuffer.h:24
IOPosBuffer::IOPosBuffer ( IOOffset  offset,
void *  data,
IOSize  length 
)
inline

Construct a I/O buffer for reading.

Definition at line 38 of file IOPosBuffer.h.

39  : m_offset (offset),
40  m_data (data),
41  m_length (length)
42 {}
IOSize m_length
Definition: IOPosBuffer.h:25
IOOffset m_offset
Definition: IOPosBuffer.h:23
IOOffset offset(void) const
Definition: IOPosBuffer.h:54
void * m_data
Definition: IOPosBuffer.h:24
void * data(void) const
Definition: IOPosBuffer.h:59
IOPosBuffer::IOPosBuffer ( IOOffset  offset,
const void *  data,
IOSize  length 
)
inline

Construct a I/O buffer for writing.

Definition at line 46 of file IOPosBuffer.h.

47  : m_offset (offset),
48  m_data (const_cast<void *> (data)),
49  m_length (length)
50 {}
IOSize m_length
Definition: IOPosBuffer.h:25
IOOffset m_offset
Definition: IOPosBuffer.h:23
IOOffset offset(void) const
Definition: IOPosBuffer.h:54
void * m_data
Definition: IOPosBuffer.h:24
void * data(void) const
Definition: IOPosBuffer.h:59

Member Function Documentation

void * IOPosBuffer::data ( void  ) const
inline

Return a pointer to the beginning of the buffer's data area.

Definition at line 59 of file IOPosBuffer.h.

References m_data.

Referenced by consumeChunkBack(), consumeChunkFront(), DavixFile::readv(), XrdFile::readv(), and ReadRepacker::unpack().

60 { return m_data; }
void * m_data
Definition: IOPosBuffer.h:24
IOOffset IOPosBuffer::offset ( void  ) const
inline
void IOPosBuffer::set_data ( void *  new_data)
inline

Update the buffer's data area

Definition at line 74 of file IOPosBuffer.h.

References m_data.

Referenced by consumeChunkBack(), consumeChunkFront(), ReadRepacker::packInternal(), and XrdFile::readv().

75 { m_data = new_data; }
void * m_data
Definition: IOPosBuffer.h:24
void IOPosBuffer::set_offset ( IOOffset  new_offset)
inline

Update the file offset

Definition at line 69 of file IOPosBuffer.h.

References m_offset.

Referenced by consumeChunkBack(), consumeChunkFront(), ReadRepacker::packInternal(), and XrdFile::readv().

70 { m_offset = new_offset; }
IOOffset m_offset
Definition: IOPosBuffer.h:23
void IOPosBuffer::set_size ( IOSize  new_length)
inline

Update the buffer's size

Definition at line 79 of file IOPosBuffer.h.

References m_length.

Referenced by consumeChunkBack(), consumeChunkFront(), ReadRepacker::packInternal(), and XrdFile::readv().

80 { m_length = new_length; }
IOSize m_length
Definition: IOPosBuffer.h:25
IOSize IOPosBuffer::size ( void  ) const
inline

Member Data Documentation

void* IOPosBuffer::m_data
private

Definition at line 24 of file IOPosBuffer.h.

Referenced by data(), and set_data().

IOSize IOPosBuffer::m_length
private

Definition at line 25 of file IOPosBuffer.h.

Referenced by set_size(), and size().

IOOffset IOPosBuffer::m_offset
private

Definition at line 23 of file IOPosBuffer.h.

Referenced by offset(), and set_offset().