bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
XDOutputFactory.cc
1
2// -*- mode: c++; c-basic-offset:4 -*-
3
4// This file is part of libdap, A C++ implementation of the OPeNDAP Data
5// Access Protocol.
6
7// Copyright (c) 2010 OPeNDAP, Inc.
8// Author: James Gallagher <jgallagher@opendap.org>
9//
10// This library is free software; you can redistribute it and/or
11// modify it under the terms of the GNU Lesser General Public
12// License as published by the Free Software Foundation; either
13// version 2.1 of the License, or (at your option) any later version.
14//
15// This library is distributed in the hope that it will be useful,
16// but WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18// Lesser General Public 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#include <string>
28
29#include "XDByte.h"
30#include "XDInt16.h"
31#include "XDUInt16.h"
32#include "XDInt32.h"
33#include "XDUInt32.h"
34#include "XDFloat32.h"
35#include "XDFloat64.h"
36#include "XDStr.h"
37#include "XDUrl.h"
38#include "XDArray.h"
39#include "XDStructure.h"
40#include "XDSequence.h"
41#include "XDGrid.h"
42
43#include <libdap/BaseTypeFactory.h>
44#include "XDOutputFactory.h"
45
46#include <libdap/debug.h>
47
48Byte *
49XDOutputFactory::NewByte(const string &n ) const
50{
51 return new XDByte(n);
52}
53
54Int16 *
55XDOutputFactory::NewInt16(const string &n ) const
56{
57 return new XDInt16(n);
58}
59
60UInt16 *
61XDOutputFactory::NewUInt16(const string &n ) const
62{
63 return new XDUInt16(n);
64}
65
66Int32 *
67XDOutputFactory::NewInt32(const string &n ) const
68{
69 DBG(cerr << "Inside XDOutputFactory::NewInt32" << endl);
70 return new XDInt32(n);
71}
72
73UInt32 *
74XDOutputFactory::NewUInt32(const string &n ) const
75{
76 return new XDUInt32(n);
77}
78
79Float32 *
80XDOutputFactory::NewFloat32(const string &n ) const
81{
82 return new XDFloat32(n);
83}
84
85Float64 *
86XDOutputFactory::NewFloat64(const string &n ) const
87{
88 return new XDFloat64(n);
89}
90
91Str *
92XDOutputFactory::NewStr(const string &n ) const
93{
94 return new XDStr(n);
95}
96
97Url *
98XDOutputFactory::NewUrl(const string &n ) const
99{
100 return new XDUrl(n);
101}
102
103Array *
104XDOutputFactory::NewArray(const string &n , BaseType *v) const
105{
106 return new XDArray(n, v);
107}
108
109Structure *
110XDOutputFactory::NewStructure(const string &n ) const
111{
112 return new XDStructure(n);
113}
114
115Sequence *
116XDOutputFactory::NewSequence(const string &n ) const
117{
118 DBG(cerr << "Inside XDOutputFactory::NewSequence" << endl);
119 return new XDSequence(n);
120}
121
122Grid *
123XDOutputFactory::NewGrid(const string &n ) const
124{
125 return new XDGrid(n);
126}