ReadFile Class Reference

Read-only files class. More...

#include <orsa_file.h>

Inheritance diagram for ReadFile:

Inheritance graph
[legend]
Collaboration diagram for ReadFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ReadFile ()
void Open ()
virtual void Read ()=0
void Close ()
virtual std::string GetFileName () const
virtual void SetFileName (std::string name_in)
virtual void SetFileName (char *name_in)

Protected Attributes

std::string filename
FILE_TYPE file
FILE_STATUS status

Detailed Description

Read-only files class.

Definition at line 120 of file orsa_file.h.


Constructor & Destructor Documentation

ReadFile  )  [inline]
 

Definition at line 122 of file orsa_file.h.

00122 : File() { }


Member Function Documentation

void Close  )  [inherited]
 

Definition at line 114 of file orsa_file.cc.

References orsa::CLOSE, CLOSE_FILE, File::file, and File::status.

Referenced by SWIFTFile::AsteroidsInFile(), ReadWriteFile::Open(), OrsaFile::Read(), OrsaConfigFile::Read(), SWIFTFile::Read(), Config::read_from_file(), File::SetFileName(), OrsaFile::Write(), OrsaConfigFile::Write(), Config::write_to_file(), and File::~File().

00114                    {
00115     if (status != CLOSE) {
00116       CLOSE_FILE(file);
00117       status = CLOSE;
00118     }
00119   }

virtual std::string GetFileName  )  const [inline, virtual, inherited]
 

Definition at line 99 of file orsa_file.h.

References File::filename.

Referenced by LocationFile::ObsPos(), and OrsaFile::Read().

00099 { return filename; }

void Open  ) 
 

Definition at line 59 of file orsa_file.cc.

References orsa::CLOSE, OPEN_FILE, orsa::OPEN_R, OPEN_READ, and ORSA_ERROR.

Referenced by SWIFTFile::AsteroidsInFile(), Mercury5IntegrationFile::Read(), TLEFile::Read(), NEODYSCAT::Read(), JPLDastcomCometFile::Read(), JPLDastcomUnnumFile::Read(), JPLDastcomNumFile::Read(), AstDySMatrixFile::Read(), RadauModIntegrationFile::Read(), SWIFTFile::Read(), LocationFile::Read(), RWOFile::Read(), MPCObsFile::Read(), MPCCometFile::Read(), MPCOrbFile::Read(), and AstorbFile::Read().

00059                       {
00060     if (status != CLOSE) return;
00061     
00062     file = OPEN_FILE(filename.c_str(),OPEN_READ);
00063     
00064     if (file == 0) { 
00065       ORSA_ERROR("Can't open file %s",filename.c_str());
00066     } else {
00067       status = OPEN_R;
00068     }
00069   }

virtual void Read  )  [pure virtual]
 

Implemented in Mercury5IntegrationFile, RadauModIntegrationFile, SWIFTFile, LocationFile, MPCObsFile, RWOFile, AstDySMatrixFile, NEODYSCAT, JPLDastcomNumFile, JPLDastcomUnnumFile, JPLDastcomCometFile, AstorbFile, MPCOrbFile, MPCCometFile, and TLEFile.

virtual void SetFileName char *  name_in  )  [inline, virtual, inherited]
 

Definition at line 106 of file orsa_file.h.

References File::SetFileName().

00106                                                      {
00107       std::string n = name_in;
00108       SetFileName (n);
00109     }

Here is the call graph for this function:

virtual void SetFileName std::string  name_in  )  [inline, virtual, inherited]
 

Definition at line 101 of file orsa_file.h.

References File::Close(), orsa::CLOSE, File::filename, and File::status.

Referenced by OrsaConfigFile::OrsaConfigFile(), and File::SetFileName().

00101                                                         {
00102       if (status != CLOSE) Close();
00103       filename = name_in;
00104     }

Here is the call graph for this function:


Member Data Documentation

FILE_TYPE file [protected, inherited]
 

Definition at line 113 of file orsa_file.h.

Referenced by File::Close(), and File::File().

std::string filename [protected, inherited]
 

Definition at line 112 of file orsa_file.h.

Referenced by File::GetFileName(), and File::SetFileName().

FILE_STATUS status [protected, inherited]
 

Definition at line 114 of file orsa_file.h.

Referenced by File::Close(), File::File(), and File::SetFileName().


The documentation for this class was generated from the following files:
Generated on Tue Jan 11 15:28:13 2005 for liborsa by  doxygen 1.4.0