VTK  9.4.20241222
vtkNetCDFAccessor.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef vtkNetCDFAccessor_h
5#define vtkNetCDFAccessor_h
6
7#include "vtkIONetCDFModule.h" // For export macro
8#include "vtkObject.h"
9#include <stddef.h> // for ptrdiff_t
10
11VTK_ABI_NAMESPACE_BEGIN
12class vtkDataArray;
13class vtkDoubleArray;
14
15class VTKIONETCDF_EXPORT vtkNetCDFAccessor : public vtkObject
16{
17public:
20
21 virtual int close(int ncid);
22 virtual int open(const char* path, int omode, int* ncidp);
23 virtual const char* strerror(int ncerr1);
24
25 virtual int inq_attlen(int ncid, int varid, const char* name, size_t* lenp);
26
27 virtual int inq_dimlen(int ncid, int dimid, size_t* lenp);
28 virtual int inq_dimname(int ncid, int dimid, char* name);
29
30 virtual int inq_nvars(int ncid, int* nvarsp);
31 virtual int inq_ndims(int ncid, int* ndimsp);
32
33 virtual int inq_vardimid(int ncid, int varid, int* dimidsp);
34 virtual int inq_varid(int ncid, const char* name, int* varidp);
35 virtual int inq_varname(int ncid, int varid, char* name);
36 virtual int inq_varndims(int ncid, int varid, int* ndimsp);
37 virtual int inq_vartype(int ncid, int varid, int* typep);
38
39 virtual int get_att_text(int ncid, int varid, const char* name, char* value);
40 virtual int get_att_double(int ncid, int varid, const char* name, double* value);
41 virtual int get_att_float(int ncid, int varid, const char* name, float* value);
42
43 virtual int get_vars(int ncid, int varid, const size_t* startp, const size_t* countp,
44 const ptrdiff_t* stridep, int vtkType, vtkIdType numberOfComponents, vtkIdType numberOfTuples,
45 vtkDataArray* dataArray);
46 virtual int get_vars(int ncid, int varid, const size_t* startp, const size_t* countp,
47 const ptrdiff_t* stridep, void* ip);
48
49 virtual int get_vars_double(int ncid, int varid, const size_t* startp, const size_t* countp,
50 const ptrdiff_t* stridep, double* ip);
51 virtual int get_var_double(int ncid, int varid, double* ip);
52
53 virtual bool GetCoordinates(int ncFD, int varId, std::vector<std::string>& coordName);
54 virtual bool NeedsFileName();
55
56 bool ReadTextAttribute(int ncFD, int varId, const char* name, std::string& result);
57
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
60protected:
61 vtkNetCDFAccessor() = default;
62 ~vtkNetCDFAccessor() override = default;
63
64private:
65 vtkNetCDFAccessor(const vtkNetCDFAccessor&) = delete;
66 void operator=(const vtkNetCDFAccessor&) = delete;
67};
68
69VTK_ABI_NAMESPACE_END
70#endif
abstract superclass for arrays of numeric data
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:108
virtual int get_vars_double(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, double *ip)
virtual int open(const char *path, int omode, int *ncidp)
virtual int close(int ncid)
virtual bool GetCoordinates(int ncFD, int varId, std::vector< std::string > &coordName)
virtual int inq_vardimid(int ncid, int varid, int *dimidsp)
~vtkNetCDFAccessor() override=default
virtual int get_att_text(int ncid, int varid, const char *name, char *value)
virtual int inq_varid(int ncid, const char *name, int *varidp)
static vtkNetCDFAccessor * New()
virtual int get_att_float(int ncid, int varid, const char *name, float *value)
virtual int inq_dimlen(int ncid, int dimid, size_t *lenp)
virtual int inq_varndims(int ncid, int varid, int *ndimsp)
virtual int inq_varname(int ncid, int varid, char *name)
virtual int inq_ndims(int ncid, int *ndimsp)
virtual int get_vars(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, void *ip)
virtual int get_vars(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, int vtkType, vtkIdType numberOfComponents, vtkIdType numberOfTuples, vtkDataArray *dataArray)
virtual int inq_attlen(int ncid, int varid, const char *name, size_t *lenp)
virtual int inq_vartype(int ncid, int varid, int *typep)
virtual int inq_nvars(int ncid, int *nvarsp)
virtual int get_var_double(int ncid, int varid, double *ip)
virtual int get_att_double(int ncid, int varid, const char *name, double *value)
virtual const char * strerror(int ncerr1)
bool ReadTextAttribute(int ncFD, int varId, const char *name, std::string &result)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual bool NeedsFileName()
virtual int inq_dimname(int ncid, int dimid, char *name)
vtkNetCDFAccessor()=default
abstract base class for most VTK objects
Definition vtkObject.h:162
int vtkIdType
Definition vtkType.h:315