orsa_file.h File Reference

#include "orsa_analysis.h"
#include "orsa_config.h"
#include "orsa_orbit.h"
#include "orsa_universe.h"
#include "orsa_body.h"
#include "orsa_file_jpl.h"
#include <string>
#include <map>
#include <list>
#include <cstdio>

Include dependency graph for orsa_file.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  orsa

Defines

#define FILE_TYPE   FILE*
#define OPEN_FILE   fopen
#define CLOSE_FILE   fclose
#define REWIND_FILE   rewind
#define GETS_FILE(buffer, length, file)   fgets((buffer),(length),(file))
#define PUTS_FILE(buffer, file)   fputs((buffer),(file))
#define READ_FILE(buffer, size, num, file)   fread((buffer),(size),(num),(file))
#define WRITE_FILE(buffer, size, num, file)   fwrite((buffer),(size),(num),(file))
#define SEEK_FILE(file, offset, whence)   fseek((file),(offset),(whence))
#define FLUSH_FILE(file)   fflush((file))
#define OPEN_READ   "r"
#define OPEN_WRITE   "w"

Enumerations

enum  FILE_STATUS { CLOSE, OPEN_R, OPEN_W }
enum  M5COLS { C7, C10 }
enum  OrsaFileDataType {
  OFDT_END_OF_FILE = 0, OFDT_UNIVERSE = 1, OFDT_EVOLUTION = 2, OFDT_FRAME = 3,
  OFDT_BODY = 4
}

Functions

void convert (OrsaFileDataType &ofdt, const unsigned int i)
void remove_leading_trailing_spaces (std::string &s)

Variables

LocationFile * location_file = 0


Define Documentation

#define CLOSE_FILE   fclose
 

Definition at line 67 of file orsa_file.h.

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

#define FILE_TYPE   FILE*
 

Definition at line 65 of file orsa_file.h.

Referenced by OrsaFile::GoodFile().

#define FLUSH_FILE file   )     fflush((file))
 

Definition at line 74 of file orsa_file.h.

Referenced by OrsaFile::Write(), and OrsaConfigFile::Write().

#define GETS_FILE buffer,
length,
file   )     fgets((buffer),(length),(file))
 

Definition at line 69 of file orsa_file.h.

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

#define OPEN_FILE   fopen
 

Definition at line 66 of file orsa_file.h.

Referenced by OrsaFile::GoodFile(), ReadWriteFile::Open(), WriteFile::Open(), and ReadFile::Open().

#define OPEN_READ   "r"
 

Definition at line 75 of file orsa_file.h.

Referenced by OrsaFile::GoodFile(), ReadWriteFile::Open(), and ReadFile::Open().

#define OPEN_WRITE   "w"
 

Definition at line 76 of file orsa_file.h.

Referenced by ReadWriteFile::Open(), and WriteFile::Open().

#define PUTS_FILE buffer,
file   )     fputs((buffer),(file))
 

Definition at line 70 of file orsa_file.h.

Referenced by OrsaConfigFile::Write().

#define READ_FILE buffer,
size,
num,
file   )     fread((buffer),(size),(num),(file))
 

Definition at line 71 of file orsa_file.h.

Referenced by OrsaFile::GoodFile(), OrsaFile::Read(), and orsa::SWIFTRawReadBinaryFile().

#define REWIND_FILE   rewind
 

Definition at line 68 of file orsa_file.h.

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

#define SEEK_FILE file,
offset,
whence   )     fseek((file),(offset),(whence))
 

Definition at line 73 of file orsa_file.h.

Referenced by SWIFTFile::Read().

#define WRITE_FILE buffer,
size,
num,
file   )     fwrite((buffer),(size),(num),(file))
 

Definition at line 72 of file orsa_file.h.

Referenced by OrsaFile::Write().


Enumeration Type Documentation

enum FILE_STATUS
 

Enumeration values:
CLOSE 
OPEN_R 
OPEN_W 

Definition at line 81 of file orsa_file.h.

00081 {CLOSE,OPEN_R,OPEN_W};

enum M5COLS
 

Enumeration values:
C7 
C10 

Definition at line 146 of file orsa_file.h.

00146 {C7,C10};

enum OrsaFileDataType
 

Enumeration values:
OFDT_END_OF_FILE 
OFDT_UNIVERSE 
OFDT_EVOLUTION 
OFDT_FRAME 
OFDT_BODY 

Definition at line 381 of file orsa_file.h.

00381                         { 
00382     OFDT_END_OF_FILE=0,
00383     OFDT_UNIVERSE=1,
00384     OFDT_EVOLUTION=2,
00385     OFDT_FRAME=3,
00386     OFDT_BODY=4
00387   };


Function Documentation

void convert OrsaFileDataType ofdt,
const unsigned int  i
[inline]
 

Definition at line 389 of file orsa_file.h.

References orsa::OFDT_BODY, orsa::OFDT_END_OF_FILE, orsa::OFDT_EVOLUTION, orsa::OFDT_FRAME, orsa::OFDT_UNIVERSE, and ORSA_ERROR.

Referenced by OrsaFile::Read().

00389                                                                      {
00390     switch(i) {
00391     case 0: ofdt = OFDT_END_OF_FILE; break;
00392     case 1: ofdt = OFDT_UNIVERSE;    break;
00393     case 2: ofdt = OFDT_EVOLUTION;   break;
00394     case 3: ofdt = OFDT_FRAME;       break;
00395     case 4: ofdt = OFDT_BODY;        break;
00396       //
00397     default:
00398       ORSA_ERROR("conversion problem: i = %i",i);    
00399       break;
00400     }
00401   }

void remove_leading_trailing_spaces std::string &  s  )  [inline]
 

Definition at line 505 of file orsa_file.h.

Referenced by JPLFile::GetTag(), JPLFile::JPLFile(), TLEFile::Read(), NEODYSCAT::Read(), JPLDastcomCometFile::Read(), JPLDastcomUnnumFile::Read(), JPLDastcomNumFile::Read(), AstDySMatrixFile::Read(), OrsaConfigFile::Read(), LocationFile::Read(), RWOFile::Read(), MPCObsFile::Read(), MPCCometFile::Read(), MPCOrbFile::Read(), and AstorbFile::Read().

00505                                                            {
00506     
00507     const int first = s.find_first_not_of(" ");
00508     s.erase(0,first);
00509     
00510     const int last  = s.find_last_not_of(" ");
00511     s.erase(last+1,s.size());
00512   }


Variable Documentation

LocationFile * location_file = 0
 

Definition at line 54 of file orsa_universe.cc.

Referenced by orsa::Compute_Gauss(), orsa::Compute_TestMethod(), OptimizedOrbitPositions::PropagatedSky_J2000(), and orsa::PropagatedSky_J2000().


Generated on Tue Jan 11 15:26:52 2005 for liborsa by  doxygen 1.4.0