Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

OutFile Class Reference

An PhysicalOutStream that writes the data to a file. More...

#include <OutStreams.h>

Inheritance diagram for OutFile:

Inheritance graph
[legend]
Collaboration diagram for OutFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OutFile ()
 Default constructor.

 ~OutFile ()
 Destructor.

virtual bool exists () const
 The function states whether the file actually exists.


Protected Member Functions

void open (const char *name)
 Opens the stream.

void open (const char *name, bool append)
 Opens the stream.

virtual void writeToStream (const void *p, int size)
 The function writes a number of bytes into the file.


Private Attributes

Filestream
 Object representing the file.


Detailed Description

An PhysicalOutStream that writes the data to a file.

Definition at line 587 of file OutStreams.h.


Constructor & Destructor Documentation

OutFile::OutFile  )  [inline]
 

Default constructor.

Definition at line 594 of file OutStreams.h.

OutFile::~OutFile  )  [inline]
 

Destructor.

Definition at line 597 of file OutStreams.h.


Member Function Documentation

virtual bool OutFile::exists  )  const [inline, virtual]
 

The function states whether the file actually exists.

Returns:
Does the file exist?

Definition at line 603 of file OutStreams.h.

References File::exists().

Referenced by LogPlayer::save(), IniFile::save(), LogPlayer::saveAMV(), LogPlayer::saveCSV(), and LogPlayer::saveImages().

Here is the call graph for this function:

void OutFile::open const char *  name  )  [inline, protected]
 

Opens the stream.

Parameters:
name The name of the file to open. It will be interpreted as relative to the configuration directory. If the file does not exist, it will be created. If it already exists, its previous contents will be discared.

Definition at line 613 of file OutStreams.h.

Referenced by OutBinaryFile::OutBinaryFile(), OutTextFile::OutTextFile(), and OutTextRawFile::OutTextRawFile().

void OutFile::open const char *  name,
bool  append
[inline, protected]
 

Opens the stream.

Parameters:
name The name of the file to open. It will be interpreted as relative to the configuration directory. If the file does not exist, it will be created. If it already exists, its previous contents will be preserved, if append = true.
append Determines, if the file content is preserved or discared.

Definition at line 625 of file OutStreams.h.

virtual void OutFile::writeToStream const void *  p,
int  size
[inline, protected, virtual]
 

The function writes a number of bytes into the file.

Parameters:
p The address the data is located at.
size The number of bytes to be written.

Implements PhysicalOutStream.

Definition at line 633 of file OutStreams.h.

References File::write().

Here is the call graph for this function:


Member Data Documentation

File* OutFile::stream [private]
 

Object representing the file.

Definition at line 590 of file OutStreams.h.


The documentation for this class was generated from the following file:
Generated on Thu Sep 23 20:10:17 2004 for GT2004 by doxygen 1.3.6