10 #ifndef FILEIOSTREAM_H_
11 #define FILEIOSTREAM_H_
32 FileIOStream( FILE* file = NULL,
bool autoClose =
false );
45 void setFile( FILE* file,
const char* filename )
51 bool seek(
unsigned int location );
80 return write( buffer, strlen( buffer ) );
93 bool open(
const char* filename,
bool clobber );
bool autoClose_
Definition: FileIOStream.h:102
virtual bool eof()
Indicates if the end of file has been reached.
Definition: FileIOStream.cpp:57
void setFile(FILE *file)
Change the assoicated file.
Definition: FileIOStream.h:84
FILE * file_
Definition: FileIOStream.h:101
void setFile(FILE *file, const char *filename)
Change the assoicated file.
Definition: FileIOStream.h:45
This is a rather abstract class that can be implemented by classes that want to send and receive stre...
Definition: IOStream.h:30
virtual ~FileIOStream()
Definition: FileIOStream.cpp:28
const struct stat getStat()
Definition: FileIOStream.cpp:76
const char * getName()
returns name of the stream
Definition: FileIOStream.h:62
Wraps a c FILE* handle with an IOStream class.
Definition: FileIOStream.h:27
Mutex fileMutex_
Definition: FileIOStream.h:103
A simple pthread Mutex abstraction.
Definition: Mutex.h:20
void close()
Definition: FileIOStream.cpp:105
Contains the IOStream and NullIOStream class declarations.
void flush()
Definition: FileIOStream.cpp:115
virtual IOStream & read(char *buffer, size_t num)
reads num bytes from buffer to the output buffer/stream
Definition: FileIOStream.cpp:37
FileIOStream(FILE *file=NULL, bool autoClose=false)
Constructor.
Definition: FileIOStream.cpp:13
Replacement for standard template class string.
Definition: Str.h:12
virtual IOStream & write(const char *buffer)
writes zero-terminated buffer to the output buffer/stream
Definition: FileIOStream.h:78
int tell()
Definition: FileIOStream.cpp:95
const char * cStr() const
Definition: Str.h:188
const Str & getFilename()
Definition: FileIOStream.h:67
Contains the Mutex, ThreadCondition, and MutexLocker class declarations.
IOStream & write(const char *buffer, size_t num)
writes num bytes from buffer to the output buffer/stream
Definition: FileIOStream.cpp:85
bool open(const char *filename, bool clobber)
Definition: FileIOStream.cpp:124
bool isWritable()
indicates whether the stream can actually be written to.
Definition: FileIOStream.h:95
bool seek(unsigned int location)
Definition: FileIOStream.cpp:47
virtual void clearErr()
Definition: FileIOStream.cpp:67
Str filename_
Definition: FileIOStream.h:109
bool isReadable()
indicates whether the stream can actually be read from.
Definition: FileIOStream.h:57