bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
FONcDim.h
1// FONcDim.h
2
3// This file is part of BES Netcdf File Out Module
4
5// Copyright (c) 2004,2005 University Corporation for Atmospheric Research
6// Author: Patrick West <pwest@ucar.edu> and Jose Garcia <jgarcia@ucar.edu>
7//
8// This library is free software; you can redistribute it and/or
9// modify it under the terms of the GNU Lesser General Public
10// License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12//
13// This library is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16// Lesser General Public License for more details.
17//
18// You should have received a copy of the GNU Lesser General Public
19// License along with this library; if not, write to the Free Software
20// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21//
22// You can contact University Corporation for Atmospheric Research at
23// 3080 Center Green Drive, Boulder, CO 80301
24
25// (c) COPYRIGHT University Corporation for Atmospheric Research 2004-2005
26// Please read the full copyright statement in the file COPYRIGHT_UCAR.
27//
28// Authors:
29// pwest Patrick West <pwest@ucar.edu>
30// jgarcia Jose Garcia <jgarcia@ucar.edu>
31
32#ifndef FONcDim_h_
33#define FONcDim_h_ 1
34
35#include <BESObj.h>
36
44class FONcDim : public BESObj
45{
46private:
47 std::string _name ;
48 int64_t _size ;
49 int _dimid = 0;
50 bool _defined = false;
51 int _ref = 1;
52 int _struct_ref =1;
53public:
54 FONcDim( const std::string &name, int64_t size ) ;
55 virtual ~FONcDim() {}
56 virtual void incref() { _ref++ ; }
57 virtual void decref() ;
58 virtual void struct_incref() { _struct_ref++ ; }
59 virtual void struct_decref() ;
60
61 virtual void define( int ncid ) ;
62 virtual void define_struct( int ncid ) ;
63
64 virtual std::string name() { return _name ; }
65 virtual int64_t size() { return _size ; }
66 virtual void update_size( int64_t newsize ) { _size = newsize ; }
67 virtual int dimid() { return _dimid ; }
68 virtual bool defined() { return _defined ; }
69
70 virtual void dump( std::ostream &strm ) const ;
71
72 static int DimNameNum ;
73 static int StructDimNameNum;
74} ;
75
76#endif // FONcDim_h_
77
top level BES object to house generic methods
Definition BESObj.h:54
virtual void dump(std::ostream &strm) const
dumps information about this object for debugging purposes
Definition FONcDim.cc:137
FONcDim(const std::string &name, int64_t size)
Constructor for FOncDim that defines the dimension of an array.
Definition FONcDim.cc:50
virtual void define(int ncid)
define the DAP dimension in the netcdf file
Definition FONcDim.cc:85
virtual void decref()
Decrement the reference count for this dimension.
Definition FONcDim.cc:62