#include <fileclasses.h>
Inheritance diagram for salt::StdFile:
Public Member Functions | |
StdFile (FILE *f) | |
StdFile (const char *fn=NULL, char *mode="rb") | |
virtual | ~StdFile () |
bool | Open (const char *fn=NULL, char *mode="rb") |
opens the file fn in the specified mode. | |
void | Close () |
closes a previously opened file | |
void | Destroy () |
releases any occupied ressources used by the file. | |
int | Eof () |
returns a non zero value if the file pointer is at the end of the file | |
long | Tell () |
returns the current file pointer position | |
int | GetPos (long *pos) |
copies the current file pointer position to pos and returns true on success | |
int | Seek (long offset, int origin) |
sets the file pointer for the file. | |
void | Rewind () |
sets the file pointer to the beginning of the file | |
long | Size () |
return the size of the file | |
char * | Gets (char *buffer, int n) |
reads in at most one less than n characters from the file and stores them into buffer. | |
int | Getc () |
reads the next character from the file returns it as an int r EOF on end of file or error. | |
int | Puts (const char *s) |
writes a string without the trailing '' | |
int | Putc (int c) |
writes a single character | |
size_t | Read (void *buffer, size_t size, size_t count) |
reads reads count elements of data, each size bytes long, storing them in the specified buffer | |
size_t | Read (void *buffer, size_t count) |
reads count bytes of data, storing them in the specified buffer | |
size_t | Write (void *buffer, size_t size, size_t count) |
writes count elements of data from buffer, each size bytes long | |
size_t | Write (void *buffer, size_t count) |
writes count bytes of data from buffer | |
void * | GetHandle () |
returns a handle identifying the file. | |
Protected Attributes | |
FILE * | mHandle |
the standard file handle |
Definition at line 299 of file fileclasses.h.
|
Definition at line 229 of file fileclasses.cpp. References Destroy(), and mHandle. Here is the call graph for this function: ![]() |
|
Definition at line 237 of file fileclasses.cpp. References mHandle, and Open(). Here is the call graph for this function: ![]() |
|
Definition at line 244 of file fileclasses.cpp. References Destroy(). Here is the call graph for this function: ![]() |
|
closes a previously opened file
Implements salt::RFile. Definition at line 256 of file fileclasses.cpp. References mHandle. Referenced by Destroy(). |
|
releases any occupied ressources used by the file. The semantic is up to the derived classes Implements salt::RFile. Definition at line 250 of file fileclasses.cpp. References Close(). Referenced by StdFile(), and ~StdFile(). Here is the call graph for this function: ![]() |
|
returns a non zero value if the file pointer is at the end of the file
Implements salt::RFile. Definition at line 280 of file fileclasses.cpp. References mHandle. |
|
reads the next character from the file returns it as an int r EOF on end of file or error.
Implements salt::RFile. Definition at line 314 of file fileclasses.cpp. References mHandle. |
|
returns a handle identifying the file. The semantics of this handle depends on the subclass, implementing this method Implements salt::RFile. Definition at line 344 of file fileclasses.cpp. References mHandle. Referenced by salt::MemFile::Open(). |
|
copies the current file pointer position to pos and returns true on success
Implements salt::RFile. Definition at line 299 of file fileclasses.cpp. References mHandle. |
|
reads in at most one less than n characters from the file and stores them into buffer. A '' is stored after the last character in the buffer. Implements salt::RFile. Definition at line 309 of file fileclasses.cpp. References mHandle. |
|
opens the file fn in the specified mode. The implementation of the namespace and mode semantics ist up to derived classes Implements salt::RFile. Definition at line 265 of file fileclasses.cpp. References mHandle. Referenced by StdFile(). |
|
writes a single character
Implements salt::WFile. Definition at line 324 of file fileclasses.cpp. References mHandle. |
|
writes a string without the trailing ''
Implements salt::WFile. Definition at line 319 of file fileclasses.cpp. References mHandle. |
|
reads count bytes of data, storing them in the specified buffer
Implements salt::RFile. Definition at line 324 of file fileclasses.h. References Read(). Here is the call graph for this function: ![]() |
|
reads reads count elements of data, each size bytes long, storing them in the specified buffer
Implements salt::RFile. Definition at line 334 of file fileclasses.cpp. References mHandle. Referenced by salt::MemFile::Open(), and Read(). |
|
sets the file pointer to the beginning of the file
Implements salt::RFile. Definition at line 304 of file fileclasses.cpp. References mHandle. |
|
sets the file pointer for the file. The new position, measured in bytes, is obtained by adding offset bytes to the position specified by origin. If origin is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. Implements salt::RFile. Definition at line 329 of file fileclasses.cpp. References mHandle. |
|
return the size of the file
Implements salt::RFile. Definition at line 290 of file fileclasses.cpp. References mHandle. Referenced by salt::MemFile::Open(). |
|
returns the current file pointer position
Implements salt::RFile. Definition at line 285 of file fileclasses.cpp. References mHandle. |
|
writes count bytes of data from buffer
Implements salt::WFile. Definition at line 327 of file fileclasses.h. References Write(). Here is the call graph for this function: ![]() |
|
writes count elements of data from buffer, each size bytes long
Implements salt::WFile. Definition at line 339 of file fileclasses.cpp. References mHandle. Referenced by Write(). |
|
the standard file handle
Definition at line 333 of file fileclasses.h. Referenced by Close(), Eof(), Getc(), GetHandle(), GetPos(), Gets(), Open(), Putc(), Puts(), Read(), Rewind(), Seek(), Size(), StdFile(), Tell(), and Write(). |