Binary File. More...
#include <rbinaryfile.h>
Public Member Functions | |
RBinaryFile (void) | |
RBinaryFile (const RURI &name) | |
RBinaryFile (RIOFile &file) | |
virtual void | Open (RIO::ModeType mode) |
void | Open (const RURI &uri, RIO::ModeType mode) |
RBinaryFile & | operator>> (bool &b) |
RBinaryFile & | operator>> (char *str) |
RBinaryFile & | operator>> (RString &str) |
RBinaryFile & | operator>> (char &nb) |
RBinaryFile & | operator>> (unsigned char &nb) |
RBinaryFile & | operator>> (int &nb) |
RBinaryFile & | operator>> (unsigned int &nb) |
RBinaryFile & | operator>> (long &nb) |
RBinaryFile & | operator>> (unsigned long &nb) |
RBinaryFile & | operator>> (long long &nb) |
RBinaryFile & | operator>> (unsigned long long &nb) |
RBinaryFile & | operator>> (float &nb) |
RBinaryFile & | operator>> (double &nb) |
RBinaryFile & | operator<< (bool b) |
RBinaryFile & | operator<< (char *str) |
RBinaryFile & | operator<< (RString &str) |
RBinaryFile & | operator<< (char nb) |
RBinaryFile & | operator<< (unsigned char nb) |
RBinaryFile & | operator<< (int nb) |
RBinaryFile & | operator<< (unsigned int nb) |
RBinaryFile & | operator<< (long nb) |
RBinaryFile & | operator<< (unsigned long nb) |
RBinaryFile & | operator<< (long long nb) |
RBinaryFile & | operator<< (unsigned long long nb) |
RBinaryFile & | operator<< (float nb) |
RBinaryFile & | operator<< (double nb) |
virtual | ~RBinaryFile (void) |
Public Member Functions inherited from RIOFile | |
RIOFile (void) | |
RIOFile (const RURI &uri) | |
RIOFile (RIOFile &file) | |
RURI | GetRealName (void) const |
void | Open (const RURI &uri, RIO::ModeType mode) |
bool | IsOpen (void) const |
virtual void | Close (void) |
size_t | Read (char *buffer, size_t nb, bool move=true) |
void | Write (const char *buffer, size_t nb) |
virtual void | Seek (off_t pos) |
virtual void | SeekRel (off_t pos) |
virtual void | SeekToEnd (void) |
void | Truncate (off_t newsize) |
bool | End (void) const |
off_t | GetSize (void) const |
off_t | GetPos (void) const |
virtual | ~RIOFile (void) |
Public Member Functions inherited from RFile | |
RFile (void) | |
RFile (const RURI &uri) | |
RFile (const RFile &file) | |
void | Open (const RURI &uri, RIO::ModeType mode) |
int | Compare (const RFile &file) const |
int | Compare (const RFile *file) const |
int | Compare (const RString &uri) const |
const RURI & | GetURI (void) const |
void | SetURI (const RURI &uri) |
const RString | GetFileName (void) const |
virtual | ~RFile (void) |
Additional Inherited Members | |
Static Public Member Functions inherited from RFile | |
static RChar | GetDirSeparator (void) |
static void | RemoveFile (const RURI &uri) |
static void | RenameFile (const RURI &olduri, const RURI &newuri) |
static RURI | GetTempFile (void) |
static bool | Exists (const RURI &uri) |
static bool | IsDir (const RURI &uri) |
Protected Attributes inherited from RIOFile | |
bool | CanWrite |
bool | CanRead |
Protected Attributes inherited from RFile | |
RIO::ModeType | Mode |
RURI | URI |
Detailed Description
Binary File.
The RBinaryFile class implements some basic functions needed when working with binary files.
Here is an example:
Constructor & Destructor Documentation
RBinaryFile | ( | void | ) |
Default constructor.
RBinaryFile | ( | const RURI & | name | ) |
Construct a binary file.
- Parameters
-
name The name of the file.
RBinaryFile | ( | RIOFile & | file | ) |
Construct a binary file.
- Parameters
-
file A generic input/output file that should be treated as binary file.
|
virtual |
Destructs the file.
Member Function Documentation
|
virtual |
Open the file
- Parameters
-
mode The open mode for the file.
Reimplemented from RIOFile.
Reimplemented in RRecFile< C, bOrder >.
void Open | ( | const RURI & | uri, |
RIO::ModeType | mode | ||
) |
Open the file
- Parameters
-
uri URI of the file. mode The open mode for the file.
RBinaryFile& operator>> | ( | bool & | b | ) |
Operator for bool.
RBinaryFile& operator>> | ( | char * | str | ) |
Operator for string.
RBinaryFile& operator>> | ( | RString & | str | ) |
Operator for string.
RBinaryFile& operator>> | ( | char & | nb | ) |
Operator for char.
RBinaryFile& operator>> | ( | unsigned char & | nb | ) |
Operator for unsigned char.
RBinaryFile& operator>> | ( | int & | nb | ) |
Operator for int.
RBinaryFile& operator>> | ( | unsigned int & | nb | ) |
Operator for size_t.
RBinaryFile& operator>> | ( | long & | nb | ) |
Operator for long.
RBinaryFile& operator>> | ( | unsigned long & | nb | ) |
Operator for unsigned long.
RBinaryFile& operator>> | ( | long long & | nb | ) |
Operator for long long.
RBinaryFile& operator>> | ( | unsigned long long & | nb | ) |
Operator for unsigned long long.
RBinaryFile& operator>> | ( | float & | nb | ) |
Operator for a float.
RBinaryFile& operator>> | ( | double & | nb | ) |
Operator for a double.
RBinaryFile& operator<< | ( | bool | b | ) |
<< Operator for bool.
RBinaryFile& operator<< | ( | char * | str | ) |
Operator for string.
RBinaryFile& operator<< | ( | RString & | str | ) |
Operator for string.
RBinaryFile& operator<< | ( | char | nb | ) |
<< Operator for char.
RBinaryFile& operator<< | ( | unsigned char | nb | ) |
<< Operator for unsigned char.
RBinaryFile& operator<< | ( | int | nb | ) |
<< Operator for int.
RBinaryFile& operator<< | ( | unsigned int | nb | ) |
<< Operator for size_t.
RBinaryFile& operator<< | ( | long | nb | ) |
<< Operator for long.
RBinaryFile& operator<< | ( | unsigned long | nb | ) |
<< Operator for unsigned long.
RBinaryFile& operator<< | ( | long long | nb | ) |
<< Operator for long long.
RBinaryFile& operator<< | ( | unsigned long long | nb | ) |
<< Operator for unsigned long long.
RBinaryFile& operator<< | ( | float | nb | ) |
<< Operator for float.
RBinaryFile& operator<< | ( | double | nb | ) |
<< Operator for double.