source: anuga_work/development/anugavis/src/netcdf_file.cc @ 5487

Last change on this file since 5487 was 5487, checked in by jack, 14 years ago

Started C++-ising the code.

File size: 354 bytes
Line 
1#include <string>
2#include <netcdf.h>
3#include "netcdf_file.hh"
4
5using std::string;
6
7NetCDFFile::NetCDFFile(const string &file_name){
8  int ncstatus;
9  if((ncstatus = nc_open(file_name.c_str(),
10                         NC_SHARE, &this->netcdf_id)) != NC_NOERR)
11    throw nc_strerror(ncstatus);
12}
13
14NetCDFFile::~NetCDFFile(void){
15  nc_close(this->netcdf_id);
16}
Note: See TracBrowser for help on using the repository browser.