bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
WWWOutputFactory.cc
1
2// -*- mode: c++; c-basic-offset:4 -*-
3
4// This file is part of www_int.
5
6// Copyright (c) 2005 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 is distributed in the hope that it will be useful, but WITHOUT ANY
15// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
17// more details.
18//
19// You should have received a copy of the GNU Lesser General Public
20// License along with this library; 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
26#include <string>
27
28#include "WWWByte.h"
29#include "WWWInt16.h"
30#include "WWWUInt16.h"
31#include "WWWInt32.h"
32#include "WWWUInt32.h"
33#include "WWWFloat32.h"
34#include "WWWFloat64.h"
35#include "WWWStr.h"
36#include "WWWUrl.h"
37#include "WWWArray.h"
38#include "WWWStructure.h"
39#include "WWWSequence.h"
40#include "WWWGrid.h"
41
42#include <libdap/BaseTypeFactory.h>
43#include "WWWOutputFactory.h"
44
45#include <libdap/debug.h>
46
47Byte *
48WWWOutputFactory::NewByte(const string &n ) const
49{
50 return new WWWByte(n);
51}
52
53Int16 *
54WWWOutputFactory::NewInt16(const string &n ) const
55{
56 return new WWWInt16(n);
57}
58
59UInt16 *
60WWWOutputFactory::NewUInt16(const string &n ) const
61{
62 return new WWWUInt16(n);
63}
64
65Int32 *
66WWWOutputFactory::NewInt32(const string &n ) const
67{
68 DBG(cerr << "Inside WWWOutputFactory::NewInt32" << endl);
69 return new WWWInt32(n);
70}
71
72UInt32 *
73WWWOutputFactory::NewUInt32(const string &n ) const
74{
75 return new WWWUInt32(n);
76}
77
78Float32 *
79WWWOutputFactory::NewFloat32(const string &n ) const
80{
81 return new WWWFloat32(n);
82}
83
84Float64 *
85WWWOutputFactory::NewFloat64(const string &n ) const
86{
87 return new WWWFloat64(n);
88}
89
90Str *
91WWWOutputFactory::NewStr(const string &n ) const
92{
93 return new WWWStr(n);
94}
95
96Url *
97WWWOutputFactory::NewUrl(const string &n ) const
98{
99 return new WWWUrl(n);
100}
101
102Array *
103WWWOutputFactory::NewArray(const string &n , BaseType *v) const
104{
105 return new WWWArray(n, v);
106}
107
108Structure *
109WWWOutputFactory::NewStructure(const string &n ) const
110{
111 return new WWWStructure(n);
112}
113
114Sequence *
115WWWOutputFactory::NewSequence(const string &n ) const
116{
117 DBG(cerr << "Inside WWWOutputFactory::NewSequence" << endl);
118 return new WWWSequence(n);
119}
120
121Grid *
122WWWOutputFactory::NewGrid(const string &n ) const
123{
124 return new WWWGrid(n);
125}