X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=DEM%2Fdem.hxx;h=de96a3700d871c4a485ed7ac0116ed84ea19bad7;hb=4b0aa0e3a65b27a6ce6868cf53626fc7bc0e212b;hp=33eefc248e9f4e49f1653e67759849f38db8bcc3;hpb=a0a32fccea6dd4612da7eab8ec549d7d5fd5a507;p=flightgear.git diff --git a/DEM/dem.hxx b/DEM/dem.hxx index 33eefc248..de96a3700 100644 --- a/DEM/dem.hxx +++ b/DEM/dem.hxx @@ -36,7 +36,9 @@ #include #include -#include + +//#include +#include #define DEM_SIZE 1200 @@ -45,7 +47,8 @@ class fgDEM { // file pointer for input - gzFile fd; + // gzFile fd; + fg_gzifstream *in; // coordinates (in arc seconds) of south west corner double originx, originy; @@ -77,25 +80,37 @@ class fgDEM { int do_data; int cur_col, cur_row; + // return next token from input stream + string next_token(); + + // return next integer from input stream + int next_int(); + + // return next double from input stream + double next_double(); + + // return next exponential num from input stream + int next_exp(); + public: // Constructor fgDEM( void ); // open a DEM file (use "-" if input is coming from stdin) - int open ( char *file ); + int open ( const string& file ); // close a DEM file - int close ( void ); + int close (); // parse a DEM file - int parse( void ); + int parse(); // read and parse DEM "A" record - int read_a_record( void ); + int read_a_record(); // read and parse DEM "B" record - void read_b_record( void ); + void read_b_record(); // Informational methods double info_originx( void ) { return(originx); } @@ -119,7 +134,7 @@ public: void outputmesh_set_pt( int i, int j, double value ); // Write out a node file that can be used by the "triangle" program - void outputmesh_output_nodes( char *fg_root, fgBUCKET *p ); + void outputmesh_output_nodes( const string& fg_root, fgBUCKET *p ); // Destructor ~fgDEM( void ); @@ -130,6 +145,10 @@ public: // $Log$ +// Revision 1.8 1998/09/19 17:59:46 curt +// Use c++ streams (fg_gzifstream). Also converted many character arrays to +// the string class. +// // Revision 1.7 1998/07/04 00:47:19 curt // typedef'd struct fgBUCKET. //