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

PLearn::FilePStreamBuf Class Reference

#include <FilePStreamBuf.h>

Inheritance diagram for PLearn::FilePStreamBuf:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FilePStreamBuf ()
virtual ~FilePStreamBuf ()
 PLEARN_DECLARE_OBJECT (FilePStreamBuf)
virtual void build ()
virtual void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
 Transforms a shallow copy into a deep copy.


Static Public Member Functions

string getFilePathFromURL (string fileurl)

Public Attributes

string url
string openmode

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)


Static Protected Member Functions

void declareOptions (OptionList &ol)
 Declares this class' options.


Protected Attributes

FILE * f

Private Types

typedef PStreamBuf inherited

Private Member Functions

void build_ ()
 This does the actual building.


Member Typedef Documentation

typedef PStreamBuf PLearn::FilePStreamBuf::inherited [private]
 

Reimplemented from PLearn::PStreamBuf.

Definition at line 57 of file FilePStreamBuf.h.


Constructor & Destructor Documentation

PLearn::FilePStreamBuf::FilePStreamBuf  ) 
 

Definition at line 54 of file FilePStreamBuf.cc.

PLearn::FilePStreamBuf::~FilePStreamBuf  )  [virtual]
 

Definition at line 64 of file FilePStreamBuf.cc.

References f.


Member Function Documentation

void PLearn::FilePStreamBuf::build  )  [virtual]
 

Definition at line 115 of file FilePStreamBuf.cc.

References build_().

Referenced by makeDeepCopyFromShallowCopy().

void PLearn::FilePStreamBuf::build_  )  [private]
 

This does the actual building.

Reimplemented from PLearn::PStreamBuf.

Definition at line 85 of file FilePStreamBuf.cc.

References f, getFilePathFromURL(), openmode, PLERROR, and url.

Referenced by build().

void PLearn::FilePStreamBuf::declareOptions OptionList ol  )  [static, protected]
 

Declares this class' options.

Definition at line 73 of file FilePStreamBuf.cc.

References PLearn::declareOption(), and PLearn::OptionList.

string PLearn::FilePStreamBuf::getFilePathFromURL string  fileurl  )  [static]
 

Definition at line 49 of file FilePStreamBuf.cc.

Referenced by build_().

void PLearn::FilePStreamBuf::makeDeepCopyFromShallowCopy map< const void *, void * > &  copies  )  [virtual]
 

Transforms a shallow copy into a deep copy.

Definition at line 135 of file FilePStreamBuf.cc.

References build(), and f.

PLearn::FilePStreamBuf::PLEARN_DECLARE_OBJECT FilePStreamBuf   ) 
 

FilePStreamBuf::streamsize PLearn::FilePStreamBuf::read_ char *  p,
streamsize  n
[protected, virtual]
 

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

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 121 of file FilePStreamBuf.cc.

References f.

void PLearn::FilePStreamBuf::write_ const char *  p,
streamsize  n
[protected, virtual]
 

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

Reimplemented from PLearn::PStreamBuf.

Definition at line 127 of file FilePStreamBuf.cc.

References f, and PLERROR.


Member Data Documentation

FILE* PLearn::FilePStreamBuf::f [protected]
 

Definition at line 63 of file FilePStreamBuf.h.

Referenced by build_(), makeDeepCopyFromShallowCopy(), read_(), write_(), and ~FilePStreamBuf().

string PLearn::FilePStreamBuf::openmode
 

Definition at line 71 of file FilePStreamBuf.h.

Referenced by build_().

string PLearn::FilePStreamBuf::url
 

Definition at line 70 of file FilePStreamBuf.h.

Referenced by build_().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:23:09 2004 for PLearn by doxygen 1.3.7