class XFile

XFile.

Inheritance:


Public Methods

[more] XFile()
[more]virtual int read(void* ptr, int block_size, int n_blocks) = 0
Read something
[more]virtual int write(void* ptr, int block_size, int n_blocks) = 0
Write
[more]int taggedRead(void* ptr, int block_size, int n_blocks, const char* tag)
Read and check the tag/the size.
[more]int taggedWrite(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 int printf(const char* format, ...) = 0
Print some text
[more]virtual int scanf(const char* format, void* ptr) = 0
Scan some text
[more]virtual char* gets(char* dest, int size_) = 0
Get one line (read at most size_ characters)


Inherited from Object:

Public Fields

oAllocator* allocator

Public Methods

ovoid addOption(const char* name, int size, void* ptr, const char* help="")
ovoid addIOption(const char* name, int* ptr, int init_value, const char* help="")
ovoid addROption(const char* name, real* ptr, real init_value, const char* help="")
ovoid addBOption(const char* name, bool* ptr, bool init_value, const char* help="")
ovoid addOOption(const char* name, Object** ptr, Object* init_value, const char* help="")
ovoid setOption(const char* name, void* ptr)
ovoid setIOption(const char* name, int option)
ovoid setROption(const char* name, real option)
ovoid setBOption(const char* name, bool option)
ovoid setOOption(const char* name, Object* option)
ovirtual void loadXFile(XFile* file)
ovirtual void saveXFile(XFile* file)
ovoid load(const char* filename)
ovoid save(const char* filename)
ovoid* operator new(size_t size, Allocator* allocator_=NULL)
ovoid* operator new(size_t size, Allocator* allocator_, void* ptr_)
ovoid 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!).

o XFile()

ovirtual int read(void* ptr, int block_size, int n_blocks) = 0
Read something

ovirtual int write(void* ptr, int block_size, int n_blocks) = 0
Write

oint 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.

oint taggedWrite(void* ptr, int block_size, int n_blocks, const char* tag)
Write and write the tag/the size

ovirtual int eof() = 0
Are we at the end ?

ovirtual int flush() = 0
Flush the file

ovirtual int seek(long offset, int whence) = 0
Seek

ovirtual long tell() = 0
Tell me where am I

ovirtual void rewind() = 0
Rewind

ovirtual int printf(const char* format, ...) = 0
Print some text

ovirtual int scanf(const char* format, void* ptr) = 0
Scan some text

ovirtual 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++.