Collage  1.5.0
High-performance C++ library for developing object-oriented distributed applications.
co::Buffer Class Reference

A receive buffer for a Connection. More...

#include <buffer.h>

+ Inheritance diagram for co::Buffer:
+ Collaboration diagram for co::Buffer:

Public Member Functions

CO_API Buffer (BufferListener *listener=0)
 Construct a new buffer. More...
 
virtual CO_API ~Buffer ()
 Destruct this buffer. More...
 
CO_API bool isFree () const
 
void setUsed ()
 

Detailed Description

A receive buffer for a Connection.

The buffer does not auto-delete, that is, a BufferPtr is not a smart pointer. Instead, the BufferListener interface notifies when a buffer is reusable. The BufferCache uses this to recycle unreferenced buffers, i.e., unused by any ICommand.

Definition at line 44 of file buffer.h.

Constructor & Destructor Documentation

CO_API co::Buffer::Buffer ( BufferListener listener = 0)
explicit

Construct a new buffer.

Version
1.0
virtual CO_API co::Buffer::~Buffer ( )
virtual

Destruct this buffer.

Version
1.0

Member Function Documentation

CO_API bool co::Buffer::isFree ( ) const
Returns
true if the buffer is no longer in use.
Version
1.0

The documentation for this class was generated from the following file: