PLearn 0.1
Public Member Functions | Protected Member Functions | Private Types
PLearn::NullPStreamBuf Class Reference

#include <NullPStreamBuf.h>

Inheritance diagram for PLearn::NullPStreamBuf:
Inheritance graph
[legend]
Collaboration diagram for PLearn::NullPStreamBuf:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 NullPStreamBuf ()

Protected Member Functions

virtual streamsize read_ (char *p, streamsize n)
 reads up to n characters into p You should override this call in subclasses.
virtual void write_ (const char *p, streamsize n)
 writes exactly n characters from p (unbuffered, must flush)

Private Types

typedef PStreamBuf inherited

Detailed Description

Definition at line 53 of file NullPStreamBuf.h.


Member Typedef Documentation

Reimplemented from PLearn::PStreamBuf.

Definition at line 58 of file NullPStreamBuf.h.


Constructor & Destructor Documentation

PLearn::NullPStreamBuf::NullPStreamBuf ( )

Definition at line 49 of file NullPStreamBuf.cc.

    :PStreamBuf(true,true)
{}

Member Function Documentation

NullPStreamBuf::streamsize PLearn::NullPStreamBuf::read_ ( char *  p,
streamsize  n 
) [protected, virtual]

reads up to n characters into p You should override this call in subclasses.

Default version issues a PLERROR

On success, the number of bytes read is returned. Zero indicates end of file. If we are not at end of file, at least one character should be returned (the call must block until at least one char is available). It is not an error if the number returned is smaller than the number of bytes requested; this may happen for example because fewer bytes are actually available right now (maybe because we were close to end-of-file, or because we are reading from a pipe, or from a terminal). If an error occurs, an exception should be thrown.

Reimplemented from PLearn::PStreamBuf.

Definition at line 54 of file NullPStreamBuf.cc.

{ return 0; }
void PLearn::NullPStreamBuf::write_ ( const char *  p,
streamsize  n 
) [protected, virtual]

writes exactly n characters from p (unbuffered, must flush)

Reimplemented from PLearn::PStreamBuf.

Definition at line 58 of file NullPStreamBuf.cc.

{}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines