55 #include "Structure.h"
56 #include "D4Sequence.h"
60 #include "D4BaseTypeFactory.h"
73 return NewUInt8(name);
78 return NewInt16(name);
80 return NewUInt16(name);
82 return NewInt32(name);
84 return NewUInt32(name);
87 return NewInt64(name);
89 return NewUInt64(name);
92 return NewFloat32(name);
94 return NewFloat64(name);
105 return NewOpaque(name);
107 case dods_structure_c:
108 return NewStructure(name);
110 case dods_sequence_c:
111 return NewD4Sequence(name);
114 return NewArray(name);
117 return NewGroup(name);
120 throw InternalErr(__FILE__, __LINE__,
"Unimplemented type in DAP4");
125 D4BaseTypeFactory::NewByte(
const string &n)
const
128 b->set_is_dap4(
true);
135 D4BaseTypeFactory::NewChar(
const string &n)
const
137 Byte *b =
new Byte(n);
138 b->set_type(dods_char_c);
139 b->set_is_dap4(
true);
144 D4BaseTypeFactory::NewUInt8(
const string &n)
const
146 Byte *b =
new Byte(n);
147 b->set_type(dods_uint8_c);
148 b->set_is_dap4(
true);
153 D4BaseTypeFactory::NewInt8(
const string &n)
const
155 Int8 *b =
new Int8(n);
156 b->set_is_dap4(
true);
161 D4BaseTypeFactory::NewInt16(
const string &n)
const
163 Int16 *b =
new Int16(n);
164 b->set_is_dap4(
true);
169 D4BaseTypeFactory::NewUInt16(
const string &n)
const
171 UInt16 *b =
new UInt16(n);
172 b->set_is_dap4(
true);
177 D4BaseTypeFactory::NewInt32(
const string &n)
const
179 DBG(cerr <<
"Inside DAP4BaseTypeFactory::NewInt32" << endl);
180 Int32 *b =
new Int32(n);
181 b->set_is_dap4(
true);
186 D4BaseTypeFactory::NewUInt32(
const string &n)
const
188 UInt32 *b =
new UInt32(n);
189 b->set_is_dap4(
true);
194 D4BaseTypeFactory::NewInt64(
const string &n)
const
196 DBG(cerr <<
"Inside DAP4BaseTypeFactory::NewInt64" << endl);
197 Int64 *b =
new Int64(n);
198 b->set_is_dap4(
true);
203 D4BaseTypeFactory::NewUInt64(
const string &n)
const
205 UInt64 *b =
new UInt64(n);
206 b->set_is_dap4(
true);
211 D4BaseTypeFactory::NewFloat32(
const string &n)
const
213 Float32 *b =
new Float32(n);
214 b->set_is_dap4(
true);
219 D4BaseTypeFactory::NewFloat64(
const string &n)
const
221 Float64 *b =
new Float64(n);
222 b->set_is_dap4(
true);
236 return new D4Enum(name, type);
241 D4BaseTypeFactory::NewStr(
const string &n)
const
244 b->set_is_dap4(
true);
249 D4BaseTypeFactory::NewUrl(
const string &n)
const
252 b->set_is_dap4(
true);
257 D4BaseTypeFactory::NewOpaque(
const string &n)
const
259 return new D4Opaque(n);
268 b->set_is_dap4(
true);
273 D4BaseTypeFactory::NewArray(
const string &n,
BaseType *v)
const
275 return new Array(n, v,
true );
279 D4BaseTypeFactory::NewStructure(
const string &n)
const
281 Structure *b =
new Structure(n);
282 b->set_is_dap4(
true);
287 D4BaseTypeFactory::NewD4Sequence(
const string &n)
const
289 return new D4Sequence(n);
293 D4BaseTypeFactory::NewGroup(
const string &n)
const
295 return new D4Group(n);
A multidimensional array of identical data types.
The basic data type for the DODS DAP types.
virtual D4Enum * NewEnum(const string &n="", Type type=dods_null_c) const
virtual BaseType * NewVariable(Type t, const string &name) const
virtual Url * NewURL(const string &n="") const
Holds a DAP4 enumeration.
A class for software fault reporting.
Holds character string data.
Holds an Internet address (URL).
top level DAP object to house generic methods
Type
Identifies the data type.