31 #include "DmrppByte.h" 33 #include "DmrppInt8.h" 35 #include "DmrppInt16.h" 36 #include "DmrppUInt16.h" 37 #include "DmrppInt32.h" 38 #include "DmrppUInt32.h" 40 #include "DmrppInt64.h" 41 #include "DmrppUInt64.h" 43 #include "DmrppFloat32.h" 44 #include "DmrppFloat64.h" 49 #include "DmrppD4Enum.h" 51 #include "DmrppD4Opaque.h" 53 #include "DmrppArray.h" 54 #include "DmrppStructure.h" 56 #include "DmrppD4Sequence.h" 57 #include "DmrppD4Group.h" 59 #include "DmrppTypeFactory.h" 66 BaseType *DmrppTypeFactory::NewVariable(
Type t,
const string &name)
const 75 return NewUInt8(name);
80 return NewInt16(name);
82 return NewUInt16(name);
84 return NewInt32(name);
86 return NewUInt32(name);
89 return NewInt64(name);
91 return NewUInt64(name);
94 return NewFloat32(name);
96 return NewFloat64(name);
104 return NewEnum(name);
107 return NewOpaque(name);
110 return NewArray(name);
112 case dods_structure_c:
113 return NewStructure(name);
115 case dods_sequence_c:
116 return NewD4Sequence(name);
119 return NewGroup(name);
122 throw BESError(
"Unimplemented type in DAP4.", BES_INTERNAL_ERROR, __FILE__, __LINE__);
127 DmrppTypeFactory::NewByte(
const string &n)
const 129 return new DmrppByte(n);
133 DmrppTypeFactory::NewChar(
const string &n)
const 135 Byte *b =
new DmrppByte(n);
136 b->set_type(dods_char_c);
141 DmrppTypeFactory::NewUInt8(
const string &n)
const 143 Byte *b =
new DmrppByte(n);
144 b->set_type(dods_uint8_c);
149 DmrppTypeFactory::NewInt8(
const string &n)
const 151 return new DmrppInt8(n);
155 DmrppTypeFactory::NewInt16(
const string &n)
const 157 return new DmrppInt16(n);
161 DmrppTypeFactory::NewUInt16(
const string &n)
const 163 return new DmrppUInt16(n);
167 DmrppTypeFactory::NewInt32(
const string &n)
const 169 BESDEBUG(
"dmrpp",
"Inside DAP4BaseTypeFactory::NewInt32" << endl);
170 return new DmrppInt32(n);
174 DmrppTypeFactory::NewUInt32(
const string &n)
const 176 return new DmrppUInt32(n);
180 DmrppTypeFactory::NewInt64(
const string &n)
const 182 BESDEBUG(
"dmrpp",
"Inside DAP4BaseTypeFactory::NewInt64" << endl);
183 return new DmrppInt64(n);
187 DmrppTypeFactory::NewUInt64(
const string &n)
const 189 return new DmrppUInt64(n);
193 DmrppTypeFactory::NewFloat32(
const string &n)
const 195 return new DmrppFloat32(n);
199 DmrppTypeFactory::NewFloat64(
const string &n)
const 201 return new DmrppFloat64(n);
205 DmrppTypeFactory::NewStr(
const string &n)
const 207 return new DmrppStr(n);
211 DmrppTypeFactory::NewUrl(
const string &n)
const 213 return new DmrppUrl(n);
219 DmrppTypeFactory::NewURL(
const string &n)
const 225 DmrppTypeFactory::NewOpaque(
const string &n)
const 231 DmrppTypeFactory::NewEnum(
const string &name,
Type type)
const 233 return new DmrppD4Enum(name, type);
237 DmrppTypeFactory::NewArray(
const string &n, BaseType *v)
const 239 return new DmrppArray(n, v);
243 DmrppTypeFactory::NewStructure(
const string &n)
const 245 return new DmrppStructure(n);
249 DmrppTypeFactory::NewD4Sequence(
const string &n)
const 251 return new DmrppD4Sequence(n);
255 DmrppTypeFactory::NewGroup(
const string &n)
const 257 return new DmrppD4Group(n);
Abstract exception class for the BES with basic string message.