File: ncCheck.h

package info (click to toggle)
netcdf-cxx 4.3.0%2Bds-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,028 kB
  • sloc: sh: 11,553; cpp: 8,167; xml: 173; ansic: 134; makefile: 109
file content (36 lines) | stat: -rw-r--r-- 1,048 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#ifndef NcCheckFunction
#define NcCheckFunction

namespace netCDF
{
  /*! 
    Function checks error code and if necessary throws an exception.
    \param retCode Integer value returned by %netCDF C-routines.
    \param file    The name of the file from which this call originates.
    \param line    The line number in the file from which this call originates.
  */
  void ncCheck(int retCode, const char* file, int line);

  /*! 
    Function checks if the file (group) is in define mode.
    If not, it places it in the define mode.
    While this is automatically done by the underlying C API
    for netCDF-4 files, the netCDF-3 files still need this call.
  */
  void ncCheckDefineMode(int ncid);

  /*! 
    Function checks if the file (group) is in data mode.
    If not, it places it in the data mode.
    While this is automatically done by the underlying C API
    for netCDF-4 files, the netCDF-3 files still need this call.
  */
  void ncCheckDataMode(int ncid);

};

#endif