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 57 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 59 of file IO.cc.

References bytes_left_, iov_, and iovcnt_.

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

Definition at line 71 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 81 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 119 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 135 of file IO.cc.

References iov_.

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

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

Definition at line 136 of file IO.cc.

References iovcnt_.

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

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

Definition at line 137 of file IO.cc.

References bytes_left_.

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


Member Data Documentation

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

Definition at line 140 of file IO.cc.

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

int oasys::COWIoVec::iovcnt_ [private]

Definition at line 141 of file IO.cc.

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

size_t oasys::COWIoVec::bytes_left_ [private]

Definition at line 142 of file IO.cc.

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

bool oasys::COWIoVec::copied_ [private]

Definition at line 144 of file IO.cc.

Referenced by consume(), and copy().

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

Definition at line 145 of file IO.cc.

Referenced by copy().

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

Definition at line 146 of file IO.cc.

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


The documentation for this class was generated from the following file:
Generated on Fri Dec 22 14:48:06 2006 for DTN Reference Implementation by  doxygen 1.5.1