binfbase provides the common base class for all file I/O binary
streams. It defines important data types, variables and methods.
- The constructor.
- The destructor. Automatically closes an eventually open stream.
virtual void open(const char *filename, const Mode mode)
virtual void open(const std::string &filename, const Mode mode)
- Two versions of an abstract virtual method to open a binary file
filename is the filename of the file to open and
mode specifies in which mode to do so. Refer to the list of
data types for this class for more information on this argument. You
can combine multiple mode flags together, using the
- Method to explicitly close the stream.
void seek(long pos, Offset offs = Set)
- Implementation of the abstract virtual methods, inherited from
binio. Look there for reference.
Public data types and variables:
- Enumeration of all defined file stream open mode flags, defining how a
file should be opened when the
open() method is called. This
type defines the following flags:
- Open the stream for appending. The stream pointer is positioned at the
end of the stream. Also, do not truncate a file to zero length, if it
- Do not automatically create a nonexistant file on first access and
fail instead. Also, do not truncate a file to zero length, if it
- Type of the variable to hold the mode specification flags that are
passed to one of the
open() methods to open a file
stream. Refer to
enum ModeFlags above for information on what
flags are defined.
Protected data types and variables:
- Pointer to the currently opened file of this stream.