source: anuga_work/development/anugavis/src/sww_file.hh @ 5636

Last change on this file since 5636 was 5636, checked in by jack, 16 years ago

Almost ready to run.

File size: 1.1 KB
Line 
1#ifndef SWW_FILE_HH
2#define SWW_FILE_HH
3
4/* A simple read-only wrapper around the NetCDF C calls, since it's
5   difficult to build the C++ binding on Win32 (further, it fails its
6   test suite. */
7#ifdef HAVE_CONFIG_H
8#  include "config.h"
9#endif
10#include <string>
11#ifdef HAVE_SYS_TYPES_H
12#  include <sys/types.h>
13#endif
14#include <boost/shared_array.hpp>
15
16using boost::shared_array;
17using std::string;
18
19class SWWFile{
20  friend class AnugaVis;
21  friend class HeightQuantity;
22public:
23  SWWFile(const string &file_name);
24  ~SWWFile(void);
25  int nc_inq_varndims_by_name(const string &name) const;
26private:
27  void nc_get_var_float_by_name(const string &name, float array[]) const;
28  void nc_get_var_int_by_name(const string &name, int array[]) const;
29  size_t nc_inq_dimlen_by_name(const string &name) const;
30  void compute_extents(void);
31  int netcdf_id;
32  int number_of_points;
33  int number_of_timesteps;
34  int number_of_vertices;
35  int number_of_volumes;
36  shared_array<float> x;
37  shared_array<float> y;
38  shared_array<int> volumes;
39  float minX;
40  float maxX;
41  float minY;
42  float maxY;
43};
44
45#endif
Note: See TracBrowser for help on using the repository browser.