SonarFileRecordFactory Class Reference

The base class for those classes that are able to parse a sonar file into a number of SystemRecords. More...

#include <SonarFileRecordFactory.h>

Inheritance diagram for SonarFileRecordFactory:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SonarFileRecordFactory (const LPCTSTR &fqfn)
 Ctor.
 ~SonarFileRecordFactory ()
 Dtor.
virtual SmartPointer< SystemRecord > record ()=0
 Read the record at the current file position.
virtual bool operator++ ()=0
 Advance to the next record.
bool eof () const
 Test whether the file is at EOF.
LPCTSTR fileName () const
 Give the file name from which records are produced.

Protected Attributes

ACE_FILE_IO _file
off_t _record_position
bool _eof

Detailed Description

The base class for those classes that are able to parse a sonar file into a number of SystemRecords.

This class is the base class for classes that are able to parse sonar files. These files are characterized by having a number of record types multplexed into a single file. The ordering of these records is determined by the sonar in question but are usually produced at the time the data is collected. Sub classes of this class effecively de-multiplex these records.

Because of the nature of these data objects of this type do not, generally, support radom access (e.g. seek()).

Definition at line 28 of file SonarFileRecordFactory.h.


Constructor & Destructor Documentation

SonarFileRecordFactory::SonarFileRecordFactory ( const LPCTSTR &  fqfn  ) 

Ctor.

Attach to the sonar file.

Parameters:
fqfn The sonar file.

SonarFileRecordFactory::~SonarFileRecordFactory (  ) 

Dtor.


Member Function Documentation

virtual SmartPointer<SystemRecord> SonarFileRecordFactory::record (  )  [pure virtual]

Read the record at the current file position.

Returns:
The record. This record will be NOGO if the record cannot be read. In this case this object may be NOGO if there is an urrecoverable error in the input data stream.

Implemented in SimulatorSonarFileRecordFactory.

virtual bool SonarFileRecordFactory::operator++ (  )  [pure virtual]

Advance to the next record.

Returns:
true if able to advance to the next record. If false then either an error has occured or the file is at eof. In the former case go() will be false and in the latter case eof will be false.

Implemented in SimulatorSonarFileRecordFactory.

bool SonarFileRecordFactory::eof (  )  const

Test whether the file is at EOF.

Returns:
true if at EOF.

LPCTSTR SonarFileRecordFactory::fileName (  )  const

Give the file name from which records are produced.

Returns:
The file name.


Member Data Documentation

ACE_FILE_IO SonarFileRecordFactory::_file [protected]

Definition at line 75 of file SonarFileRecordFactory.h.

off_t SonarFileRecordFactory::_record_position [protected]

Definition at line 76 of file SonarFileRecordFactory.h.

bool SonarFileRecordFactory::_eof [protected]

Definition at line 77 of file SonarFileRecordFactory.h.


The documentation for this class was generated from the following file: