/[ascend]/trunk/models/johnpye/datareader/dr.h
ViewVC logotype

Diff of /trunk/models/johnpye/datareader/dr.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 808 by johnpye, Thu Aug 3 01:48:05 2006 UTC revision 809 by johnpye, Mon Aug 7 14:48:55 2006 UTC
# Line 33  Line 33 
33    
34  struct DataReader;  struct DataReader;
35    
36    typedef enum datareader_file_format_enum{
37        DATAREADER_FORMAT_TMY2
38        ,DATAREADER_FORMAT_UNKNOWN
39    } datareader_file_format_t;
40    
41  int datareader_new(const char *fn);  int datareader_new(const char *fn);
42  int datareader_init(DataReader *d);  int datareader_init(DataReader *d);
43  int datareader_set_input_filter(DataReader *d, InputFilterFn *iff);  int datareader_set_file_format(DataReader *d, const datareader_file_format_t &format);
44  int datareader_delete(DataReader *d);  int datareader_delete(DataReader *d);
45    
46  int datareader_num_inputs(const DataReader *d);  int datareader_num_inputs(const DataReader *d);
# Line 46  int datareader_deriv(DataReader *d, doub Line 51  int datareader_deriv(DataReader *d, doub
51    
52    
53  /**  /**
54      An input filter function must be able to return a row of data by reading the      Function that can read a single data point from the open file.
55      file at the current point. Returns 0 on success.      Should return 0 on success.
56    */
57    typedef int (DataReaderReadFn)(DataReader *d);
58    
59    /**
60        Function that can read the file header and allocate necessary memory
61  */  */
62  typedef int (InputFilterFn)(FILE *f, double *inputs, double *ouputs);  typedef int (DataReaderHeaderFn)(DataReader *d);
63    
64    
65    /**
66        A function that should be called when a file is first opened, optional.
67        This function can read header lines and determine the number of columns if
68        necessary.
69    
70        Return 0 on success.
71    */
72    typedef int (DataHeaderFn)(DataRader *d);
73    
74  #endif  #endif

Legend:
Removed from v.808  
changed lines
  Added in v.809

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22