bes  Updated for version 3.20.6
AsciiOutputFactory.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) 2005 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 "AsciiByte.h"
30 #include "AsciiInt16.h"
31 #include "AsciiUInt16.h"
32 #include "AsciiInt32.h"
33 #include "AsciiUInt32.h"
34 #include "AsciiFloat32.h"
35 #include "AsciiFloat64.h"
36 #include "AsciiStr.h"
37 #include "AsciiUrl.h"
38 #include "AsciiArray.h"
39 #include "AsciiStructure.h"
40 #include "AsciiSequence.h"
41 #include "AsciiGrid.h"
42 
43 #include "BaseTypeFactory.h"
44 #include "AsciiOutputFactory.h"
45 
46 #include "debug.h"
47 
48 Byte *
49 AsciiOutputFactory::NewByte(const string &n ) const
50 {
51  return new AsciiByte(n);
52 }
53 
54 Int16 *
55 AsciiOutputFactory::NewInt16(const string &n ) const
56 {
57  return new AsciiInt16(n);
58 }
59 
60 UInt16 *
61 AsciiOutputFactory::NewUInt16(const string &n ) const
62 {
63  return new AsciiUInt16(n);
64 }
65 
66 Int32 *
67 AsciiOutputFactory::NewInt32(const string &n ) const
68 {
69  DBG(cerr << "Inside AsciiOutputFactory::NewInt32" << endl);
70  return new AsciiInt32(n);
71 }
72 
73 UInt32 *
74 AsciiOutputFactory::NewUInt32(const string &n ) const
75 {
76  return new AsciiUInt32(n);
77 }
78 
79 Float32 *
80 AsciiOutputFactory::NewFloat32(const string &n ) const
81 {
82  return new AsciiFloat32(n);
83 }
84 
85 Float64 *
86 AsciiOutputFactory::NewFloat64(const string &n ) const
87 {
88  return new AsciiFloat64(n);
89 }
90 
91 Str *
92 AsciiOutputFactory::NewStr(const string &n ) const
93 {
94  return new AsciiStr(n);
95 }
96 
97 Url *
98 AsciiOutputFactory::NewUrl(const string &n ) const
99 {
100  return new AsciiUrl(n);
101 }
102 
103 Array *
104 AsciiOutputFactory::NewArray(const string &n , BaseType *v) const
105 {
106  return new AsciiArray(n, v);
107 }
108 
109 Structure *
110 AsciiOutputFactory::NewStructure(const string &n ) const
111 {
112  return new AsciiStructure(n);
113 }
114 
115 Sequence *
116 AsciiOutputFactory::NewSequence(const string &n ) const
117 {
118  DBG(cerr << "Inside AsciiOutputFactory::NewSequence" << endl);
119  return new AsciiSequence(n);
120 }
121 
122 Grid *
123 AsciiOutputFactory::NewGrid(const string &n ) const
124 {
125  return new AsciiGrid(n);
126 }
AsciiInt32
Definition: AsciiInt32.h:42
AsciiStructure
Definition: AsciiStructure.h:42
AsciiUrl
Definition: AsciiUrl.h:42
AsciiFloat32
Definition: AsciiFloat32.h:42
AsciiArray
Definition: AsciiArray.h:44
AsciiUInt16
Definition: AsciiUInt16.h:42
AsciiSequence
Definition: AsciiSequence.h:43
AsciiGrid
Definition: AsciiGrid.h:42
AsciiStr
Definition: AsciiStr.h:42
AsciiInt16
Definition: AsciiInt16.h:42
AsciiUInt32
Definition: AsciiUInt32.h:42
AsciiFloat64
Definition: AsciiFloat64.h:42
AsciiByte
Definition: AsciiByte.h:44