oasys::COWIoVec Class Reference

List of all members.

Detailed Description

Small helper class which is a copy-on-write iovec and also handle adjustment for consumption of the bytes in the iovec.

Definition at line 36 of file IO.cc.

Public Member Functions

 COWIoVec (const struct iovec *iov, int iovcnt)
 ~COWIoVec ()
void consume (size_t cc)
 
Returns:
number of bytes left in the iovecs

void copy ()
iovec * iov ()
int iovcnt ()
size_t bytes_left ()

Private Attributes

iovec * iov_
int iovcnt_
size_t bytes_left_
bool copied_
iovec static_iov_ [16]
iovec * dynamic_iov_


Constructor & Destructor Documentation

oasys::COWIoVec::COWIoVec ( const struct iovec *  iov,
int  iovcnt 
) [inline]

Definition at line 38 of file IO.cc.

References bytes_left_, iov_, and iovcnt_.

oasys::COWIoVec::~COWIoVec (  )  [inline]

Definition at line 50 of file IO.cc.

References dynamic_iov_, and iov_.


Member Function Documentation

void oasys::COWIoVec::consume ( size_t  cc  )  [inline]

Returns:
number of bytes left in the iovecs

Definition at line 60 of file IO.cc.

References ASSERT, bytes_left_, copied_, copy(), iov_, and iovcnt_.

Referenced by oasys::IO::rwvall().

void oasys::COWIoVec::copy (  )  [inline]

Definition at line 98 of file IO.cc.

References ASSERT, copied_, dynamic_iov_, iov_, iovcnt_, and static_iov_.

Referenced by consume().

struct iovec* oasys::COWIoVec::iov (  )  [inline]

Definition at line 114 of file IO.cc.

References iov_.

Referenced by oasys::IO::rwvall().

int oasys::COWIoVec::iovcnt (  )  [inline]

Definition at line 115 of file IO.cc.

References iovcnt_.

Referenced by oasys::IO::rwvall().

size_t oasys::COWIoVec::bytes_left (  )  [inline]

Definition at line 116 of file IO.cc.

References bytes_left_.

Referenced by oasys::IO::rwvall().


Member Data Documentation

struct iovec* oasys::COWIoVec::iov_ [private]

Definition at line 119 of file IO.cc.

Referenced by consume(), copy(), COWIoVec(), iov(), and ~COWIoVec().

int oasys::COWIoVec::iovcnt_ [private]

Definition at line 120 of file IO.cc.

Referenced by consume(), copy(), COWIoVec(), and iovcnt().

size_t oasys::COWIoVec::bytes_left_ [private]

Definition at line 121 of file IO.cc.

Referenced by bytes_left(), consume(), and COWIoVec().

bool oasys::COWIoVec::copied_ [private]

Definition at line 123 of file IO.cc.

Referenced by consume(), and copy().

struct iovec oasys::COWIoVec::static_iov_[16] [private]

Definition at line 124 of file IO.cc.

Referenced by copy().

struct iovec* oasys::COWIoVec::dynamic_iov_ [private]

Definition at line 125 of file IO.cc.

Referenced by copy(), and ~COWIoVec().


The documentation for this class was generated from the following file:
Generated on Thu Jun 7 12:54:35 2007 for DTN Reference Implementation by  doxygen 1.5.1