.TH "KIOBufferBase" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KIOBufferBase \- base for I/O buffer implementation  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kiobuffer.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKIOBufferBase\fP ()"
.br
.ti -1c
.RI "\fBKIOBufferBase\fP (const \fBKIOBufferBase\fP &)"
.br
.ti -1c
.RI "virtual \fB~KIOBufferBase\fP ()"
.br
.ti -1c
.RI "\fBKIOBufferBase\fP & \fBoperator=\fP (const \fBKIOBufferBase\fP &)"
.br
.ti -1c
.RI "virtual bool \fBcanReadLine\fP () const =0"
.br
.ti -1c
.RI "virtual \fBQCString\fP \fBreadLine\fP ()=0"
.br
.ti -1c
.RI "virtual Q_LONG \fBlength\fP () const =0"
.br
.ti -1c
.RI "bool \fBisEmpty\fP () const "
.br
.ti -1c
.RI "virtual Q_LONG \fBsize\fP () const =0"
.br
.ti -1c
.RI "bool \fBisFull\fP () const "
.br
.ti -1c
.RI "virtual bool \fBsetSize\fP (Q_LONG size)=0"
.br
.ti -1c
.RI "virtual Q_LONG \fBfeedBuffer\fP (const char *data, Q_LONG len)=0"
.br
.ti -1c
.RI "virtual Q_LONG \fBconsumeBuffer\fP (char *data, Q_LONG maxlen, bool discard=true)=0"
.br
.ti -1c
.RI "virtual void \fBclear\fP ()=0"
.br
.in -1c
.SH "Detailed Description"
.PP 
base for I/O buffer implementation 

This class declares the base methods to interface with an I/O buffer. Most applications will not need to access this class directly, since it is all handled by \fBKNetwork::KBufferedSocket\fP and other buffering classes.
.PP
\fBAuthor:\fP
.RS 4
Thiago Macieira <thiago.macieira@kdemail.net> 
.RE
.PP

.PP
Definition at line 45 of file kiobuffer.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KIOBufferBase::KIOBufferBase ()\fC [inline]\fP"
.PP
Default constructor. 
.PP
Does nothing. 
.PP
Definition at line 51 of file kiobuffer.h.
.SS "KIOBufferBase::KIOBufferBase (const \fBKIOBufferBase\fP &)\fC [inline]\fP"
.PP
Copy constructor. 
.PP
Does nothing here. 
.PP
Definition at line 57 of file kiobuffer.h.
.SS "virtual KIOBufferBase::~\fBKIOBufferBase\fP ()\fC [inline, virtual]\fP"
.PP
Virtual destructor. 
.PP
Does nothing. 
.PP
Definition at line 63 of file kiobuffer.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBKIOBufferBase\fP& KIOBufferBase::operator= (const \fBKIOBufferBase\fP &)\fC [inline]\fP"
.PP
Assignment operator. 
.PP
Does nothing. 
.PP
Definition at line 69 of file kiobuffer.h.
.SS "virtual bool KIOBufferBase::canReadLine () const\fC [pure virtual]\fP"
.PP
Returns true if a line can be read from the buffer. 
.PP
.SS "virtual \fBQCString\fP KIOBufferBase::readLine ()\fC [pure virtual]\fP"
.PP
Reads a line from the buffer and discards it. 
.PP
.SS "virtual Q_LONG KIOBufferBase::length () const\fC [pure virtual]\fP"
.PP
Returns the number of bytes in the buffer. 
.PP
Note that this is not the size of the buffer.
.PP
\fBSee also:\fP
.RS 4
\fBsize\fP 
.RE
.PP

.PP
Referenced by isEmpty(), and isFull().
.SS "bool KIOBufferBase::isEmpty () const\fC [inline]\fP"
.PP
Returns true if the buffer is empty of data. 
.PP
Definition at line 93 of file kiobuffer.h.
.PP
References length().
.SS "virtual Q_LONG KIOBufferBase::size () const\fC [pure virtual]\fP"
.PP
Retrieves the buffer size. 
.PP
The value of -1 indicates that the buffer has no defined upper limit.
.PP
\fBSee also:\fP
.RS 4
\fBlength\fP for the \fBlength\fP of the data stored 
.RE
.PP

.PP
Referenced by isFull().
.SS "bool KIOBufferBase::isFull () const\fC [inline]\fP"
.PP
Returns true if the buffer is full (i.e., cannot receive more data). 
.PP
Definition at line 107 of file kiobuffer.h.
.PP
References length(), and size().
.SS "virtual bool KIOBufferBase::setSize (Q_LONG size)\fC [pure virtual]\fP"
.PP
Sets the size of the buffer, if allowed. 
.PP
\fBParameters:\fP
.RS 4
\fIsize\fP the maximum size, use -1 for unlimited. 
.RE
.PP
\fBReturns:\fP
.RS 4
true on success, false if an error occurred. 
.RE
.PP
\fBNote:\fP
.RS 4
if the new size is less than \fBlength()\fP, the buffer will be truncated 
.RE
.PP

.SS "virtual Q_LONG KIOBufferBase::feedBuffer (const char * data, Q_LONG len)\fC [pure virtual]\fP"
.PP
Adds data to the end of the buffer. 
.PP
\fBParameters:\fP
.RS 4
\fIdata\fP the data to be added 
.br
\fIlen\fP the data length, in bytes 
.RE
.PP
\fBReturns:\fP
.RS 4
the number of bytes added to the end of the buffer. 
.RE
.PP

.SS "virtual Q_LONG KIOBufferBase::consumeBuffer (char * data, Q_LONG maxlen, bool discard = \fCtrue\fP)\fC [pure virtual]\fP"
.PP
Consumes data from the beginning of the buffer. 
.PP
\fBParameters:\fP
.RS 4
\fIdata\fP where to copy the data to 
.br
\fImaxlen\fP the maximum length to copy, in bytes 
.br
\fIdiscard\fP if true, the bytes copied will be discarded 
.RE
.PP
\fBReturns:\fP
.RS 4
the number of bytes copied from the buffer 
.RE
.PP

.SS "virtual void KIOBufferBase::clear ()\fC [pure virtual]\fP"
.PP
Clears the buffer. 
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
