FFTextStream Class Reference
[Formatted file I/O]

#include <FFTextStream.hpp>

Inheritance diagram for FFTextStream:

Inheritance graph
[legend]
Collaboration diagram for FFTextStream:

Collaboration graph
[legend]
List of all members.

Detailed Description

An FFStream is meant for reading text.

This also includes an internal line count and a read line method. When reading and using the formattedGetLine() call, the lineNumber automatically increments. However, any other read and all write calls do not update the line number - the derived class or programmer needs to make sure that the reader or writer increments lineNumber in these cases.

Definition at line 66 of file FFTextStream.hpp.

Public Member Functions

virtual ~FFTextStream ()
 Destructor.
 FFTextStream ()
 Default constructor.
 FFTextStream (const char *fn, std::ios::openmode mode=std::ios::in)
 Common constructor.
 FFTextStream (const std::string &fn, std::ios::openmode mode=std::ios::in)
 Common constructor.
virtual void open (const char *fn, std::ios::openmode mode)
 Overrides open to reset the line number.
virtual void open (const std::string &fn, std::ios::openmode mode)
 Overrides open to reset the line number.
void formattedGetLine (std::string &line, const bool expectEOF=false) throw (EndOfFile, FFStreamError, gpstk::StringUtils::StringException)
 Like std::istream::getline but checks for EOF and removes '/r'.

Public Attributes

unsigned int lineNumber
 The internal line count.

Protected Member Functions

virtual void tryFFStreamGet (FFData &rec) throw (FFStreamError, gpstk::StringUtils::StringException)
 calls FFStream::tryFFStreamGet and adds line number information
virtual void tryFFStreamPut (const FFData &rec) throw (FFStreamError, gpstk::StringUtils::StringException)
 calls FFStream::tryFFStreamPut and adds line number information


Constructor & Destructor Documentation

virtual ~FFTextStream  )  [inline, virtual]
 

Destructor.

Definition at line 72 of file FFTextStream.hpp.

FFTextStream  )  [inline]
 

Default constructor.

Definition at line 76 of file FFTextStream.hpp.

FFTextStream const char *  fn,
std::ios::openmode  mode = std::ios::in
[inline]
 

Common constructor.

Parameters:
fn file name.
mode file open mode (std::ios)

Definition at line 85 of file FFTextStream.hpp.

FFTextStream const std::string &  fn,
std::ios::openmode  mode = std::ios::in
[inline]
 

Common constructor.

Parameters:
fn file name.
mode file open mode (std::ios)

Definition at line 96 of file FFTextStream.hpp.


Member Function Documentation

virtual void open const std::string &  fn,
std::ios::openmode  mode
[inline, virtual]
 

Overrides open to reset the line number.

Reimplemented from FFStream.

Reimplemented in RinexObsStream.

Definition at line 109 of file FFTextStream.hpp.

virtual void open const char *  fn,
std::ios::openmode  mode
[inline, virtual]
 

Overrides open to reset the line number.

Reimplemented from FFStream.

Reimplemented in AntexStream, FICAStream, IonexStream, RinexMetStream, RinexNavStream, RinexObsStream, SEMStream, SMODFStream, and YumaStream.

Definition at line 103 of file FFTextStream.hpp.

Referenced by main(), and SMODFStream::open().

virtual void tryFFStreamGet FFData rec  )  throw (FFStreamError, gpstk::StringUtils::StringException) [inline, protected, virtual]
 

calls FFStream::tryFFStreamGet and adds line number information

Reimplemented from FFStream.

Definition at line 143 of file FFTextStream.hpp.

virtual void tryFFStreamPut const FFData rec  )  throw (FFStreamError, gpstk::StringUtils::StringException) [inline, protected, virtual]
 

calls FFStream::tryFFStreamPut and adds line number information

Reimplemented from FFStream.

Definition at line 166 of file FFTextStream.hpp.


Member Data Documentation

unsigned int lineNumber
 

The internal line count.

When writing, make sure to increment this.

Definition at line 116 of file FFTextStream.hpp.

Referenced by RinexNavHeader::reallyGetRecord(), SMODFData::reallyPutRecord(), RinexObsData::reallyPutRecord(), RinexNavHeader::reallyPutRecord(), RinexNavData::reallyPutRecord(), RinexMetHeader::reallyPutRecord(), RinexMetData::reallyPutRecord(), MSCData::reallyPutRecord(), IonexData::reallyPutRecord(), AntexData::reallyPutRecord(), RinexObsHeader::WriteHeaderRecords(), IonexHeader::WriteHeaderRecords(), and AntexHeader::WriteHeaderRecords().


The documentation for this class was generated from the following file:
Generated on Thu Sep 9 03:31:28 2010 for GPS ToolKit Software Library by  doxygen 1.3.9.1