#include <XFile.h>
|
| XFile () |
|
virtual int | read (void *ptr, int block_size, int n_blocks)=0 |
|
virtual int | write (const void *ptr, int block_size, int n_blocks)=0 |
|
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 int | eof ()=0 |
| Are we at the end ? More...
|
|
virtual int | flush ()=0 |
| Flush the file. More...
|
|
virtual int | seek (long offset, int whence)=0 |
| Seek. More...
|
|
virtual long | tell ()=0 |
| Tell me where am I... More...
|
|
virtual void | rewind ()=0 |
| Rewind. More...
|
|
virtual char * | gets (char *dest, int size_)=0 |
| Print some text. More...
|
|
virtual long | size () |
|
virtual | ~XFile () |
|
XFile. A File which could be anything. The syntax (and results) for method is very similar to C FILE. (Except for the FILE pointer which is not given in the parameters!).
- Author
- Ronan Collobert (collo.nosp@m.ber@.nosp@m.idiap.nosp@m..ch)
virtual int XFile::eof |
( |
| ) |
|
|
pure virtual |
Are we at the end ?
Implemented in DiskXFile.
virtual int XFile::flush |
( |
| ) |
|
|
pure virtual |
virtual char* XFile::gets |
( |
char * |
dest, |
|
|
int |
size_ |
|
) |
| |
|
pure virtual |
Print some text.
Scan some text. Get one line (read at most #size_# characters).
Implemented in DiskXFile.
virtual int XFile::read |
( |
void * |
ptr, |
|
|
int |
block_size, |
|
|
int |
n_blocks |
|
) |
| |
|
pure virtual |
Read something. Returns the number of blocks read or a value < 0 if there was an error.
Implemented in DiskXFile.
virtual void XFile::rewind |
( |
| ) |
|
|
pure virtual |
virtual int XFile::seek |
( |
long |
offset, |
|
|
int |
whence |
|
) |
| |
|
pure virtual |
int XFile::taggedRead |
( |
void * |
ptr, |
|
|
int |
block_size, |
|
|
int |
n_blocks, |
|
|
const char * |
tag |
|
) |
| |
Read and check the tag/the size. To be used with taggedWrite()#. If the tag and the size readed doesn't correspond to the given tag and size, an error will occur and the returned value will be (-1).
int XFile::taggedWrite |
( |
const void * |
ptr, |
|
|
int |
block_size, |
|
|
int |
n_blocks, |
|
|
const char * |
tag |
|
) |
| |
Write and write the tag/the size.
virtual long XFile::tell |
( |
| ) |
|
|
pure virtual |
Tell me where am I...
Implemented in DiskXFile.
virtual int XFile::write |
( |
const void * |
ptr, |
|
|
int |
block_size, |
|
|
int |
n_blocks |
|
) |
| |
|
pure virtual |
Write. Returns the number of blocks written or a value < 0 if there was an error.
Implemented in DiskXFile.
The documentation for this class was generated from the following files: