bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
HDFTypeFactory.h
1// -*- mode: c++; c-basic-offset:4 -*-
2
3// This file is part of nc_handler, a data handler for the OPeNDAP data
4// server.
5
6// Copyright (c) 2002,2003 OPeNDAP, Inc.
7// Author: James Gallagher <jgallagher@opendap.org>
8//
9// This is free software; you can redistribute it and/or modify it under the
10// terms of the GNU Lesser General Public License as published by the Free
11// Software Foundation; either version 2.1 of the License, or (at your
12// option) any later version.
13//
14// This software is distributed in the hope that it will be useful, but
15// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17// License for more details.
18//
19// You should have received a copy of the GNU Lesser General Public
20// License along with this software; if not, write to the Free Software
21// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22//
23// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
24
25#ifndef nc_type_factory_h
26#define nc_type_factory_h
27
28#include <string>
29#include <libdap/BaseTypeFactory.h>
30
31using std::string ;
32
33// Class declarations; Make sure to include the corresponding headers in the
34// implementation file.
35
36class HDFByte;
37class HDFInt16;
38class HDFUInt16;
39class HDFInt32;
40class HDFUInt32;
41class HDFFloat32;
42class HDFFloat64;
43class HDFStr;
44class HDFUrl;
45class HDFArray;
46class HDFStructure;
47class HDFSequence;
48class HDFGrid;
49
54class HDFTypeFactory:public libdap::BaseTypeFactory {
55private:
56 string d_filename ;
57 HDFTypeFactory() = default;
58public:
59 explicit HDFTypeFactory( const string &filename ) : d_filename( filename ) {}
60 ~HDFTypeFactory() override = default;
61
62 libdap::Byte *NewByte(const string & n = "") const override;
63 libdap::Int16 *NewInt16(const string & n = "") const override;
64 libdap::UInt16 *NewUInt16(const string & n = "") const override;
65 libdap::Int32 *NewInt32(const string & n = "") const override;
66 libdap::UInt32 *NewUInt32(const string & n = "") const override;
67 libdap::Float32 *NewFloat32(const string & n = "") const override;
68 libdap::Float64 *NewFloat64(const string & n = "") const override;
69
70 libdap::Str *NewStr(const string & n = "") const override;
71 libdap::Url *NewUrl(const string & n = "") const override;
72
73 libdap::Array *NewArray(const string & n = "", libdap::BaseType * v = nullptr) const override;
74 libdap::Structure *NewStructure(const string & n = "") const override;
75 libdap::Sequence *NewSequence(const string & n = "") const override;
76 libdap::Grid *NewGrid(const string & n = "") const override;
77};
78
79#endif
80