#include <DiskXFile.h>
|
| DiskXFile (const char *file_name, const char *open_flags) |
| Open "file_name" with the flags #open_flags#. More...
|
|
| DiskXFile (FILE *file_) |
| Use the given file... More...
|
|
virtual int | read (void *ptr, int block_size, int n_blocks) |
|
virtual int | write (const void *ptr, int block_size, int n_blocks) |
|
virtual int | eof () |
| Are we at the end ? More...
|
|
virtual int | flush () |
| Flush the file. More...
|
|
virtual int | seek (long offset, int whence) |
| Seek. More...
|
|
virtual long | tell () |
| Tell me where am I... More...
|
|
virtual void | rewind () |
| Rewind. More...
|
|
virtual int | printf (const char *format,...) |
|
virtual int | scanf (const char *format, void *ptr) |
|
virtual char * | gets (char *dest, int size_) |
| Print some text. More...
|
|
virtual | ~DiskXFile () |
|
| XFile () |
|
int | taggedRead (void *ptr, int block_size, int n_blocks, const char *tag) |
|
int | taggedWrite (const void *ptr, int block_size, int n_blocks, const char *tag) |
| Write and write the tag/the size. More...
|
|
virtual long | size () |
|
virtual | ~XFile () |
|
A file on the disk.
- Author
- Ronan Collobert (collo.nosp@m.ber@.nosp@m.idiap.nosp@m..ch)
DiskXFile::DiskXFile |
( |
const char * |
file_name, |
|
|
const char * |
open_flags |
|
) |
| |
Open "file_name" with the flags #open_flags#.
DiskXFile::DiskXFile |
( |
FILE * |
file_ | ) |
|
DiskXFile::~DiskXFile |
( |
| ) |
|
|
virtual |
Are we at the end ?
Implements XFile.
Flush the file.
Implements XFile.
char * DiskXFile::gets |
( |
char * |
dest, |
|
|
int |
size_ |
|
) |
| |
|
virtual |
Print some text.
Scan some text. Get one line (read at most #size_# characters).
Implements XFile.
bool DiskXFile::isBigEndianProcessor |
( |
| ) |
|
|
static |
Returns true# if the processor uses the big endian coding format.
bool DiskXFile::isLittleEndianProcessor |
( |
| ) |
|
|
static |
Returns true# if the processor uses the little endian coding format.
bool DiskXFile::isNativeMode |
( |
| ) |
|
|
static |
Returns true# if we'll load/save using the native mode.
int DiskXFile::printf |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
virtual |
int DiskXFile::read |
( |
void * |
ptr, |
|
|
int |
block_size, |
|
|
int |
n_blocks |
|
) |
| |
|
virtual |
Read something. Returns the number of blocks read or a value < 0 if there was an error.
Implements XFile.
void DiskXFile::reverseMemory |
( |
void * |
ptr_, |
|
|
int |
block_size, |
|
|
int |
n_blocks |
|
) |
| |
|
private |
void DiskXFile::rewind |
( |
| ) |
|
|
virtual |
Rewind.
Implements XFile.
int DiskXFile::scanf |
( |
const char * |
format, |
|
|
void * |
ptr |
|
) |
| |
|
virtual |
int DiskXFile::seek |
( |
long |
offset, |
|
|
int |
whence |
|
) |
| |
|
virtual |
void DiskXFile::setBigEndianMode |
( |
| ) |
|
|
static |
We'll load/save using big endian mode. It means that if the computer doesn't use Big Endian, data will be converted.
void DiskXFile::setLittleEndianMode |
( |
| ) |
|
|
static |
We'll load/save using little endian mode. It means that if the computer doesn't use Little Endian, data will be converted.
void DiskXFile::setNativeMode |
( |
| ) |
|
|
static |
We'll load/save using native mode. We use little endian iff the computer uses little endian. We use big endian iff the computer uses big endian.
Tell me where am I...
Implements XFile.
int DiskXFile::write |
( |
const void * |
ptr, |
|
|
int |
block_size, |
|
|
int |
n_blocks |
|
) |
| |
|
virtual |
Write. Returns the number of blocks written or a value < 0 if there was an error.
Implements XFile.
char* DiskXFile::buffer_block |
|
private |
int DiskXFile::buffer_block_size |
|
private |
bool DiskXFile::is_native_mode = true |
|
staticprivate |
bool DiskXFile::is_opened |
bool DiskXFile::its_a_pipe |
The documentation for this class was generated from the following files: