XFile.
Inheritance:
Public Methods
-
XFile()
-
virtual int read(void* ptr, int block_size, int n_blocks) = 0
- Read something
-
virtual int write(void* ptr, int block_size, int n_blocks) = 0
- Write
-
int taggedRead(void* ptr, int block_size, int n_blocks, const char* tag)
- Read and check the tag/the size.
-
int taggedWrite(void* ptr, int block_size, int n_blocks, const char* tag)
- Write and write the tag/the size
-
virtual int eof() = 0
- Are we at the end ?
-
virtual int flush() = 0
- Flush the file
-
virtual int seek(long offset, int whence) = 0
- Seek
-
virtual long tell() = 0
- Tell me where am I
-
virtual void rewind() = 0
- Rewind
-
virtual int printf(const char* format, ...) = 0
- Print some text
-
virtual int scanf(const char* format, void* ptr) = 0
- Scan some text
-
virtual char* gets(char* dest, int size_) = 0
- Get one line (read at most size_ characters)
Inherited from Object:
Public Fields
-
Allocator* allocator
Public Methods
-
void addOption(const char* name, int size, void* ptr, const char* help="")
-
void addIOption(const char* name, int* ptr, int init_value, const char* help="")
-
void addROption(const char* name, real* ptr, real init_value, const char* help="")
-
void addBOption(const char* name, bool* ptr, bool init_value, const char* help="")
-
void addOOption(const char* name, Object** ptr, Object* init_value, const char* help="")
-
void setOption(const char* name, void* ptr)
-
void setIOption(const char* name, int option)
-
void setROption(const char* name, real option)
-
void setBOption(const char* name, bool option)
-
void setOOption(const char* name, Object* option)
-
virtual void loadXFile(XFile* file)
-
virtual void saveXFile(XFile* file)
-
void load(const char* filename)
-
void save(const char* filename)
-
void* operator new(size_t size, Allocator* allocator_=NULL)
-
void* operator new(size_t size, Allocator* allocator_, void* ptr_)
-
void operator delete(void* ptr)
Documentation
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!).
- XFile()
- virtual int read(void* ptr, int block_size, int n_blocks) = 0
- Read something
- virtual int write(void* ptr, int block_size, int n_blocks) = 0
- Write
- int 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.
- int taggedWrite(void* ptr, int block_size, int n_blocks, const char* tag)
- Write and write the tag/the size
- virtual int eof() = 0
- Are we at the end ?
- virtual int flush() = 0
- Flush the file
- virtual int seek(long offset, int whence) = 0
- Seek
- virtual long tell() = 0
- Tell me where am I
- virtual void rewind() = 0
- Rewind
- virtual int printf(const char* format, ...) = 0
- Print some text
- virtual int scanf(const char* format, void* ptr) = 0
- Scan some text
- virtual char* gets(char* dest, int size_) = 0
- Get one line (read at most size_ characters)
- Direct child classes:
- NullXFile
MemoryXFile
DiskXFile
- Author:
- Ronan Collobert (collober@idiap.ch)
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.