K3dFile Class Reference

#include <K3dFile.h>

Inheritance diagram for K3dFile:

K3dReaderFile K3dTextReadFile K3dTextWriteFile K3dWriterFile List of all members.

Public Member Functions

 K3dFile ()
 ~K3dFile ()
FILE * GetFile ()
 Get pointer to file.
bool Close ()
 Close file.
bool Flush ()
 Read first word from file.
bool Good () const
 Test if file is good.
bool Bad () const
 Test if file is bad.
bool Exists (const std::string &_rFileName)
 Test if file exists.
long Length ()
 File length (only use before reading/writing).

Protected Member Functions

bool OpenForRead (const std::string &_rFileName)
 Open modes for binary read.
bool OpenForWriteTrunc (const std::string &_rFileName)
 Open file for binary write.
bool OpenForWriteAppend (const std::string &_rFileName)
 Open file for append.
bool OpenForReadText (const std::string &_rFileName)
 Open file for text read.
bool OpenForWriteTextTrunc (const std::string &_rFileName)
 Open modes for text read.
bool OpenForWriteTextAppend (const std::string &_rFileName)
 Open modes for text append.

Private Attributes

FILE * m_pFile
 Pointer to file.

Detailed Description

Definition at line 36 of file K3dFile.h.


Constructor & Destructor Documentation

K3dFile::K3dFile (  )  [inline]

Definition at line 90 of file K3dFile.h.

K3dFile::~K3dFile (  )  [inline]

Definition at line 91 of file K3dFile.h.

References m_pFile.


Member Function Documentation

bool K3dFile::OpenForRead ( const std::string &  _rFileName  )  [inline, protected]

Open modes for binary read.

Parameters:
_rFileName Reference to filename string
Return values:
bool True if file exists and opened

Definition at line 43 of file K3dFile.h.

References Good(), and m_pFile.

Referenced by K3dReaderFile::Open().

bool K3dFile::OpenForWriteTrunc ( const std::string &  _rFileName  )  [inline, protected]

Open file for binary write.

Parameters:
_rFileName Reference to filename string
Return values:
bool True if file exists and opened

Definition at line 51 of file K3dFile.h.

References Good(), and m_pFile.

Referenced by K3dWriterFile::Open().

bool K3dFile::OpenForWriteAppend ( const std::string &  _rFileName  )  [inline, protected]

Open file for append.

Parameters:
_rFileName Reference to filename string
Return values:
bool True if file exists and opened

Definition at line 59 of file K3dFile.h.

References Good(), and m_pFile.

Referenced by K3dWriterFile::Open().

bool K3dFile::OpenForReadText ( const std::string &  _rFileName  )  [inline, protected]

Open file for text read.

Parameters:
_rFileName Reference to filename string
Return values:
bool True if file exists and opened

Definition at line 67 of file K3dFile.h.

References Good(), and m_pFile.

Referenced by K3dTextReadFile::Open().

bool K3dFile::OpenForWriteTextTrunc ( const std::string &  _rFileName  )  [inline, protected]

Open modes for text read.

Parameters:
_rFileName Reference to filename string
Return values:
bool True if file exists and opened

Definition at line 75 of file K3dFile.h.

References Good(), and m_pFile.

Referenced by K3dTextWriteFile::Open().

bool K3dFile::OpenForWriteTextAppend ( const std::string &  _rFileName  )  [inline, protected]

Open modes for text append.

Parameters:
_rFileName Reference to filename string
Return values:
bool True if file exists and opened

Definition at line 83 of file K3dFile.h.

References Good(), and m_pFile.

Referenced by K3dTextWriteFile::Open().

FILE* K3dFile::GetFile (  )  [inline]

Get pointer to file.

Definition at line 97 of file K3dFile.h.

References m_pFile.

Referenced by K3dTextReadFile::Read(), K3dReaderFile::Read(), K3dWriterFile::Write(), and K3dTextWriteFile::Write().

bool K3dFile::Close (  )  [inline]

Close file.

Return values:
bool True if correctly closed

Definition at line 103 of file K3dFile.h.

References m_pFile.

bool K3dFile::Flush (  )  [inline]

Read first word from file.

Return values:
bool True if correctly flushed

Definition at line 109 of file K3dFile.h.

References m_pFile.

bool K3dFile::Good (  )  const [inline]

Test if file is good.

Return values:
bool True if file is good

Definition at line 115 of file K3dFile.h.

References m_pFile.

Referenced by OpenForRead(), OpenForReadText(), OpenForWriteAppend(), OpenForWriteTextAppend(), OpenForWriteTextTrunc(), OpenForWriteTrunc(), K3dReaderFile::Read(), and K3dWriterFile::Write().

bool K3dFile::Bad (  )  const [inline]

Test if file is bad.

Return values:
bool True if file is bad

Definition at line 121 of file K3dFile.h.

References m_pFile.

bool K3dFile::Exists ( const std::string &  _rFileName  )  [inline]

Test if file exists.

Return values:
bool True if file exists

Definition at line 127 of file K3dFile.h.

long K3dFile::Length (  )  [inline]

File length (only use before reading/writing).

Return values:
long File length

Definition at line 136 of file K3dFile.h.

References m_pFile.


Member Data Documentation

FILE* K3dFile::m_pFile [private]

Pointer to file.

Definition at line 38 of file K3dFile.h.

Referenced by Bad(), Close(), Flush(), GetFile(), Good(), Length(), OpenForRead(), OpenForReadText(), OpenForWriteAppend(), OpenForWriteTextAppend(), OpenForWriteTextTrunc(), OpenForWriteTrunc(), and ~K3dFile().


The documentation for this class was generated from the following file:
Generated on Thu Aug 16 23:53:31 2007 for K3dEngine by  doxygen 1.5.0