Base class for file parsing. More...
#include <file.h>


Public Member Functions | |
| datafile (ifstream &infile, ofstream &outfile, bool loud, string filename, int dim, std::vector< std::vector< int > > rFieldMappings, std::vector< index_order > rIndexOrder, std::vector< adj_map > conv_factor, std::vector< adj_map > norm_val) | |
| Construct data file object using specified information.  More... | |
| virtual string | get_mod_name () | 
| Get class name.  More... | |
| virtual | ~datafile () | 
| Free used data, delete the object.  More... | |
| datafile (const datafile &d) | |
| Deep copy constructor.  More... | |
| virtual void | parse () | 
| Parse the data file.  More... | |
| int | partition_layout (int partition, int n) | 
| Get the size of n dimension of the specified partition.  More... | |
| points * | get_points (int partition) | 
| Get a partitions' points.  More... | |
| pnt | get_point (int n) | 
| Get the nth point of the file.  More... | |
| pnt | get_point (int n, int partition) | 
| Get the nth point of the specified partition.  More... | |
| int | get_num_points () | 
| Get the number of points in the file.  More... | |
| int | get_num_points (int partition) | 
| Get the number of points in the specified partition.  More... | |
| int | get_num_vars () | 
| Get the number of variables in the file.  More... | |
| string | get_title () | 
| Get file title if specified in file header.  More... | |
| int | get_num_partitions () | 
| Get number of partition in the file.  More... | |
Protected Member Functions | |
| void | error_out (string err_ps) | 
| Log the string specified as an error event.  More... | |
| void | status_out (string st_ps) | 
| Log the string specified as a status event.  More... | |
| void | LogFieldMappings () | 
| Log the field mapping data from the command line and stored in mFieldMappings.  More... | |
| int | get_num_dep_vars () | 
| Get number of dependent variables.  More... | |
| index_order | get_index_order (int partition) | 
Protected Attributes | |
| string | filename | 
| ifstream & | infile | 
| ofstream & | outfile | 
| bool | loud | 
| partition ** | data_part | 
| int | num_partitions | 
| std::vector< string > | var_names | 
| string | title | 
| int | dimensions | 
| std::vector< adj_map > | conv_factor | 
| std::vector< adj_map > | norm_val | 
| std::vector< std::vector< int > > | mFieldMappings | 
| std::vector< index_order > | mIndexOrder | 
Private Attributes | |
| int | dep_vars | 
| datafile | ( | ifstream & | infile, | 
| ofstream & | outfile, | ||
| bool | loud, | ||
| string | filename, | ||
| int | dim, | ||
| std::vector< std::vector< int > > | rFieldMappings, | ||
| std::vector< index_order > | rIndexOrder, | ||
| std::vector< adj_map > | conv_factor, | ||
| std::vector< adj_map > | norm_val | ||
| ) | 
Construct data file object using specified information.
| infile | Input file stream | 
| outfile | Log file stream | 
| loud | Log verbosity | 
| filename | Name of the input file | 
| dim | Number of dimensions in the input file | 
| rFieldMappings | Mappings of file variables to internal representation variables | 
| rIndexOrder | The order of variables for index creation (for each partition) | 
| conv_factor | Factors multiplied with corresponding variables in order to convert values with difference units | 
| norm_val | Values multiplied with corresponding variables in order to reverse normalization | 
Definition at line 5 of file file.cpp.
References conv_factor, dep_vars, dimensions, filename, loud, mFieldMappings, mIndexOrder, norm_val, and num_partitions.
      
  | 
  virtual | 
Free used data, delete the object.
Definition at line 30 of file file.cpp.
References data_part, i, and num_partitions.
      
  | 
  protected | 
Log the string specified as an error event.
| err_ps | Error message | 
Definition at line 65 of file file.cpp.
References filename, and outfile.
Referenced by tecplot_data::parse(), and tecplot_data::zone_error_out().

      
  | 
  protected | 
Definition at line 167 of file file.cpp.
References empty(), and mIndexOrder.
Referenced by tecplot_data::parse().


      
  | 
  virtual | 
Get class name.
Reimplemented in tecplot_data.
Definition at line 53 of file file.cpp.
Referenced by parse().

      
  | 
  protected | 
Get number of dependent variables.
Definition at line 163 of file file.cpp.
References dimensions, and var_names.
Referenced by tecplot_data::parse().

| int get_num_partitions | ( | ) | 
Get number of partition in the file.
Definition at line 151 of file file.cpp.
References num_partitions.
Referenced by get_points(), and retrievePoints().

| int get_num_points | ( | ) | 
Get the number of points in the file.
Definition at line 130 of file file.cpp.
References data_part, partition::get_num_points(), i, and num_partitions.
Referenced by get_point().


| int get_num_points | ( | int | partition | ) | 
Get the number of points in the specified partition.
| partition | Partition number | 
Definition at line 143 of file file.cpp.
References data_part, and partition::get_num_points().

| int get_num_vars | ( | ) | 
Get the number of variables in the file.
Definition at line 159 of file file.cpp.
References var_names.
Referenced by tecplot_data::parse().

| pnt get_point | ( | int | n | ) | 
Get the nth point of the file.
| n | Point to retrieve | 
Definition at line 111 of file file.cpp.
References data_part, partition::get_num_points(), get_num_points(), partition::get_point(), i, and num_partitions.

| pnt get_point | ( | int | n, | 
| int | partition | ||
| ) | 
Get the nth point of the specified partition.
| n | Point number | 
| partition | Partition number | 
Definition at line 126 of file file.cpp.
References data_part, and partition::get_point().

| points * get_points | ( | int | partition | ) | 
Get a partitions' points.
| partition | Partition number | 
Definition at line 100 of file file.cpp.
References data_part, get_num_partitions(), and partition::get_points().
Referenced by compareFiles(), and retrievePoints().


| string get_title | ( | ) | 
      
  | 
  protected | 
Log the field mapping data from the command line and stored in mFieldMappings.
Definition at line 79 of file file.cpp.
References itoa(), mFieldMappings, and status_out().
Referenced by tecplot_data::read_header().


      
  | 
  virtual | 
Parse the data file.
Non functional, meant to be overriden by subclasses.
Reimplemented in tecplot_data.
Definition at line 57 of file file.cpp.
References get_mod_name(), and status_out().
Referenced by openAndParseFiles().


| int partition_layout | ( | int | partition, | 
| int | n | ||
| ) | 
Get the size of n dimension of the specified partition.
| partition | Partition number | 
| n | Dimension number | 
Definition at line 90 of file file.cpp.
References data_part, partition::get_layout(), and n.

      
  | 
  protected | 
Log the string specified as a status event.
| st_ps | Status message | 
Definition at line 70 of file file.cpp.
References filename, loud, and outfile.
Referenced by LogFieldMappings(), parse(), tecplot_data::parse(), tecplot_data::read_header(), and tecplot_data::zone_status_out().

      
  | 
  protected | 
Definition at line 182 of file file.h.
Referenced by datafile(), and tecplot_data::parse().
      
  | 
  protected | 
Definition at line 164 of file file.h.
Referenced by get_num_points(), get_point(), get_points(), tecplot_data::parse(), partition_layout(), and ~datafile().
      
  | 
  private | 
Definition at line 191 of file file.h.
Referenced by datafile().
      
  | 
  protected | 
Definition at line 179 of file file.h.
Referenced by datafile(), and get_num_dep_vars().
      
  | 
  protected | 
Definition at line 138 of file file.h.
Referenced by datafile(), error_out(), and status_out().
      
  | 
  protected | 
Definition at line 141 of file file.h.
Referenced by tecplot_data::count_zones(), tecplot_data::get_zone_header(), tecplot_data::get_zone_nodes(), tecplot_data::parse(), tecplot_data::read_header(), and tecplot_data::seek_to_zone().
      
  | 
  protected | 
Definition at line 143 of file file.h.
Referenced by datafile(), and status_out().
      
  | 
  protected | 
Definition at line 186 of file file.h.
Referenced by datafile(), LogFieldMappings(), and tecplot_data::parse().
      
  | 
  protected | 
Definition at line 197 of file file.h.
Referenced by datafile(), and get_index_order().
      
  | 
  protected | 
Definition at line 183 of file file.h.
Referenced by datafile(), and tecplot_data::parse().
      
  | 
  protected | 
Definition at line 167 of file file.h.
Referenced by datafile(), get_num_partitions(), get_num_points(), get_point(), tecplot_data::get_zone_nodes(), tecplot_data::parse(), and ~datafile().
      
  | 
  protected | 
Definition at line 142 of file file.h.
Referenced by error_out(), and status_out().
      
  | 
  protected | 
Definition at line 169 of file file.h.
Referenced by datafile(), get_title(), and tecplot_data::read_header().
      
  | 
  protected | 
Definition at line 168 of file file.h.
Referenced by datafile(), get_num_dep_vars(), get_num_vars(), and tecplot_data::read_header().