libdap++
Updated for version 3.11.7
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
BaseTypeFactory.cc
Go to the documentation of this file.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
//
24
// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
25
26
27
#include <string>
28
29
#include "
Byte.h
"
30
#include "
Int16.h
"
31
#include "
UInt16.h
"
32
#include "
Int32.h
"
33
#include "
UInt32.h
"
34
#include "
Float32.h
"
35
#include "
Float64.h
"
36
#include "
Str.h
"
37
#include "
Url.h
"
38
#include "
Array.h
"
39
#include "
Structure.h
"
40
#include "
Sequence.h
"
41
#include "
Grid.h
"
42
43
#include "
BaseTypeFactory.h
"
44
#include "
debug.h
"
45
46
namespace
libdap {
47
48
Byte *
49
BaseTypeFactory::NewByte
(
const
string
&n)
const
50
{
51
return
new
Byte
(n);
52
}
53
54
Int16
*
55
BaseTypeFactory::NewInt16
(
const
string
&n)
const
56
{
57
return
new
Int16
(n);
58
}
59
60
UInt16
*
61
BaseTypeFactory::NewUInt16
(
const
string
&n)
const
62
{
63
return
new
UInt16
(n);
64
}
65
66
Int32
*
67
BaseTypeFactory::NewInt32
(
const
string
&n)
const
68
{
69
DBG
(cerr <<
"Inside BaseTypeFactory::NewInt32"
<< endl);
70
return
new
Int32
(n);
71
}
72
73
UInt32
*
74
BaseTypeFactory::NewUInt32
(
const
string
&n)
const
75
{
76
return
new
UInt32
(n);
77
}
78
79
Float32
*
80
BaseTypeFactory::NewFloat32
(
const
string
&n)
const
81
{
82
return
new
Float32
(n);
83
}
84
85
Float64
*
86
BaseTypeFactory::NewFloat64
(
const
string
&n)
const
87
{
88
return
new
Float64
(n);
89
}
90
91
Str
*
92
BaseTypeFactory::NewStr
(
const
string
&n)
const
93
{
94
return
new
Str
(n);
95
}
96
97
Url
*
98
BaseTypeFactory::NewUrl
(
const
string
&n)
const
99
{
100
return
new
Url
(n);
101
}
102
103
Array
*
104
BaseTypeFactory::NewArray
(
const
string
&n ,
BaseType
*v)
const
105
{
106
return
new
Array
(n, v);
107
}
108
109
Structure
*
110
BaseTypeFactory::NewStructure
(
const
string
&n)
const
111
{
112
return
new
Structure
(n);
113
}
114
115
Sequence
*
116
BaseTypeFactory::NewSequence
(
const
string
&n)
const
117
{
118
DBG
(cerr <<
"Inside BaseTypeFactory::NewSequence"
<< endl);
119
return
new
Sequence
(n);
120
}
121
122
Grid
*
123
BaseTypeFactory::NewGrid
(
const
string
&n)
const
124
{
125
return
new
Grid
(n);
126
}
127
128
}
// namespace libdap
BaseTypeFactory.cc
Generated by
1.8.4