#include <FilePStreamBuf.h>
Inheritance diagram for PLearn::FilePStreamBuf:
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. |
|
Reimplemented from PLearn::PStreamBuf. Definition at line 57 of file FilePStreamBuf.h. |
|
Definition at line 54 of file FilePStreamBuf.cc. |
|
Definition at line 64 of file FilePStreamBuf.cc. References f. |
|
Definition at line 115 of file FilePStreamBuf.cc. References build_(). Referenced by makeDeepCopyFromShallowCopy(). |
|
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(). |
|
Declares this class' options.
Definition at line 73 of file FilePStreamBuf.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
Definition at line 49 of file FilePStreamBuf.cc. Referenced by build_(). |
|
Transforms a shallow copy into a deep copy.
Definition at line 135 of file FilePStreamBuf.cc. |
|
|
|
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. |
|
writes exactly n characters from p (unbuffered, must flush)
Reimplemented from PLearn::PStreamBuf. Definition at line 127 of file FilePStreamBuf.cc. |
|
Definition at line 63 of file FilePStreamBuf.h. Referenced by build_(), makeDeepCopyFromShallowCopy(), read_(), write_(), and ~FilePStreamBuf(). |
|
Definition at line 71 of file FilePStreamBuf.h. Referenced by build_(). |
|
Definition at line 70 of file FilePStreamBuf.h. Referenced by build_(). |