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 (IOOffset offset, const void *data, IOSize length)
 
 IOPosBuffer (IOOffset offset, void *data, IOSize length)
 
 IOPosBuffer (void)
 
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() [1/3]

IOPosBuffer::IOPosBuffer ( void  )
inline

Construct a null I/O buffer.

Definition at line 28 of file IOPosBuffer.h.

28 : m_offset(0), m_data(nullptr), m_length(0) {}

◆ IOPosBuffer() [2/3]

IOPosBuffer::IOPosBuffer ( IOOffset  offset,
void *  data,
IOSize  length 
)
inline

Construct a I/O buffer for reading.

Definition at line 31 of file IOPosBuffer.h.

32  : m_offset(offset), m_data(data), m_length(length) {}

◆ IOPosBuffer() [3/3]

IOPosBuffer::IOPosBuffer ( IOOffset  offset,
const void *  data,
IOSize  length 
)
inline

Construct a I/O buffer for writing.

Definition at line 35 of file IOPosBuffer.h.

36  : m_offset(offset), m_data(const_cast<void *>(data)), m_length(length) {}

Member Function Documentation

◆ data()

void * IOPosBuffer::data ( void  ) const
inline

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

Definition at line 42 of file IOPosBuffer.h.

42 { return m_data; }

References m_data.

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

◆ offset()

IOOffset IOPosBuffer::offset ( void  ) const
inline

◆ set_data()

void IOPosBuffer::set_data ( void *  new_data)
inline

Update the buffer's data area

Definition at line 51 of file IOPosBuffer.h.

51 { m_data = new_data; }

References m_data.

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

◆ set_offset()

void IOPosBuffer::set_offset ( IOOffset  new_offset)
inline

Update the file offset

Definition at line 48 of file IOPosBuffer.h.

48 { m_offset = new_offset; }

References m_offset.

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

◆ set_size()

void IOPosBuffer::set_size ( IOSize  new_length)
inline

Update the buffer's size

Definition at line 54 of file IOPosBuffer.h.

54 { m_length = new_length; }

References m_length.

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

◆ size()

IOSize IOPosBuffer::size ( void  ) const
inline

Member Data Documentation

◆ m_data

void* IOPosBuffer::m_data
private

Definition at line 23 of file IOPosBuffer.h.

Referenced by data(), and set_data().

◆ m_length

IOSize IOPosBuffer::m_length
private

Definition at line 24 of file IOPosBuffer.h.

Referenced by set_size(), and size().

◆ m_offset

IOOffset IOPosBuffer::m_offset
private

Definition at line 22 of file IOPosBuffer.h.

Referenced by offset(), and set_offset().

IOPosBuffer::m_data
void * m_data
Definition: IOPosBuffer.h:23
IOPosBuffer::m_offset
IOOffset m_offset
Definition: IOPosBuffer.h:22
IOPosBuffer::data
void * data(void) const
Definition: IOPosBuffer.h:42
IOPosBuffer::offset
IOOffset offset(void) const
Definition: IOPosBuffer.h:39
IOPosBuffer::m_length
IOSize m_length
Definition: IOPosBuffer.h:24