bes Updated for version 3.20.13
HDFTypeFactory.cc
1
2// -*- mode: c++; c-basic-offset:4 -*-
3
4// This file is part of HDF_handler, a data handler for the OPeNDAP data
5// server.
6
7// Copyright (c) 2002,2003 OPeNDAP, IHDF.
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 software; if not, write to the Free Software
22// Foundation, IHDF., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23//
24// You can contact OPeNDAP, IHDF. at PO Box 112, Saunderstown, RI. 02874-0112.
25
26#include <string>
27
28#include "HDFByte.h"
29#include "HDFInt16.h"
30#include "HDFUInt16.h"
31#include "HDFInt32.h"
32#include "HDFUInt32.h"
33#include "HDFFloat32.h"
34#include "HDFFloat64.h"
35#include "HDFStr.h"
36#include "HDFUrl.h"
37#include "HDFArray.h"
38#include "HDFStructure.h"
39#include "HDFSequence.h"
40#include "HDFGrid.h"
41#include "HDFTypeFactory.h"
42#include <libdap/debug.h>
43#include <BESDebug.h>
44
45Byte *HDFTypeFactory::NewByte(const string & n) const
46{
47 return new HDFByte(n, d_filename);
48}
49
50Int16 *HDFTypeFactory::NewInt16(const string & n) const
51{
52 return new HDFInt16(n, d_filename);
53}
54
55UInt16 *HDFTypeFactory::NewUInt16(const string & n) const
56{
57 return new HDFUInt16(n, d_filename);
58}
59
60Int32 *HDFTypeFactory::NewInt32(const string & n) const
61{
62 BESDEBUG("h4", "Inside HDFTypeFactory::NewInt32" << endl);
63 return new HDFInt32(n, d_filename);
64}
65
66UInt32 *HDFTypeFactory::NewUInt32(const string & n) const
67{
68 return new HDFUInt32(n, d_filename);
69}
70
71Float32 *HDFTypeFactory::NewFloat32(const string & n) const
72{
73 return new HDFFloat32(n, d_filename);
74}
75
76Float64 *HDFTypeFactory::NewFloat64(const string & n) const
77{
78 return new HDFFloat64(n, d_filename);
79}
80
81Str *HDFTypeFactory::NewStr(const string & n) const
82{
83 return new HDFStr(n, d_filename);
84}
85
86Url *HDFTypeFactory::NewUrl(const string & n) const
87{
88 return new HDFUrl(n, d_filename);
89}
90
91Array *HDFTypeFactory::NewArray(const string & n, BaseType * v) const
92{
93 return new HDFArray(n, d_filename, v);
94}
95
96Structure *HDFTypeFactory::NewStructure(const string & n) const
97{
98 return new HDFStructure(n, d_filename);
99}
100
101Sequence *HDFTypeFactory::NewSequence(const string & n) const
102{
103 BESDEBUG("h4", "Inside HDFTypeFactory::NewSequence" << endl);
104 return new HDFSequence(n, d_filename);
105}
106
107Grid *HDFTypeFactory::NewGrid(const string & n) const
108{
109 return new HDFGrid(n, d_filename);
110}
Definition: HDFStr.h:51
Definition: HDFUrl.h:50