Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

OW32::auto_byte_buf Class Reference

auto_buf with extensions to allow writing char* data and char data without casts More...

#include <auto_buf.h>

Inheritance diagram for OW32::auto_byte_buf:

OW32::auto_buf< unsigned char > List of all members.

Public Member Functions

 auto_byte_buf ()
 Default constructor to create an empty buffer.
 auto_byte_buf (const unsigned char *s, size_t n)
 Constructor that copies an element string using write.
 auto_byte_buf (const unsigned char *s)
 Constructor that copies an element string using write.
size_t write (const void *s, size_t n)
 Put a block of elements.
size_t write (const unsigned char *s)
 Put a block of elements, terminated by a 0.
size_t write (const char *s)
 Put a block of elements, terminated by a 0.
auto_byte_bufoperator<< (const char c)
 Insertion operator for a single element.
auto_byte_bufoperator<< (const char *s)
 Insertion operator for a 0 terminated element string.
auto_byte_bufoperator<< (const unsigned char &c)
 Insertion operator for a single element.
auto_byte_bufoperator<< (const unsigned char *s)
 Insertion operator for a 0 terminated element string.

Detailed Description

auto_buf with extensions to allow writing char* data and char data without casts


Constructor & Destructor Documentation

OW32::auto_byte_buf::auto_byte_buf  )  [inline]
 

Default constructor to create an empty buffer.

Throws no exceptions.

OW32::auto_byte_buf::auto_byte_buf const unsigned char *  s,
size_t  n
[inline]
 

Constructor that copies an element string using write.

Parameters:
s The string to copy
n The length of the element string
May throw std::bad_alloc.

OW32::auto_byte_buf::auto_byte_buf const unsigned char *  s  )  [inline]
 

Constructor that copies an element string using write.

Parameters:
s The string to copy
May throw std::bad_alloc.


Member Function Documentation

auto_byte_buf& OW32::auto_byte_buf::operator<< const unsigned char *  s  )  [inline]
 

Insertion operator for a 0 terminated element string.

Parameters:
s The string to insert

Reimplemented from OW32::auto_buf< unsigned char >.

auto_byte_buf& OW32::auto_byte_buf::operator<< const unsigned char &  c  )  [inline]
 

Insertion operator for a single element.

Parameters:
c The element to insert

Reimplemented from OW32::auto_buf< unsigned char >.

auto_byte_buf& OW32::auto_byte_buf::operator<< const char *  s  )  [inline]
 

Insertion operator for a 0 terminated element string.

Parameters:
s The string to insert

auto_byte_buf& OW32::auto_byte_buf::operator<< const char  c  )  [inline]
 

Insertion operator for a single element.

Parameters:
c The element to insert

size_t OW32::auto_byte_buf::write const char *  s  )  [inline]
 

Put a block of elements, terminated by a 0.

Parameters:
s The block to put
Returns:
The number of elements written
Does not copy the terminating 0 to the buf

size_t OW32::auto_byte_buf::write const unsigned char *  s  )  [inline]
 

Put a block of elements, terminated by a 0.

Parameters:
s The block to put
Returns:
The number of elements written
Does not copy the terminating 0 to the buf

Reimplemented from OW32::auto_buf< unsigned char >.

size_t OW32::auto_byte_buf::write const void *  s,
size_t  n
[inline]
 

Put a block of elements.

Parameters:
s The block to put
n The number of elements in the block
Returns:
The number of elements written


The documentation for this class was generated from the following file:
Generated on Sun Jun 5 01:29:23 2005 for OW32 by  doxygen 1.3.9.1