class File


Public Classes

enum OpenAutorisation
READ_ONLY
WRITE_ONLY
enum SeekCode
FROM_BEGIN
FROM_END
FROM_CURRENT

Public Methods

void open(const char *name, OpenAutorisation autorisation) throw(Exception)
void close() throw()
int getSize() const throw()
void write(const char *buffer, int size) throw(Exception)
void write(const char *str) throw(Exception)
Writes while str[i]!=0
void write(char c) throw(Exception)
void write(short c) throw(Exception)
void write(int c) throw(Exception)
void read(char *buffer, int size) throw(Exception)
void read(char *& str) throw(Exception)
Read while read!=0 (str must be allocated)
void read(char& c) throw(Exception)
void read(short& c) throw(Exception)
void read(int& c) throw(Exception)
void read(String *& s) throw(Exception)
s construct by this function, but must be deleted by caller, this function stop when has found a \n or the end of the file
void seek(int offset, SeekCode code) throw(Exception)
File(const char *name, OpenAutorisation autorisation=READ_ONLY) throw(Exception)
File(const String& name, OpenAutorisation autorisation=READ_ONLY) throw(Exception)
~File() throw()
bool eof() const throw()
static bool exists(const String& nameFile) throw()
static String* renameCheck(const String& nameFile, const String& toAdd) throw(Exception)
Renames the file, but do not remove any file. Prefers concatenate toAdd anoter time. Returns the new name.

Private Fields

OpenAutorisation autorisation
int size
int pos
FILE* f
const char* name

Private Methods

void calculerSize() throw(Exception)

Documentation

enum OpenAutorisation

READ_ONLY

WRITE_ONLY

enum SeekCode

FROM_BEGIN

FROM_END

FROM_CURRENT

OpenAutorisation autorisation

int size

int pos

FILE* f

const char* name

void calculerSize() throw(Exception)

void open(const char *name, OpenAutorisation autorisation) throw(Exception)

void close() throw()

int getSize() const throw()

void write(const char *buffer, int size) throw(Exception)

void write(const char *str) throw(Exception)
Writes while str[i]!=0

void write(char c) throw(Exception)

void write(short c) throw(Exception)

void write(int c) throw(Exception)

void read(char *buffer, int size) throw(Exception)

void read(char *& str) throw(Exception)
Read while read!=0 (str must be allocated)

void read(char& c) throw(Exception)

void read(short& c) throw(Exception)

void read(int& c) throw(Exception)

void read(String *& s) throw(Exception)
s construct by this function, but must be deleted by caller, this function stop when has found a \n or the end of the file

void seek(int offset, SeekCode code) throw(Exception)

File(const char *name, OpenAutorisation autorisation=READ_ONLY) throw(Exception)

File(const String& name, OpenAutorisation autorisation=READ_ONLY) throw(Exception)

~File() throw()

bool eof() const throw()

static bool exists(const String& nameFile) throw()

static String* renameCheck(const String& nameFile, const String& toAdd) throw(Exception)
Renames the file, but do not remove any file. Prefers concatenate toAdd anoter time. Returns the new name.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de