• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • @topname@
  • Sitemap
  • Contact Us
 

kdecore

KIOBufferBase Class Reference

#include <kiobuffer.h>

List of all members.


Detailed Description

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 KNetwork::KBufferedSocket and other buffering classes.

Author:
Thiago Macieira <thiago.macieira@kdemail.net>

Definition at line 45 of file kiobuffer.h.


Public Member Functions

 KIOBufferBase ()
 KIOBufferBase (const KIOBufferBase &)
virtual ~KIOBufferBase ()
KIOBufferBase & operator= (const KIOBufferBase &)
virtual bool canReadLine () const =0
virtual QCString readLine ()=0
virtual Q_LONG length () const =0
bool isEmpty () const
virtual Q_LONG size () const =0
bool isFull () const
virtual bool setSize (Q_LONG size)=0
virtual Q_LONG feedBuffer (const char *data, Q_LONG len)=0
virtual Q_LONG consumeBuffer (char *data, Q_LONG maxlen, bool discard=true)=0
virtual void clear ()=0

Constructor & Destructor Documentation

KIOBufferBase::KIOBufferBase (  )  [inline]

Default constructor.

Does nothing.

Definition at line 51 of file kiobuffer.h.

KIOBufferBase::KIOBufferBase ( const KIOBufferBase &   )  [inline]

Copy constructor.

Does nothing here.

Definition at line 57 of file kiobuffer.h.

virtual KIOBufferBase::~KIOBufferBase (  )  [inline, virtual]

Virtual destructor.

Does nothing.

Definition at line 63 of file kiobuffer.h.


Member Function Documentation

KIOBufferBase& KIOBufferBase::operator= ( const KIOBufferBase &   )  [inline]

Assignment operator.

Does nothing.

Definition at line 69 of file kiobuffer.h.

virtual bool KIOBufferBase::canReadLine (  )  const [pure virtual]

Returns true if a line can be read from the buffer.

virtual QCString KIOBufferBase::readLine (  )  [pure virtual]

Reads a line from the buffer and discards it.

virtual Q_LONG KIOBufferBase::length (  )  const [pure virtual]

Returns the number of bytes in the buffer.

Note that this is not the size of the buffer.

See also:
size

bool KIOBufferBase::isEmpty (  )  const [inline]

Returns true if the buffer is empty of data.

Definition at line 93 of file kiobuffer.h.

virtual Q_LONG KIOBufferBase::size (  )  const [pure virtual]

Retrieves the buffer size.

The value of -1 indicates that the buffer has no defined upper limit.

See also:
length for the length of the data stored

bool KIOBufferBase::isFull (  )  const [inline]

Returns true if the buffer is full (i.e., cannot receive more data).

Definition at line 107 of file kiobuffer.h.

virtual bool KIOBufferBase::setSize ( Q_LONG  size  )  [pure virtual]

Sets the size of the buffer, if allowed.

Parameters:
size the maximum size, use -1 for unlimited.
Returns:
true on success, false if an error occurred.
Note:
if the new size is less than length(), the buffer will be truncated

virtual Q_LONG KIOBufferBase::feedBuffer ( const char *  data,
Q_LONG  len 
) [pure virtual]

Adds data to the end of the buffer.

Parameters:
data the data to be added
len the data length, in bytes
Returns:
the number of bytes added to the end of the buffer.

virtual Q_LONG KIOBufferBase::consumeBuffer ( char *  data,
Q_LONG  maxlen,
bool  discard = true 
) [pure virtual]

Consumes data from the beginning of the buffer.

Parameters:
data where to copy the data to
maxlen the maximum length to copy, in bytes
discard if true, the bytes copied will be discarded
Returns:
the number of bytes copied from the buffer

virtual void KIOBufferBase::clear (  )  [pure virtual]

Clears the buffer.


The documentation for this class was generated from the following file:
  • kiobuffer.h

kdecore

Skip menu "kdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

@topname@

Skip menu "@topname@"
  •     kdnssd-avahi
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for @topname@ by doxygen 1.5.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal