55#include "D4Sequence.h"
60#include "D4BaseTypeFactory.h"
72 return NewUInt8(name);
77 return NewInt16(name);
79 return NewUInt16(name);
81 return NewInt32(name);
83 return NewUInt32(name);
86 return NewInt64(name);
88 return NewUInt64(name);
91 return NewFloat32(name);
93 return NewFloat64(name);
104 return NewOpaque(name);
106 case dods_structure_c:
107 return NewStructure(name);
109 case dods_sequence_c:
110 return NewD4Sequence(name);
113 return NewArray(name);
116 return NewGroup(name);
119 throw InternalErr(__FILE__, __LINE__,
"Unimplemented type in DAP4");
123Byte *D4BaseTypeFactory::NewByte(
const string &n)
const {
125 b->set_is_dap4(
true);
131Byte *D4BaseTypeFactory::NewChar(
const string &n)
const {
132 Byte *b =
new Byte(n);
133 b->set_type(dods_char_c);
134 b->set_is_dap4(
true);
138Byte *D4BaseTypeFactory::NewUInt8(
const string &n)
const {
139 Byte *b =
new Byte(n);
140 b->set_type(dods_uint8_c);
141 b->set_is_dap4(
true);
145Int8 *D4BaseTypeFactory::NewInt8(
const string &n)
const {
146 Int8 *b =
new Int8(n);
147 b->set_is_dap4(
true);
151Int16 *D4BaseTypeFactory::NewInt16(
const string &n)
const {
152 Int16 *b =
new Int16(n);
153 b->set_is_dap4(
true);
157UInt16 *D4BaseTypeFactory::NewUInt16(
const string &n)
const {
158 UInt16 *b =
new UInt16(n);
159 b->set_is_dap4(
true);
163Int32 *D4BaseTypeFactory::NewInt32(
const string &n)
const {
164 DBG(cerr <<
"Inside DAP4BaseTypeFactory::NewInt32" << endl);
165 Int32 *b =
new Int32(n);
166 b->set_is_dap4(
true);
170UInt32 *D4BaseTypeFactory::NewUInt32(
const string &n)
const {
171 UInt32 *b =
new UInt32(n);
172 b->set_is_dap4(
true);
176Int64 *D4BaseTypeFactory::NewInt64(
const string &n)
const {
177 DBG(cerr <<
"Inside DAP4BaseTypeFactory::NewInt64" << endl);
178 Int64 *b =
new Int64(n);
179 b->set_is_dap4(
true);
183UInt64 *D4BaseTypeFactory::NewUInt64(
const string &n)
const {
184 UInt64 *b =
new UInt64(n);
185 b->set_is_dap4(
true);
189Float32 *D4BaseTypeFactory::NewFloat32(
const string &n)
const {
190 Float32 *b =
new Float32(n);
191 b->set_is_dap4(
true);
195Float64 *D4BaseTypeFactory::NewFloat64(
const string &n)
const {
196 Float64 *b =
new Float64(n);
197 b->set_is_dap4(
true);
210Str *D4BaseTypeFactory::NewStr(
const string &n)
const {
212 b->set_is_dap4(
true);
216Url *D4BaseTypeFactory::NewUrl(
const string &n)
const {
218 b->set_is_dap4(
true);
222D4Opaque *D4BaseTypeFactory::NewOpaque(
const string &n)
const {
return new D4Opaque(n); }
228 b->set_is_dap4(
true);
232Array *D4BaseTypeFactory::NewArray(
const string &n,
BaseType *v)
const {
return new Array(n, v,
true ); }
234Structure *D4BaseTypeFactory::NewStructure(
const string &n)
const {
235 Structure *b =
new Structure(n);
236 b->set_is_dap4(
true);
240D4Sequence *D4BaseTypeFactory::NewD4Sequence(
const string &n)
const {
return new D4Sequence(n); }
242D4Group *D4BaseTypeFactory::NewGroup(
const string &n)
const {
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.
Holds a 32-bit floating point value.
Holds a 64-bit (double precision) floating point value.
Holds a 16-bit signed integer value.
Holds a 32-bit signed integer.
Holds a64-bit signed integer.
Holds an 8-bit signed integer value.
A class for software fault reporting.
Holds character string data.
Holds an unsigned 16-bit integer.
Holds a 32-bit unsigned integer.
Holds a 64-bit unsigned integer.
Holds an Internet address (URL).
top level DAP object to house generic methods
Type
Identifies the data type.