bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
NCStructure.h
1
2// -*- mode: c++; c-basic-offset:4 -*-
3
4// This file is part of nc_handler, a data handler for the OPeNDAP data
5// server.
6
7// Copyright (c) 2002,2003 OPeNDAP, Inc.
8// Author: James Gallagher <jgallagher@opendap.org>
9//
10// This is free software; you can redistribute it and/or modify it under the
11// terms of the GNU Lesser General Public License as published by the Free
12// Software Foundation; either version 2.1 of the License, or (at your
13// option) any later version.
14//
15// This software is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18// License for more details.
19//
20// You should have received a copy of the GNU Lesser General Public
21// License along with this library; if not, write to the Free Software
22// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23//
24// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
25
26
27// (c) COPYRIGHT URI/MIT 1994-1996
28// Please read the full copyright statement in the file COPYRIGHT.
29//
30// Authors:
31// reza Reza Nekovei (reza@intcomm.net)
32
33// netCDF sub-class implementation for NCByte,...NCGrid.
34// The files are patterned after the subcalssing examples
35// Test<type>.c,h files.
36//
37// ReZa 1/12/95
38
39#ifndef _ncstructure_h
40#define _ncstructure_h 1
41
42
43#include <vector>
44
45#include <libdap/Structure.h>
46
47using namespace libdap ;
48
49class NCArray;
50
51class NCStructure: public Structure {
52private:
53 void do_structure_read(int ncid, int varid, nc_type datatype, vector<char> &values, bool has_values, int values_offset);
54 // NCArray calls the above
55 friend class NCArray;
56
57public:
58 NCStructure(const string &n, const string &d);
59 NCStructure(const NCStructure &rhs);
60 virtual ~NCStructure();
61
62 NCStructure &operator=(const NCStructure &rhs);
63 virtual BaseType *ptr_duplicate();
64
65 virtual void transform_to_dap4(D4Group *root, Constructor *container);
66
67 virtual void transfer_attributes(AttrTable *at);
68 virtual bool read();
69};
70
71/*
72 * $Log: NCStructure.h,v $
73 * Revision 1.13 2005/04/19 23:16:18 jimg
74 * Removed client side parts; the client library is now in libnc-dap.
75 *
76 * Revision 1.12 2005/04/11 18:38:20 jimg
77 * Fixed a problem with NCSequence where nested sequences were not flagged
78 * but instead were translated. The extract_values software cannot process a
79 * nested sequence yet. Now the code inserts an attribute that notes that a
80 * nested sequence has been elided.
81 *
82 * Revision 1.11 2005/04/08 17:08:47 jimg
83 * Removed old 'virtual ctor' functions which have now been replaced by the
84 * factory class code in libdap++.
85 *
86 * Revision 1.10 2005/03/31 00:04:51 jimg
87 * Modified to use the factory class in libdap++ 3.5.
88 *
89 * Revision 1.9 2005/01/26 23:25:51 jimg
90 * Implemented a fix for Sequence access by row number when talking to a
91 * 3.4 or earlier server (which contains a bug in is_end_of_rows()).
92 *
93 * Revision 1.8 2004/11/30 22:11:35 jimg
94 * I replaced the flatten_*() functions with a flatten() method in
95 * NCAccess. The default version of this method is in NCAccess and works
96 * for the atomic types; constructors must provide a specialization.
97 * Then I removed the code that copied the variables from vectors to
98 * lists. The translation code in NCConnect was modified to use the
99 * new method.
100 *
101 * Revision 1.7 2004/11/05 17:13:57 jimg
102 * Added code to copy the BaseType pointers from the vector container into
103 * a list. This will enable more efficient translation software to be
104 * written.
105 *
106 * Revision 1.6 2004/09/08 22:08:22 jimg
107 * More Massive changes: Code moved from the files that clone the netCDF
108 * function calls into NCConnect, NCAccess or nc_util.cc. Much of the
109 * translation functions are now methods. The netCDF type classes now
110 * inherit from NCAccess in addition to the DAP type classes.
111 *
112 * Revision 1.5 2003/12/08 18:06:37 edavis
113 * Merge release-3-4 into trunk
114 *
115 * Revision 1.4 2003/09/25 23:09:36 jimg
116 * Meerged from 3.4.1.
117 *
118 * Revision 1.3.4.1 2003/06/24 11:36:32 rmorris
119 * Removed #pragma interface directives for the OS X.
120 *
121 * Revision 1.3 2002/05/03 00:01:52 jimg
122 * Merged with release-3-2-7.
123 *
124 * Revision 1.2.4.1 2001/12/26 03:35:38 rmorris
125 * Removed redundant default arg's. VC++ doesn't allow default args to
126 * be specified twice.
127 *
128 * Revision 1.2 2000/10/06 01:22:02 jimg
129 * Moved the CVS Log entries to the ends of files.
130 * Modified the read() methods to match the new definition in the dap library.
131 * Added exception handlers in various places to catch exceptions thrown
132 * by the dap library.
133 *
134 * Revision 1.1 1999/07/28 00:22:44 jimg
135 * Added
136 *
137 * Revision 1.4 1999/05/07 23:45:32 jimg
138 * String --> string fixes
139 *
140 * Revision 1.3 1996/09/17 17:06:44 jimg
141 * Merge the release-2-0 tagged files (which were off on a branch) back into
142 * the trunk revision.
143 *
144 * Revision 1.2.4.2 1996/07/10 21:44:27 jimg
145 * Changes for version 2.06. These fixed lingering problems from the migration
146 * from version 1.x to version 2.x.
147 * Removed some (but not all) warning generated with gcc's -Wall option.
148 *
149 * Revision 1.2.4.1 1996/06/25 22:04:47 jimg
150 * Version 2.0 from Reza.
151 *
152 * Revision 1.2 1995/03/16 16:56:46 reza
153 * Updated for the new DAP. All the read_val mfunc. and their memory management
154 * are now moved to their parent class.
155 * Data transfers are now in binary while DAS and DDS are still sent in ASCII.
156 *
157 * Revision 1.1 1995/02/10 04:57:55 reza
158 * Added read and read_val functions.
159 */
160
161#endif
virtual void transfer_attributes(AttrTable *at)
virtual void transform_to_dap4(D4Group *root, Constructor *container)
STL class.