[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 980317: C++ interfaces to netCDF
- Subject: Re: 980317: C++ interfaces to netCDF
- Date: Wed, 18 Mar 1998 11:42:00 -0700
> > I don't see any equivalent of nc_advise() documented in the Version 3
> > C interfaces. If I were to replace all V2 calls in the C++ interfaces,
> > what should I use?
>
> Well, nc_advise was not actually documented in the version 2 C
> interfaces either. (But I don't see any uses of nc_advise in the 3.4 cxx
> source directory.) It might be best to write a little wrapper that does
> the error handling, though this gets back to the issue of exception
> handling and whether to use the C++ exception mechanisms. I'll forward
> this to Glenn, in case he has any opinions on this ...
The function nc_advise() is new in netcdf-3, and is used to implement
the netcdf-2 compatibility functions in libsrc/v2i.c.
It's closest analog in netcdf-2 was the internal function NCadvise().
The function nc_advise() is of extern scope and publically declared
in netcdf.h except when NO_NETCDF_2 is #defined.
The reason nc_advise() is publically declared is precisely to
support transitional use of the netcdf-3 functions in mostly netcdf-2
situations. It references the netcdf-2 globals ncerr and ncopts,
so it would not make much sense to use in a pure netcdf-3 program.
BTW, The netcdf-3 include file netcdf.h is safe to use in C++ programs
and the netcdf-3 libsrc can be compiled by a C++ compiler directly.
-glenn