• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/home/pascal/depot/filedata/src/netcdffiledata.h

00001 //
00002 // C++ Interface: %{MODULE}
00003 //
00004 // Description:
00005 //
00006 //
00007 // Author: %{AUTHOR} <%{EMAIL}>, (C) %{YEAR}
00008 //
00009 // Copyright: See COPYING file that comes with this distribution
00010 //
00011 //
00012 #ifndef NETCDFFILEDATA_H
00013 #define NETCDFFILEDATA_H
00014 
00015 #include <string.h>
00016 #include <vector>
00017 
00018 
00019 #include "Hdf_file.hpp"
00020 #include "filedataexception.h"
00021 #include "statistic.h"
00022 #include "filedatareader.h"
00023 
00024 
00025 
00026 //using namespace std;
00027 
00031 class NETCDFFileData : public FileDataReader{
00032 public:
00033     NETCDFFileData(const string &filename, const string &mode);
00034 
00035     //NETCDFFileData::NETCDFFileData( const NETCDFFileData & hfd );
00036 
00037     virtual ~NETCDFFileData();
00038 
00039     virtual void* read_data(void* data,
00040                             const char* sds_name,
00041                             int * start=NULL,
00042                             int * stride=NULL,
00043                             int *edges=NULL,
00044                             int rank=-1);
00045 
00046     virtual vector<int> get_dataset_dimension(const string &sds_name);
00047 
00048     virtual bool dataset_exists(const char *sds_name);
00049 
00050     void get_dataset_fill_value(const string &sds_name, void* fill_value);
00051 
00052     int get_n_dataset();
00053 
00054     string get_dataset_name(int i);
00055 
00056     int get_dataset_data_type(string sds_name);
00057 
00058     string get_values_attr_dataset(string sds_name,string attr_name);
00059 
00060     bool has_attr_dataset(string sds_name,string attr_name);
00061 
00065     void close_data_file(){SDend(ncfile);ncfile=-1;};
00066 
00070     void open_data_file();
00071 
00072 protected:
00073     int32 ncfile;
00074     string filename;
00075     const bool check_read_write_limits(const char* sds_name, int *start, int *stride, int *edges, const int rank);
00076     void init_read_write_null_input_param(const char* sds_name, int *&start, int *&stride, int *&edges, int &rank, bool * initialized_values);
00077     void free_read_write_allocations( const bool *are_limits_initialized, int *start, int *stride, int *edges );
00078     Hdf_sds get_dataset(string sds_name);
00079 };
00080 
00081 #endif

Generated on Thu Feb 14 2013 17:59:03 for filedata.kdevelop by  doxygen 1.7.1