Patch for netcdf-3.3.1/src/cxx ================================== To apply, invoke the following command from the netcdf-3.3.1/src/cxx directory, where you should replace PATCHFILE by the name for this file: patch < PATCHFILE Then rebuild with "make all". Test with "make test". Install with "make install". Index: netcdf-3/cxx/Makefile diff -c netcdf-3/cxx/Makefile:1.6 netcdf-3/cxx/Makefile:1.7 *** netcdf-3/cxx/Makefile:1.6 Thu May 15 14:22:47 1997 --- netcdf-3/cxx/Makefile Mon Nov 17 09:31:44 1997 *************** *** 1,4 **** ! # $Id: Makefile,v 1.6 1997/05/15 20:22:47 steve Exp $ # # Development Makefile for netcdf c++ interface # --- 1,4 ---- ! # $Id: Makefile,v 1.7 1997/11/17 16:31:44 russ Exp $ # # Development Makefile for netcdf c++ interface # *************** *** 78,84 **** nctst.pure: $(prog_objs) $(purify) $(LINK.cc) $(prog_objs) $(libs) -o $@ - . include ../rules.make --- 78,83 ---- Index: netcdf-3/cxx/cxxdoc.tex diff -c netcdf-3/cxx/cxxdoc.tex:1.2 netcdf-3/cxx/cxxdoc.tex:1.5 *** netcdf-3/cxx/cxxdoc.tex:1.2 Wed Apr 23 09:27:50 1997 --- netcdf-3/cxx/cxxdoc.tex Wed Nov 19 13:57:01 1997 *************** *** 1,5 **** \input texinfo @c -*-texinfo-*- ! @comment $Id: cxxdoc.tex,v 1.2 1997/04/23 15:27:50 steve Exp $ @comment %**start of header @setfilename cxxdoc.info @settitle NetCDF @value{version} C++ Interface --- 1,5 ---- \input texinfo @c -*-texinfo-*- ! @comment $Id: cxxdoc.tex,v 1.5 1997/11/19 20:57:01 russ Exp $ @comment %**start of header @setfilename cxxdoc.info @settitle NetCDF @value{version} C++ Interface *************** *** 223,229 **** The netCDF classes use several auxiliary types for arguments and return types from member functions: @code{NcToken}, @code{NcType}, ! @code{NcBool}, @code{nclong}, and @code{ncbyte}. @table @code @vindex NcToken --- 223,229 ---- The netCDF classes use several auxiliary types for arguments and return types from member functions: @code{NcToken}, @code{NcType}, ! @code{NcBool}, and @code{ncbyte}. @table @code @vindex NcToken *************** *** 234,243 **** @vindex NcType @item NcType ! Used for specifying netCDF value types. Currently this is an enumerated ! type with the following legitimate values: @code{ncByte}, ! @code{ncChar}, @code{ncShort}, @code{ncLong}, @code{ncFloat}, and ! @code{ncDouble}. @vindex NcBool @item NcBool --- 234,243 ---- @vindex NcType @item NcType ! Used for specifying netCDF external value types. Currently this is an ! enumerated type with the following legitimate values: @code{ncByte}, ! @code{ncChar}, @code{ncShort}, @code{ncInt}, @code{ncLong} (deprecated), ! @code{ncFloat}, and @code{ncDouble}. @vindex NcBool @item NcBool *************** *** 246,259 **** this is just a typedef for @code{unsigned int}. It will be changed to @code{bool} when all C++ compilers support the new @code{bool} type. - @vindex nclong - @item nclong - Used to declare values of type @code{ncLong}, for 32-bit signed integer - data. Use this instead of @code{long} for portability among - architectures that differ in the size of the primitive @code{long} - type. Currently there is no netCDF type corresponding to 64-bit signed - integers. - @vindex ncbyte @item ncbyte Used to declare values of type @code{ncByte}, for 8-bit integer data. --- 246,251 ---- *************** *** 419,425 **** @findex NcFile::add_var @item NcVar* add_var(NcToken varname, NcType type, const NcDim*, @dots{}) Add a variable named @code{varname} of the specified type ! (@code{ncByte}, @code{ncChar}, @code{ncShort}, @code{ncLong}, @code{ncFloat}, @code{ncDouble}) to the open netCDF file. The variable is defined with a shape that depends on how many dimension arguments are provided. A scalar variable would have 0 --- 411,417 ---- @findex NcFile::add_var @item NcVar* add_var(NcToken varname, NcType type, const NcDim*, @dots{}) Add a variable named @code{varname} of the specified type ! (@code{ncByte}, @code{ncChar}, @code{ncShort}, @code{ncInt}, @code{ncFloat}, @code{ncDouble}) to the open netCDF file. The variable is defined with a shape that depends on how many dimension arguments are provided. A scalar variable would have 0 *************** *** 439,445 **** @item NcBool add_att(NcToken name, ncbyte val) @itemx NcBool add_att(NcToken name, char val) @itemx NcBool add_att(NcToken name, short val) ! @itemx NcBool add_att(NcToken name, nclong val) @itemx NcBool add_att(NcToken name, float val) @itemx NcBool add_att(NcToken name, double val) Add global scalar attributes of the specified name and with the --- 431,437 ---- @item NcBool add_att(NcToken name, ncbyte val) @itemx NcBool add_att(NcToken name, char val) @itemx NcBool add_att(NcToken name, short val) ! @itemx NcBool add_att(NcToken name, int val) @itemx NcBool add_att(NcToken name, float val) @itemx NcBool add_att(NcToken name, double val) Add global scalar attributes of the specified name and with the *************** *** 454,460 **** @item NcBool add_att(NcToken name, int n, const ncbyte* val) @itemx NcBool add_att(NcToken name, int n, const char* val) @itemx NcBool add_att(NcToken name, int n, const short* val) ! @itemx NcBool add_att(NcToken name, int n, const nclong* val) @itemx NcBool add_att(NcToken name, int n, const float* val) @itemx NcBool add_att(NcToken name, int n, const double* val) Add global vector attributes with the specified name, length, and values. --- 446,452 ---- @item NcBool add_att(NcToken name, int n, const ncbyte* val) @itemx NcBool add_att(NcToken name, int n, const char* val) @itemx NcBool add_att(NcToken name, int n, const short* val) ! @itemx NcBool add_att(NcToken name, int n, const int* val) @itemx NcBool add_att(NcToken name, int n, const float* val) @itemx NcBool add_att(NcToken name, int n, const double* val) Add global vector attributes with the specified name, length, and values. *************** *** 564,570 **** @item NcType type( void ) const Returns the type of the variable or attribute. The type will be one of ! @code{ncByte}, @code{ncChar}, @code{ncShort}, @code{ncLong}, @code{ncFloat}, or @code{ncDouble}. @findex is_valid --- 556,562 ---- @item NcType type( void ) const Returns the type of the variable or attribute. The type will be one of ! @code{ncByte}, @code{ncChar}, @code{ncShort}, @code{ncInt}, @code{ncFloat}, or @code{ncDouble}. @findex is_valid *************** *** 594,603 **** @item NcValues* values( void ) const Returns a pointer to the block of all values for the variable or ! attribute. This will be deleted when the variable or attribute is ! destroyed. Note that this is not a good way to read selected values of ! a variable; use the @code{get} member function instead, to get single ! values or selected cross-sections of values. @findex as_ncbyte @findex NcTypedComponent::as_ncbyte --- 586,595 ---- @item NcValues* values( void ) const Returns a pointer to the block of all values for the variable or ! attribute. The caller is responsible for deleting this block of values ! when no longer needed. Note that this is not a good way to read ! selected values of a variable; use the @code{get} member function ! instead, to get single values or selected cross-sections of values. @findex as_ncbyte @findex NcTypedComponent::as_ncbyte *************** *** 608,616 **** @findex as_short @findex NcTypedComponent::as_short @itemx short as_short( int n ) const @findex as_nclong @findex NcTypedComponent::as_nclong ! @itemx long as_nclong( int n ) const @findex as_float @findex NcTypedComponent::as_float @itemx float as_float( int n ) const --- 600,614 ---- @findex as_short @findex NcTypedComponent::as_short @itemx short as_short( int n ) const + @findex as_int + @findex NcTypedComponent::as_int + @itemx int as_int( int n ) const @findex as_nclong @findex NcTypedComponent::as_nclong ! @itemx nclong as_nclong( int n ) const // deprecated ! @findex as_long ! @findex NcTypedComponent::as_long ! @itemx long as_long( int n ) const @findex as_float @findex NcTypedComponent::as_float @itemx float as_float( int n ) const *************** *** 653,659 **** @item NcType type( void ) const Returns the type of the variable. The type will be one of ! @code{ncByte}, @code{ncChar}, @code{ncShort}, @code{ncLong}, @code{ncFloat}, or @code{ncDouble}. @findex num_dims --- 651,657 ---- @item NcType type( void ) const Returns the type of the variable. The type will be one of ! @code{ncByte}, @code{ncChar}, @code{ncShort}, @code{ncInt}, @code{ncFloat}, or @code{ncDouble}. @findex num_dims *************** *** 669,675 **** @findex edges @findex NcVar::edges ! @item const long* edges( void ) const Returns the shape of the variable, in the form of a vector containing the sizes of the dimensions of the variable. --- 667,673 ---- @findex edges @findex NcVar::edges ! @item long* edges( void ) const Returns the shape of the variable, in the form of a vector containing the sizes of the dimensions of the variable. *************** *** 708,715 **** @item NcValues* values( void ) const Returns a pointer to the block of all values for the variable. ! This will be deleted when the variable is ! destroyed. Note that this is not a good way to read selected values of a variable; use the @code{get} member function instead, to get single values or selected cross-sections of values. --- 706,714 ---- @item NcValues* values( void ) const Returns a pointer to the block of all values for the variable. ! The caller is responsible for deleting this block of values ! when no longer needed. ! Note that this is not a good way to read selected values of a variable; use the @code{get} member function instead, to get single values or selected cross-sections of values. *************** *** 718,724 **** @item NcBool put(const ncbyte* vals, long c0, long c1, long c2, long c3, long c4) @itemx NcBool put(const char* vals, long c0, long c1, long c2, long c3, long c4) @itemx NcBool put(const short* vals, long c0, long c1, long c2, long c3, long c4) ! @itemx NcBool put(const nclong* vals, long c0, long c1, long c2, long c3, long c4) @itemx NcBool put(const float* vals, long c0, long c1, long c2, long c3, long c4) @itemx NcBool put(const double* vals, long c0, long c1, long c2, long c3, long c4) --- 717,724 ---- @item NcBool put(const ncbyte* vals, long c0, long c1, long c2, long c3, long c4) @itemx NcBool put(const char* vals, long c0, long c1, long c2, long c3, long c4) @itemx NcBool put(const short* vals, long c0, long c1, long c2, long c3, long c4) ! @itemx NcBool put(const int* vals, long c0, long c1, long c2, long c3, long c4) ! @itemx NcBool put(const long* vals, long c0, long c1, long c2, long c3, long c4) @itemx NcBool put(const float* vals, long c0, long c1, long c2, long c3, long c4) @itemx NcBool put(const double* vals, long c0, long c1, long c2, long c3, long c4) *************** *** 735,741 **** @item NcBool put(const ncbyte* vals, const long* counts) @itemx NcBool put(const char* vals, const long* counts) @itemx NcBool put(const short* vals, const long* counts) ! @itemx NcBool put(const nclong* vals, const long* counts) @itemx NcBool put(const float* vals, const long* counts) @itemx NcBool put(const double* vals, const long* counts) --- 735,742 ---- @item NcBool put(const ncbyte* vals, const long* counts) @itemx NcBool put(const char* vals, const long* counts) @itemx NcBool put(const short* vals, const long* counts) ! @itemx NcBool put(const int* vals, const long* counts) ! @itemx NcBool put(const long* vals, const long* counts) @itemx NcBool put(const float* vals, const long* counts) @itemx NcBool put(const double* vals, const long* counts) *************** *** 748,754 **** @item NcBool get(ncbyte* vals, long c0, long c1, long c2, long c3, long c4) const @itemx NcBool get(char* vals, long c0, long c1, long c2, long c3, long c4) const @itemx NcBool get(short* vals, long c0, long c1, long c2, long c3, long c4) const ! @itemx NcBool get(nclong* vals, long c0, long c1, long c2, long c3, long c4) const @itemx NcBool get(float* vals, long c0, long c1, long c2, long c3, long c4) const @itemx NcBool get(double* vals, long c0, long c1, long c2, long c3, long c4) const --- 749,756 ---- @item NcBool get(ncbyte* vals, long c0, long c1, long c2, long c3, long c4) const @itemx NcBool get(char* vals, long c0, long c1, long c2, long c3, long c4) const @itemx NcBool get(short* vals, long c0, long c1, long c2, long c3, long c4) const ! @itemx NcBool get(int* vals, long c0, long c1, long c2, long c3, long c4) const ! @itemx NcBool get(long* vals, long c0, long c1, long c2, long c3, long c4) const @itemx NcBool get(float* vals, long c0, long c1, long c2, long c3, long c4) const @itemx NcBool get(double* vals, long c0, long c1, long c2, long c3, long c4) const *************** *** 763,769 **** @item NcBool get(ncbyte* vals, const long* counts) const @itemx NcBool get(char* vals, const long* counts) const @itemx NcBool get(short* vals, const long* counts) const ! @itemx NcBool get(nclong* vals, const long* counts) const @itemx NcBool get(float* vals, const long* counts) const @itemx NcBool get(double* vals, const long* counts) const Get n-dimensional arrays, starting at @code{[0, 0, ..., 0]} by default, --- 765,772 ---- @item NcBool get(ncbyte* vals, const long* counts) const @itemx NcBool get(char* vals, const long* counts) const @itemx NcBool get(short* vals, const long* counts) const ! @itemx NcBool get(int* vals, const long* counts) const ! @itemx NcBool get(long* vals, const long* counts) const @itemx NcBool get(float* vals, const long* counts) const @itemx NcBool get(double* vals, const long* counts) const Get n-dimensional arrays, starting at @code{[0, 0, ..., 0]} by default, *************** *** 785,798 **** @item NcBool add_att( NcToken, char ) @item NcBool add_att( NcToken, ncbyte ) @itemx NcBool add_att( NcToken, short ) ! @itemx NcBool add_att( NcToken, nclong ) @itemx NcBool add_att( NcToken, float ) @itemx NcBool add_att( NcToken, double ) @itemx NcBool add_att( NcToken, const char* ) @itemx NcBool add_att( NcToken, int, const char* ) @itemx NcBool add_att( NcToken, int, const ncbyte* ) @itemx NcBool add_att( NcToken, int, const short* ) ! @itemx NcBool add_att( NcToken, int, const nclong* ) @itemx NcBool add_att( NcToken, int, const float* ) @itemx NcBool add_att( NcToken, int, const double* ) --- 788,803 ---- @item NcBool add_att( NcToken, char ) @item NcBool add_att( NcToken, ncbyte ) @itemx NcBool add_att( NcToken, short ) ! @itemx NcBool add_att( NcToken, int ) ! @itemx NcBool add_att( NcToken, long ) @itemx NcBool add_att( NcToken, float ) @itemx NcBool add_att( NcToken, double ) @itemx NcBool add_att( NcToken, const char* ) @itemx NcBool add_att( NcToken, int, const char* ) @itemx NcBool add_att( NcToken, int, const ncbyte* ) @itemx NcBool add_att( NcToken, int, const short* ) ! @itemx NcBool add_att( NcToken, int, const int* ) ! @itemx NcBool add_att( NcToken, int, const long* ) @itemx NcBool add_att( NcToken, int, const float* ) @itemx NcBool add_att( NcToken, int, const double* ) *************** *** 817,825 **** @findex as_short @findex NcTypedComponent::as_short @itemx short as_short( int n ) const @findex as_nclong @findex NcTypedComponent::as_nclong ! @itemx long as_nclong( int n ) const @findex as_float @findex NcTypedComponent::as_float @itemx float as_float( int n ) const --- 822,836 ---- @findex as_short @findex NcTypedComponent::as_short @itemx short as_short( int n ) const + @findex as_int + @findex NcTypedComponent::as_int + @itemx int as_int( int n ) const @findex as_nclong @findex NcTypedComponent::as_nclong ! @itemx nclong as_nclong( int n ) const // deprecated ! @findex as_long ! @findex NcTypedComponent::as_long ! @itemx long as_long( int n ) const @findex as_float @findex NcTypedComponent::as_float @itemx float as_float( int n ) const *************** *** 879,885 **** @item NcBool put_rec( const ncbyte* vals ) @itemx NcBool put_rec( const char* vals ) @itemx NcBool put_rec( const short* vals ) ! @itemx NcBool put_rec( const nclong* vals ) @itemx NcBool put_rec( const float* vals ) @itemx NcBool put_rec( const double* vals ) --- 890,897 ---- @item NcBool put_rec( const ncbyte* vals ) @itemx NcBool put_rec( const char* vals ) @itemx NcBool put_rec( const short* vals ) ! @itemx NcBool put_rec( const int* vals ) ! @itemx NcBool put_rec( const long* vals ) @itemx NcBool put_rec( const float* vals ) @itemx NcBool put_rec( const double* vals ) *************** *** 890,896 **** @item NcBool put_rec( const ncbyte* vals, long rec ) @itemx NcBool put_rec( const char* vals, long rec ) @itemx NcBool put_rec( const short* vals, long rec ) ! @itemx NcBool put_rec( const nclong* vals, long rec ) @itemx NcBool put_rec( const float* vals, long rec ) @itemx NcBool put_rec( const double* vals, long rec ) --- 902,909 ---- @item NcBool put_rec( const ncbyte* vals, long rec ) @itemx NcBool put_rec( const char* vals, long rec ) @itemx NcBool put_rec( const short* vals, long rec ) ! @itemx NcBool put_rec( const int* vals, long rec ) ! @itemx NcBool put_rec( const long* vals, long rec ) @itemx NcBool put_rec( const float* vals, long rec ) @itemx NcBool put_rec( const double* vals, long rec ) *************** *** 901,907 **** @item long get_index( const ncbyte* vals ) @itemx long get_index( const char* vals ) @itemx long get_index( const short* vals ) ! @itemx long get_index( const nclong* vals ) @itemx long get_index( const float* vals ) @itemx long get_index( const double* vals ) --- 914,921 ---- @item long get_index( const ncbyte* vals ) @itemx long get_index( const char* vals ) @itemx long get_index( const short* vals ) ! @itemx long get_index( const int* vals ) ! @itemx long get_index( const long* vals ) @itemx long get_index( const float* vals ) @itemx long get_index( const double* vals ) *************** *** 946,952 **** @item NcType type( void ) const Returns the type of the attribute. The type will be one of ! @code{ncByte}, @code{ncChar}, @code{ncShort}, @code{ncLong}, @code{ncFloat}, or @code{ncDouble}. @findex is_valid --- 960,966 ---- @item NcType type( void ) const Returns the type of the attribute. The type will be one of ! @code{ncByte}, @code{ncChar}, @code{ncShort}, @code{ncInt}, @code{ncFloat}, or @code{ncDouble}. @findex is_valid *************** *** 961,968 **** Returns the number of values for an attribute. This is just 1 for a scalar attribute, the number of values for a vector-valued attribute, ! and the number of characters (including the terminating @code{'\0'} ! character) for a string-valued attribute. @findex rename @findex NcTypedComponent::rename --- 975,981 ---- Returns the number of values for an attribute. This is just 1 for a scalar attribute, the number of values for a vector-valued attribute, ! and the number of characters for a string-valued attribute. @findex rename @findex NcTypedComponent::rename *************** *** 975,982 **** @item NcValues* values( void ) const Returns a pointer to the block of all values for the ! attribute. This will be deleted when the attribute is ! destroyed. @findex as_ncbyte @findex NcTypedComponent::as_ncbyte --- 988,995 ---- @item NcValues* values( void ) const Returns a pointer to the block of all values for the ! attribute. The caller is responsible for deleting this block of values ! when no longer needed. @findex as_ncbyte @findex NcTypedComponent::as_ncbyte *************** *** 987,995 **** @findex as_short @findex NcTypedComponent::as_short @itemx short as_short( int n ) const @findex as_nclong @findex NcTypedComponent::as_nclong ! @itemx long as_nclong( int n ) const @findex as_float @findex NcTypedComponent::as_float @itemx float as_float( int n ) const --- 1000,1018 ---- @findex as_short @findex NcTypedComponent::as_short @itemx short as_short( int n ) const + + @findex as_int + @findex NcTypedComponent::as_int + @itemx int as_int( int n ) const + @findex as_nclong @findex NcTypedComponent::as_nclong ! @itemx nclong as_nclong( int n ) const // deprecated ! ! @findex as_long ! @findex NcTypedComponent::as_long ! @itemx long as_long( int n ) const ! @findex as_float @findex NcTypedComponent::as_float @itemx float as_float( int n ) const *************** *** 1037,1048 **** @vindex NcValues_ncbyte @vindex NcValues_char @vindex NcValues_short @vindex NcValues_nclong @vindex NcValues_float @vindex NcValues_double Class @code{NcValues} is an abstract base class for a block of typed values. The derived classes are @code{NcValues_ncbyte}, ! @code{NcValues_char}, @code{NcValues_short}, @code{NcValues_nclong}, @code{NcValues_float}, @code{NcValues_double}. These classes are used as the return type of the @code{NcTypedComponent::values()} member function, for typed-value --- 1060,1074 ---- @vindex NcValues_ncbyte @vindex NcValues_char @vindex NcValues_short + @vindex NcValues_int @vindex NcValues_nclong + @vindex NcValues_long @vindex NcValues_float @vindex NcValues_double Class @code{NcValues} is an abstract base class for a block of typed values. The derived classes are @code{NcValues_ncbyte}, ! @code{NcValues_char}, @code{NcValues_short}, @code{NcValues_int}, ! @code{NcValues_nclong} (deprecated), and @code{NcValues_long}, @code{NcValues_float}, @code{NcValues_double}. These classes are used as the return type of the @code{NcTypedComponent::values()} member function, for typed-value *************** *** 1095,1103 **** @findex as_short @findex NcValues::as_short @itemx short as_short( int n ) const @findex as_long @findex NcValues::as_long ! @itemx long as_nclong( int n ) const @findex as_float @findex NcValues::as_float @itemx float as_float( int n ) const --- 1121,1139 ---- @findex as_short @findex NcValues::as_short @itemx short as_short( int n ) const + + @findex as_int + @findex NcValues::as_int + @itemx int as_int( int n ) const + + @findex as_nclong + @findex NcValues::as_nclong + @itemx nclong as_nclong( int n ) const // deprecated + @findex as_long @findex NcValues::as_long ! @itemx long as_long( int n ) const ! @findex as_float @findex NcValues::as_float @itemx float as_float( int n ) const Index: netcdf-3/cxx/example.cc diff -c netcdf-3/cxx/example.cc:1.1 netcdf-3/cxx/example.cc:1.2 *** netcdf-3/cxx/example.cc:1.1 Mon Apr 21 09:44:44 1997 --- netcdf-3/cxx/example.cc Wed Nov 19 13:33:27 1997 *************** *** 64,70 **** lons[i] = -180. + 5.*i; lon->put(lons, lond->size()); ! static nclong frtimes[] = {12, 18}; frtime->put(frtimes, NUM(frtimes)); static char* s = "1992 03 04 12:00" ; --- 64,70 ---- lons[i] = -180. + 5.*i; lon->put(lons, lond->size()); ! static int frtimes[] = {12, 18}; frtime->put(frtimes, NUM(frtimes)); static char* s = "1992 03 04 12:00" ; Index: netcdf-3/cxx/nctst.cc diff -c netcdf-3/cxx/nctst.cc:1.1 netcdf-3/cxx/nctst.cc:1.2 *** netcdf-3/cxx/nctst.cc:1.1 Mon Apr 21 09:44:48 1997 --- netcdf-3/cxx/nctst.cc Wed Nov 19 13:33:28 1997 *************** *** 46,53 **** reftime->add_att("long_name", "reference time"); reftime->add_att("units", "text_time"); ! NcVar* scalar = nc.add_var("scalarv", ncLong); ! scalar->add_att("scalar_att", nclong(1)); // Global attributes nc.add_att("history", "created by Unidata LDM from NPS broadcast"); --- 46,53 ---- reftime->add_att("long_name", "reference time"); reftime->add_att("units", "text_time"); ! NcVar* scalar = nc.add_var("scalarv", ncInt); ! scalar->add_att("scalar_att", 1); // Global attributes nc.add_att("history", "created by Unidata LDM from NPS broadcast"); *************** *** 61,67 **** static float lons[NLONS] = {-180, -175, -170}; lon->put(lons, NLONS); ! static nclong frtimes[NFRTIMES] = {12, 18}; frtime->put(frtimes, NFRTIMES); static char* s = "1992-3-21 12:00" ; --- 61,67 ---- static float lons[NLONS] = {-180, -175, -170}; lon->put(lons, NLONS); ! static int frtimes[NFRTIMES] = {12, 18}; frtime->put(frtimes, NFRTIMES); static char* s = "1992-3-21 12:00" ; Index: netcdf-3/cxx/ncvalues.cc diff -c netcdf-3/cxx/ncvalues.cc:1.1 netcdf-3/cxx/ncvalues.cc:1.4 *** netcdf-3/cxx/ncvalues.cc:1.1 Mon Apr 21 09:44:51 1997 --- netcdf-3/cxx/ncvalues.cc Wed Nov 19 13:33:29 1997 *************** *** 4,10 **** * * Purpose: implementation of classes of typed arrays for netCDF * ! * $Header: /upc/share/CVS/netcdf-3/cxx/ncvalues.cc,v 1.1 1997/04/21 15:44:51 russ Exp $ *********************************************************************/ #include // for debugging --- 4,10 ---- * * Purpose: implementation of classes of typed arrays for netCDF * ! * $Header: /upc/share/CVS/netcdf-3/cxx/ncvalues.cc,v 1.4 1997/11/19 20:33:29 russ Exp $ *********************************************************************/ #include // for debugging *************** *** 33,51 **** --- 33,57 ---- implement(NcValues,ncbyte) implement(NcValues,char) implement(NcValues,short) + implement(NcValues,int) implement(NcValues,nclong) + implement(NcValues,long) implement(NcValues,float) implement(NcValues,double) Ncbytes_for_one_implement(ncbyte) Ncbytes_for_one_implement(char) Ncbytes_for_one_implement(short) + Ncbytes_for_one_implement(int) Ncbytes_for_one_implement(nclong) + Ncbytes_for_one_implement(long) Ncbytes_for_one_implement(float) Ncbytes_for_one_implement(double) as_ncbyte_implement(short) + as_ncbyte_implement(int) as_ncbyte_implement(nclong) + as_ncbyte_implement(long) as_ncbyte_implement(float) as_ncbyte_implement(double) *************** *** 60,66 **** --- 66,74 ---- } as_char_implement(short) + as_char_implement(int) as_char_implement(nclong) + as_char_implement(long) as_char_implement(float) as_char_implement(double) *************** *** 74,80 **** --- 82,90 ---- return the_values[n]; } + as_short_implement(int) as_short_implement(nclong) + as_short_implement(long) as_short_implement(float) as_short_implement(double) *************** *** 93,98 **** --- 103,142 ---- return the_values[n]; } + + as_int_implement(float) + as_int_implement(double) + + inline int NcValues_ncbyte::as_int( long n ) const + { + return the_values[n]; + } + + inline int NcValues_char::as_int( long n ) const + { + return the_values[n]; + } + + inline int NcValues_short::as_int( long n ) const + { + return the_values[n]; + } + + inline int NcValues_int::as_int( long n ) const + { + return the_values[n]; + } + + inline int NcValues_nclong::as_int( long n ) const + { + return the_values[n]; + } + + inline int NcValues_long::as_int( long n ) const + { + return the_values[n]; + } + as_nclong_implement(float) as_nclong_implement(double) *************** *** 111,121 **** --- 155,175 ---- return the_values[n]; } + inline nclong NcValues_int::as_nclong( long n ) const + { + return the_values[n]; + } + inline nclong NcValues_nclong::as_nclong( long n ) const { return the_values[n]; } + inline nclong NcValues_long::as_nclong( long n ) const + { + return the_values[n]; + } + as_long_implement(float) as_long_implement(double) *************** *** 134,160 **** --- 188,230 ---- return the_values[n]; } + inline long NcValues_int::as_long( long n ) const + { + return the_values[n]; + } + inline long NcValues_nclong::as_long( long n ) const { return the_values[n]; } + inline long NcValues_long::as_long( long n ) const + { + return the_values[n]; + } + as_float_implement(ncbyte) as_float_implement(char) as_float_implement(short) + as_float_implement(int) as_float_implement(nclong) + as_float_implement(long) as_float_implement(float) as_float_implement(double) as_double_implement(ncbyte) as_double_implement(char) as_double_implement(short) + as_double_implement(int) as_double_implement(nclong) + as_double_implement(long) as_double_implement(float) as_double_implement(double) as_string_implement(short) + as_string_implement(int) as_string_implement(nclong) + as_string_implement(long) as_string_implement(float) as_string_implement(double) *************** *** 183,189 **** --- 253,277 ---- return os; } + ostream& NcValues_int::print(ostream& os) const + { + for(int i = 0; i < the_number - 1; i++) + os << the_values[i] << ", "; + if (the_number > 0) + os << the_values[the_number-1] ; + return os; + } + ostream& NcValues_nclong::print(ostream& os) const + { + for(int i = 0; i < the_number - 1; i++) + os << the_values[i] << ", "; + if (the_number > 0) + os << the_values[the_number-1] ; + return os; + } + + ostream& NcValues_long::print(ostream& os) const { for(int i = 0; i < the_number - 1; i++) os << the_values[i] << ", "; Index: netcdf-3/cxx/ncvalues.hh diff -c netcdf-3/cxx/ncvalues.hh:1.2 netcdf-3/cxx/ncvalues.hh:1.6 *** netcdf-3/cxx/ncvalues.hh:1.2 Thu Jun 12 11:02:49 1997 --- netcdf-3/cxx/ncvalues.hh Wed Nov 19 13:33:30 1997 *************** *** 4,10 **** * * Purpose: interface for classes of typed arrays for netCDF * ! * $Header: /upc/share/CVS/netcdf-3/cxx/ncvalues.hh,v 1.2 1997/06/12 17:02:49 russ Exp $ *********************************************************************/ #ifndef Ncvalues_def --- 4,10 ---- * * Purpose: interface for classes of typed arrays for netCDF * ! * $Header: /upc/share/CVS/netcdf-3/cxx/ncvalues.hh,v 1.6 1997/11/19 20:33:30 russ Exp $ *********************************************************************/ #ifndef Ncvalues_def *************** *** 31,49 **** ncByte = NC_BYTE, ncChar = NC_CHAR, ncShort = NC_SHORT, ! ncLong = NC_LONG, ncFloat = NC_FLOAT, ncDouble = NC_DOUBLE }; #define ncBad_ncbyte ncBad_byte ! static const ncbyte ncBad_byte = FILL_BYTE; ! static const char ncBad_char = FILL_CHAR; ! static const short ncBad_short = FILL_SHORT; ! static const nclong ncBad_nclong = FILL_LONG; ! static const long ncBad_long = FILL_LONG; ! static const float ncBad_float = FILL_FLOAT; ! static const double ncBad_double = FILL_DOUBLE; // This is the same as the name2 macro from generic.h, but we need to define // our own version since rescanning something generated with the name2 macro --- 31,51 ---- ncByte = NC_BYTE, ncChar = NC_CHAR, ncShort = NC_SHORT, ! ncInt = NC_INT, ! ncLong = NC_LONG, // deprecated, someday want to use for 64-bit ints ncFloat = NC_FLOAT, ncDouble = NC_DOUBLE }; #define ncBad_ncbyte ncBad_byte ! static const ncbyte ncBad_byte = NC_FILL_BYTE; ! static const char ncBad_char = NC_FILL_CHAR; ! static const short ncBad_short = NC_FILL_SHORT; ! static const nclong ncBad_nclong = FILL_LONG; // deprecated ! static const int ncBad_int = NC_FILL_INT; ! static const long ncBad_long = FILL_LONG; // deprecated ! static const float ncBad_float = NC_FILL_FLOAT; ! static const double ncBad_double = NC_FILL_DOUBLE; // This is the same as the name2 macro from generic.h, but we need to define // our own version since rescanning something generated with the name2 macro *************** *** 68,74 **** virtual ncbyte as_ncbyte( long n ) const; \ virtual char as_char( long n ) const; \ virtual short as_short( long n ) const; \ ! virtual nclong as_nclong( long n ) const; \ virtual long as_long( long n ) const; \ virtual float as_float( long n ) const; \ virtual double as_double( long n ) const; \ --- 70,77 ---- virtual ncbyte as_ncbyte( long n ) const; \ virtual char as_char( long n ) const; \ virtual short as_short( long n ) const; \ ! virtual int as_int( long n ) const; \ ! virtual int as_nclong( long n ) const; \ virtual long as_long( long n ) const; \ virtual float as_float( long n ) const; \ virtual double as_double( long n ) const; \ *************** *** 83,89 **** --- 86,94 ---- #define _nc__ncbyte ncByte #define _nc__char ncChar #define _nc__short ncShort + #define _nc__int ncInt #define _nc__nclong ncLong + #define _nc__long ncLong #define _nc__float ncFloat #define _nc__double ncDouble #define NcValuesimplement(TYPE) \ *************** *** 168,173 **** --- 173,188 ---- return (short) the_values[n]; \ } + #define NCINT_MIN INT_MIN + #define NCINT_MAX INT_MAX + #define as_int_implement(TYPE) \ + int NcVal(TYPE)::as_int( long n ) const \ + { \ + if (the_values[n] < NCINT_MIN || the_values[n] > NCINT_MAX) \ + return ncBad_int; \ + return (int) the_values[n]; \ + } + #define NCLONG_MIN INT_MIN #define NCLONG_MAX INT_MAX #define as_nclong_implement(TYPE) \ *************** *** 224,230 **** virtual ncbyte as_ncbyte( long n ) const = 0; // nth value as a byte virtual char as_char( long n ) const = 0; // nth value as char virtual short as_short( long n ) const = 0; // nth value as short ! virtual nclong as_nclong( long n ) const = 0; // nth value as nclong virtual long as_long( long n ) const = 0; // nth value as long virtual float as_float( long n ) const = 0; // nth value as floating-point virtual double as_double( long n ) const = 0; // nth value as double --- 239,246 ---- virtual ncbyte as_ncbyte( long n ) const = 0; // nth value as a byte virtual char as_char( long n ) const = 0; // nth value as char virtual short as_short( long n ) const = 0; // nth value as short ! virtual int as_int( long n ) const = 0; // nth value as int ! virtual int as_nclong( long n ) const = 0; // nth value as nclong virtual long as_long( long n ) const = 0; // nth value as long virtual float as_float( long n ) const = 0; // nth value as floating-point virtual double as_double( long n ) const = 0; // nth value as double *************** *** 239,245 **** --- 255,263 ---- declare(NcValues,ncbyte) declare(NcValues,char) declare(NcValues,short) + declare(NcValues,int) declare(NcValues,nclong) + declare(NcValues,long) declare(NcValues,float) declare(NcValues,double) Index: netcdf-3/cxx/netcdf.cc diff -c netcdf-3/cxx/netcdf.cc:1.1 netcdf-3/cxx/netcdf.cc:1.7 *** netcdf-3/cxx/netcdf.cc:1.1 Mon Apr 21 09:44:55 1997 --- netcdf-3/cxx/netcdf.cc Wed Nov 19 13:20:58 1997 *************** *** 4,10 **** * * Purpose: Implements class interface for netCDF over C interface * ! * $Header: /upc/share/CVS/netcdf-3/cxx/netcdf.cc,v 1.1 1997/04/21 15:44:55 russ Exp $ *********************************************************************/ #include --- 4,10 ---- * * Purpose: Implements class interface for netCDF over C interface * ! * $Header: /upc/share/CVS/netcdf-3/cxx/netcdf.cc,v 1.7 1997/11/19 20:20:58 russ Exp $ *********************************************************************/ #include *************** *** 171,176 **** --- 171,177 ---- NcVar* varp = new NcVar(this, ncvardef(the_id, name, (nc_type) type, ndims, dimids)); variables[n] = varp; + delete [] dimids; return varp; } *************** *** 183,189 **** NcFile_add_scalar_att(char) NcFile_add_scalar_att(ncbyte) NcFile_add_scalar_att(short) ! NcFile_add_scalar_att(nclong) NcFile_add_scalar_att(float) NcFile_add_scalar_att(double) NcFile_add_scalar_att(const char*) --- 184,191 ---- NcFile_add_scalar_att(char) NcFile_add_scalar_att(ncbyte) NcFile_add_scalar_att(short) ! NcFile_add_scalar_att(int) ! NcFile_add_scalar_att(long) NcFile_add_scalar_att(float) NcFile_add_scalar_att(double) NcFile_add_scalar_att(const char*) *************** *** 197,203 **** NcFile_add_vector_att(char) NcFile_add_vector_att(ncbyte) NcFile_add_vector_att(short) ! NcFile_add_vector_att(nclong) NcFile_add_vector_att(float) NcFile_add_vector_att(double) --- 199,206 ---- NcFile_add_vector_att(char) NcFile_add_vector_att(ncbyte) NcFile_add_vector_att(short) ! NcFile_add_vector_att(int) ! NcFile_add_vector_att(long) NcFile_add_vector_att(float) NcFile_add_vector_att(double) *************** *** 428,441 **** } #define Nc_as(TYPE) name2(as_,TYPE) ! #define NcTypedComponent_as(TYPE) \ ! TYPE NcTypedComponent::Nc_as(TYPE)( long n ) const \ ! { \ ! return values()->Nc_as(TYPE)(n); \ } NcTypedComponent_as(ncbyte) NcTypedComponent_as(char) NcTypedComponent_as(short) NcTypedComponent_as(nclong) NcTypedComponent_as(long) NcTypedComponent_as(float) --- 431,448 ---- } #define Nc_as(TYPE) name2(as_,TYPE) ! #define NcTypedComponent_as(TYPE) \ ! TYPE NcTypedComponent::Nc_as(TYPE)( long n ) const \ ! { \ ! NcValues *tmp = values(); \ ! TYPE rval = tmp->Nc_as(TYPE)(n); \ ! delete tmp; \ ! return rval; \ } NcTypedComponent_as(ncbyte) NcTypedComponent_as(char) NcTypedComponent_as(short) + NcTypedComponent_as(int) NcTypedComponent_as(nclong) NcTypedComponent_as(long) NcTypedComponent_as(float) *************** *** 443,449 **** char* NcTypedComponent::as_string( long n ) const { ! return values()->as_string(n); } NcTypedComponent::NcTypedComponent ( NcFile* nc ) --- 450,459 ---- char* NcTypedComponent::as_string( long n ) const { ! NcValues *tmp = values(); ! char *rval = tmp->as_string(n); ! delete tmp; ! return rval; } NcTypedComponent::NcTypedComponent ( NcFile* nc ) *************** *** 462,469 **** case ncDouble: valp = new NcValues_double(numVals); break; ! case ncLong: ! valp = new NcValues_nclong(numVals); break; case ncShort: valp = new NcValues_short(numVals); --- 472,479 ---- case ncDouble: valp = new NcValues_double(numVals); break; ! case ncInt: ! valp = new NcValues_int(numVals); break; case ncShort: valp = new NcValues_short(numVals); *************** *** 648,654 **** NcVar_put_rec(ncbyte) NcVar_put_rec(char) NcVar_put_rec(short) ! NcVar_put_rec(nclong) NcVar_put_rec(float) NcVar_put_rec(double) --- 658,665 ---- NcVar_put_rec(ncbyte) NcVar_put_rec(char) NcVar_put_rec(short) ! NcVar_put_rec(int) ! NcVar_put_rec(long) NcVar_put_rec(float) NcVar_put_rec(double) *************** *** 689,694 **** --- 700,706 ---- NcVar_get_index(char) NcVar_get_index(short) NcVar_get_index(nclong) + NcVar_get_index(long) NcVar_get_index(float) NcVar_get_index(double) *************** *** 728,734 **** NcVar_put_array(ncbyte) NcVar_put_array(char) NcVar_put_array(short) ! NcVar_put_array(nclong) NcVar_put_array(float) NcVar_put_array(double) --- 740,747 ---- NcVar_put_array(ncbyte) NcVar_put_array(char) NcVar_put_array(short) ! NcVar_put_array(int) ! NcVar_put_array(long) NcVar_put_array(float) NcVar_put_array(double) *************** *** 748,754 **** NcVar_put_nd_array(ncbyte) NcVar_put_nd_array(char) NcVar_put_nd_array(short) ! NcVar_put_nd_array(nclong) NcVar_put_nd_array(float) NcVar_put_nd_array(double) --- 761,768 ---- NcVar_put_nd_array(ncbyte) NcVar_put_nd_array(char) NcVar_put_nd_array(short) ! NcVar_put_nd_array(int) ! NcVar_put_nd_array(long) NcVar_put_nd_array(float) NcVar_put_nd_array(double) *************** *** 787,793 **** NcVar_get_array(ncbyte) NcVar_get_array(char) NcVar_get_array(short) ! NcVar_get_array(nclong) NcVar_get_array(float) NcVar_get_array(double) --- 801,808 ---- NcVar_get_array(ncbyte) NcVar_get_array(char) NcVar_get_array(short) ! NcVar_get_array(int) ! NcVar_get_array(long) NcVar_get_array(float) NcVar_get_array(double) *************** *** 807,813 **** NcVar_get_nd_array(ncbyte) NcVar_get_nd_array(char) NcVar_get_nd_array(short) ! NcVar_get_nd_array(nclong) NcVar_get_nd_array(float) NcVar_get_nd_array(double) --- 822,829 ---- NcVar_get_nd_array(ncbyte) NcVar_get_nd_array(char) NcVar_get_nd_array(short) ! NcVar_get_nd_array(int) ! NcVar_get_nd_array(long) NcVar_get_nd_array(float) NcVar_get_nd_array(double) *************** *** 863,869 **** NcVar_add_scalar_att(char) NcVar_add_scalar_att(ncbyte) NcVar_add_scalar_att(short) ! NcVar_add_scalar_att(nclong) NcVar_add_scalar_att(double) NcBool NcVar::add_att(NcToken aname, float val) --- 879,886 ---- NcVar_add_scalar_att(char) NcVar_add_scalar_att(ncbyte) NcVar_add_scalar_att(short) ! NcVar_add_scalar_att(int) ! NcVar_add_scalar_att(long) NcVar_add_scalar_att(double) NcBool NcVar::add_att(NcToken aname, float val) *************** *** 900,906 **** NcVar_add_vector_att(char) NcVar_add_vector_att(ncbyte) NcVar_add_vector_att(short) ! NcVar_add_vector_att(nclong) NcVar_add_vector_att(float) NcVar_add_vector_att(double) --- 917,924 ---- NcVar_add_vector_att(char) NcVar_add_vector_att(ncbyte) NcVar_add_vector_att(short) ! NcVar_add_vector_att(int) ! NcVar_add_vector_att(long) NcVar_add_vector_att(float) NcVar_add_vector_att(double) Index: netcdf-3/cxx/netcdf.hh diff -c netcdf-3/cxx/netcdf.hh:1.1 netcdf-3/cxx/netcdf.hh:1.6 *** netcdf-3/cxx/netcdf.hh:1.1 Mon Apr 21 09:44:57 1997 --- netcdf-3/cxx/netcdf.hh Wed Nov 19 13:33:31 1997 *************** *** 4,10 **** * * Purpose: C++ class interface for netCDF * ! * $Header: /upc/share/CVS/netcdf-3/cxx/netcdf.hh,v 1.1 1997/04/21 15:44:57 russ Exp $ *********************************************************************/ #ifndef NETCDF_HH --- 4,10 ---- * * Purpose: C++ class interface for netCDF * ! * $Header: /upc/share/CVS/netcdf-3/cxx/netcdf.hh,v 1.6 1997/11/19 20:33:31 russ Exp $ *********************************************************************/ #ifndef NETCDF_HH *************** *** 75,88 **** NcBool add_att( NcToken attname, char ); // scalar attributes NcBool add_att( NcToken attname, ncbyte ); NcBool add_att( NcToken attname, short ); ! NcBool add_att( NcToken attname, nclong ); NcBool add_att( NcToken attname, float ); NcBool add_att( NcToken attname, double ); NcBool add_att( NcToken attname, const char*); // string attribute NcBool add_att( NcToken attname, int, const char* ); // vector attributes NcBool add_att( NcToken attname, int, const ncbyte* ); NcBool add_att( NcToken attname, int, const short* ); ! NcBool add_att( NcToken attname, int, const nclong* ); NcBool add_att( NcToken attname, int, const float* ); NcBool add_att( NcToken attname, int, const double* ); --- 75,90 ---- NcBool add_att( NcToken attname, char ); // scalar attributes NcBool add_att( NcToken attname, ncbyte ); NcBool add_att( NcToken attname, short ); ! NcBool add_att( NcToken attname, long ); ! NcBool add_att( NcToken attname, int ); NcBool add_att( NcToken attname, float ); NcBool add_att( NcToken attname, double ); NcBool add_att( NcToken attname, const char*); // string attribute NcBool add_att( NcToken attname, int, const char* ); // vector attributes NcBool add_att( NcToken attname, int, const ncbyte* ); NcBool add_att( NcToken attname, int, const short* ); ! NcBool add_att( NcToken attname, int, const long* ); ! NcBool add_att( NcToken attname, int, const int* ); NcBool add_att( NcToken attname, int, const float* ); NcBool add_att( NcToken attname, int, const double* ); *************** *** 181,187 **** virtual ncbyte as_ncbyte( long n ) const; // nth value as an unsgnd char virtual char as_char( long n ) const; // nth value as char virtual short as_short( long n ) const; // nth value as short ! virtual nclong as_nclong( long n ) const; // nth value as nclong virtual long as_long( long n ) const; // nth value as long virtual float as_float( long n ) const; // nth value as floating-point virtual double as_double( long n ) const; // nth value as double --- 183,190 ---- virtual ncbyte as_ncbyte( long n ) const; // nth value as an unsgnd char virtual char as_char( long n ) const; // nth value as char virtual short as_short( long n ) const; // nth value as short ! virtual int as_int( long n ) const; // nth value as int ! virtual int as_nclong( long n ) const; // nth value as nclong (deprecated) virtual long as_long( long n ) const; // nth value as long virtual float as_float( long n ) const; // nth value as floating-point virtual double as_double( long n ) const; // nth value as double *************** *** 227,234 **** long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ); NcBool put( const short* vals, long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ); ! NcBool put( const nclong* vals, long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ); NcBool put( const float* vals, long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ); NcBool put( const double* vals, --- 230,239 ---- long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ); NcBool put( const short* vals, long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ); ! NcBool put( const int* vals, long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ); + NcBool put( const long* vals, + long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ); NcBool put( const float* vals, long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ); NcBool put( const double* vals, *************** *** 239,245 **** NcBool put( const ncbyte* vals, const long* counts ); NcBool put( const char* vals, const long* counts ); NcBool put( const short* vals, const long* counts ); ! NcBool put( const nclong* vals, const long* counts ); NcBool put( const float* vals, const long* counts ); NcBool put( const double* vals, const long* counts ); --- 244,251 ---- NcBool put( const ncbyte* vals, const long* counts ); NcBool put( const char* vals, const long* counts ); NcBool put( const short* vals, const long* counts ); ! NcBool put( const int* vals, const long* counts ); ! NcBool put( const long* vals, const long* counts ); NcBool put( const float* vals, const long* counts ); NcBool put( const double* vals, const long* counts ); *************** *** 253,259 **** long c2=0, long c3=0, long c4=0 ) const; NcBool get( short* vals, long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ) const; ! NcBool get( nclong* vals, long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ) const; NcBool get( float* vals, long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ) const; --- 259,267 ---- long c2=0, long c3=0, long c4=0 ) const; NcBool get( short* vals, long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ) const; ! NcBool get( int* vals, long c0=0, long c1=0, ! long c2=0, long c3=0, long c4=0 ) const; ! NcBool get( long* vals, long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ) const; NcBool get( float* vals, long c0=0, long c1=0, long c2=0, long c3=0, long c4=0 ) const; *************** *** 265,271 **** NcBool get( ncbyte* vals, const long* counts ) const; NcBool get( char* vals, const long* counts ) const; NcBool get( short* vals, const long* counts ) const; ! NcBool get( nclong* vals, const long* counts ) const; NcBool get( float* vals, const long* counts ) const; NcBool get( double* vals, const long* counts ) const; --- 273,280 ---- NcBool get( ncbyte* vals, const long* counts ) const; NcBool get( char* vals, const long* counts ) const; NcBool get( short* vals, const long* counts ) const; ! NcBool get( int* vals, const long* counts ) const; ! NcBool get( long* vals, const long* counts ) const; NcBool get( float* vals, const long* counts ) const; NcBool get( double* vals, const long* counts ) const; *************** *** 277,290 **** NcBool add_att( NcToken, char ); // add scalar attributes NcBool add_att( NcToken, ncbyte ); NcBool add_att( NcToken, short ); ! NcBool add_att( NcToken, nclong ); NcBool add_att( NcToken, float ); NcBool add_att( NcToken, double ); NcBool add_att( NcToken, const char* ); // string attribute NcBool add_att( NcToken, int, const char* ); // vector attributes NcBool add_att( NcToken, int, const ncbyte* ); NcBool add_att( NcToken, int, const short* ); ! NcBool add_att( NcToken, int, const nclong* ); NcBool add_att( NcToken, int, const float* ); NcBool add_att( NcToken, int, const double* ); --- 286,301 ---- NcBool add_att( NcToken, char ); // add scalar attributes NcBool add_att( NcToken, ncbyte ); NcBool add_att( NcToken, short ); ! NcBool add_att( NcToken, int ); ! NcBool add_att( NcToken, long ); NcBool add_att( NcToken, float ); NcBool add_att( NcToken, double ); NcBool add_att( NcToken, const char* ); // string attribute NcBool add_att( NcToken, int, const char* ); // vector attributes NcBool add_att( NcToken, int, const ncbyte* ); NcBool add_att( NcToken, int, const short* ); ! NcBool add_att( NcToken, int, const int* ); ! NcBool add_att( NcToken, int, const long* ); NcBool add_att( NcToken, int, const float* ); NcBool add_att( NcToken, int, const double* ); *************** *** 303,309 **** NcBool put_rec( const ncbyte* vals ); NcBool put_rec( const char* vals ); NcBool put_rec( const short* vals ); ! NcBool put_rec( const nclong* vals ); NcBool put_rec( const float* vals ); NcBool put_rec( const double* vals ); --- 314,321 ---- NcBool put_rec( const ncbyte* vals ); NcBool put_rec( const char* vals ); NcBool put_rec( const short* vals ); ! NcBool put_rec( const int* vals ); ! NcBool put_rec( const long* vals ); NcBool put_rec( const float* vals ); NcBool put_rec( const double* vals ); *************** *** 311,317 **** NcBool put_rec( const ncbyte* vals, long rec ); NcBool put_rec( const char* vals, long rec ); NcBool put_rec( const short* vals, long rec ); ! NcBool put_rec( const nclong* vals, long rec ); NcBool put_rec( const float* vals, long rec ); NcBool put_rec( const double* vals, long rec ); --- 323,330 ---- NcBool put_rec( const ncbyte* vals, long rec ); NcBool put_rec( const char* vals, long rec ); NcBool put_rec( const short* vals, long rec ); ! NcBool put_rec( const int* vals, long rec ); ! NcBool put_rec( const long* vals, long rec ); NcBool put_rec( const float* vals, long rec ); NcBool put_rec( const double* vals, long rec ); *************** *** 319,325 **** long get_index( const ncbyte* vals ); long get_index( const char* vals ); long get_index( const short* vals ); ! long get_index( const nclong* vals ); long get_index( const float* vals ); long get_index( const double* vals ); --- 332,339 ---- long get_index( const ncbyte* vals ); long get_index( const char* vals ); long get_index( const short* vals ); ! long get_index( const int* vals ); ! long get_index( const long* vals ); long get_index( const float* vals ); long get_index( const double* vals );