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 133 D4BaseTypeFactory::NewChar(
const string &n)
const 135 Byte *b =
new Byte(n);
136 b->set_type(dods_char_c);
141 D4BaseTypeFactory::NewUInt8(
const string &n)
const 143 Byte *b =
new Byte(n);
144 b->set_type(dods_uint8_c);
149 D4BaseTypeFactory::NewInt8(
const string &n)
const 155 D4BaseTypeFactory::NewInt16(
const string &n)
const 161 D4BaseTypeFactory::NewUInt16(
const string &n)
const 163 return new UInt16(n);
167 D4BaseTypeFactory::NewInt32(
const string &n)
const 169 DBG(cerr <<
"Inside DAP4BaseTypeFactory::NewInt32" << endl);
174 D4BaseTypeFactory::NewUInt32(
const string &n)
const 176 return new UInt32(n);
180 D4BaseTypeFactory::NewInt64(
const string &n)
const 182 DBG(cerr <<
"Inside DAP4BaseTypeFactory::NewInt64" << endl);
187 D4BaseTypeFactory::NewUInt64(
const string &n)
const 189 return new UInt64(n);
193 D4BaseTypeFactory::NewFloat32(
const string &n)
const 195 return new Float32(n);
199 D4BaseTypeFactory::NewFloat64(
const string &n)
const 201 return new Float64(n);
214 return new D4Enum(name, type);
219 D4BaseTypeFactory::NewStr(
const string &n)
const 225 D4BaseTypeFactory::NewUrl(
const string &n)
const 231 D4BaseTypeFactory::NewOpaque(
const string &n)
const 233 return new D4Opaque(n);
245 D4BaseTypeFactory::NewArray(
const string &n,
BaseType *v)
const 247 return new Array(n, v,
true );
251 D4BaseTypeFactory::NewStructure(
const string &n)
const 253 return new Structure(n);
257 D4BaseTypeFactory::NewD4Sequence(
const string &n)
const 259 return new D4Sequence(n);
263 D4BaseTypeFactory::NewGroup(
const string &n)
const 265 return new D4Group(n);
virtual BaseType * NewVariable(Type t, const string &name) const
Holds an Internet address (URL).
virtual D4Enum * NewEnum(const string &n="", Type type=dods_null_c) const
Type
Identifies the data type.
A class for software fault reporting.
Holds character string data.
Holds a DAP4 enumeration.
virtual Url * NewURL(const string &n="") const
The basic data type for the DODS DAP types.
A multidimensional array of identical data types.