82 DBG2(cerr <<
"BaseType::_duplicate: " << bt.d_name <<
" send_p: "
83 << bt.d_is_send << endl);
86 d_dataset = bt.d_dataset;
87 d_is_read = bt.d_is_read;
88 d_is_send = bt.d_is_send;
89 d_in_selection = bt.d_in_selection;
90 d_is_synthesized = bt.d_is_synthesized;
92 d_parent = bt.d_parent;
117 BaseType::BaseType(
const string &n,
const Type &t,
bool is_dap4)
118 : d_name(n), d_type(t), d_dataset(
""), d_is_read(false), d_is_send(false),
119 d_in_selection(false), d_is_synthesized(false), d_parent(0),
136 : d_name(n), d_type(t), d_dataset(d), d_is_read(false), d_is_send(false),
137 d_in_selection(false), d_is_synthesized(false), d_parent(0),
153 : d_name(n), d_type(t), d_dataset(
""), d_is_read(false), d_is_send(false),
154 d_in_selection(false), d_is_synthesized(false), d_parent(0),
172 : d_name(n), d_type(t), d_dataset(d), d_is_read(false), d_is_send(false),
173 d_in_selection(false), d_is_synthesized(false), d_parent(0),
185 DBG2(cerr <<
"Entering ~BaseType (" <<
this <<
")" << endl);
186 DBG2(cerr <<
"Exiting ~BaseType" << endl);
208 oss <<
"BaseType (" <<
this <<
"):" << endl
209 <<
" _name: " << d_name << endl
211 <<
" _dataset: " << d_dataset << endl
212 <<
" _read_p: " << d_is_read << endl
213 <<
" _send_p: " << d_is_send << endl
214 <<
" _synthesized_p: " << d_is_synthesized << endl
215 <<
" d_parent: " << d_parent << endl
216 <<
" d_attr: " << hex << &d_attr << dec << endl;
233 << (
void *)
this <<
")" << endl ;
302 return string(
"Null");
304 return string(
"Byte");
306 return string(
"Int16");
308 return string(
"UInt16");
310 return string(
"Int32");
312 return string(
"UInt32");
314 return string(
"Float32");
316 return string(
"Float64");
318 return string(
"String");
320 return string(
"Url");
322 return string(
"Array");
324 return string(
"Structure");
326 return string(
"Sequence");
328 return string(
"Grid");
331 return string(
"Int8");
333 return string(
"UInt8");
335 return string(
"Int64");
337 return string(
"UInt64");
339 return string(
"URL");
341 return string(
"Group");
343 return string(
"Enum");
346 cerr <<
"BaseType::type_name: Undefined type" << endl;
498 BaseType::is_dap4_only_type()
510 BaseType::is_dap2_only_type()
553 return d_is_synthesized;
564 d_is_synthesized = state;
620 if (! d_is_synthesized) {
621 DBG2(cerr <<
"Changing read_p state of " <<
name() <<
" to "
654 DBG2(cerr <<
"Calling BaseType::set_send_p() for: " << this->
name()
708 DBG(cerr <<
"In BaseType::transfer_attributes; processing " <<
name() << endl);
712 DBG(cerr <<
"Processing AttrTable: " << at->
get_name() << endl);
716 DBG(cerr <<
"About to append " <<
"attr name, type:" << at->
get_name(at_p) <<
", " << at->
get_type(at_p) << endl);
742 return d_in_selection;
757 d_in_selection = state;
772 if (!dynamic_cast<Constructor *>(parent)
773 && !dynamic_cast<Vector *>(parent)
775 throw InternalErr(
"Call to set_parent with incorrect variable type.");
854 throw InternalErr(__FILE__, __LINE__,
"BaseType::add_var unimplemented");
928 throw InternalErr(
"Unimplemented BaseType::read() method called for the variable named: " +
name());
935 DBG2(cerr <<
"BaseType::intern_data: " <<
name() << endl);
986 bool constraint_info,
bool constrained)
989 print_decl(oss, space, print_semi, constraint_info, constrained);
990 fwrite(oss.str().data(),
sizeof(char), oss.str().length(), out);
1037 bool constraint_info,
bool constrained)
1041 if (constrained && !
send_p())
1046 if (constraint_info) {
1048 out <<
": Send True" ;
1050 out <<
": Send False" ;
1096 if (constrained && !
send_p())
1102 if (!d_name.empty())
1103 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"name", (
const xmlChar*)d_name.c_str()) < 0)
1104 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for name");
1109 if (xmlTextWriterEndElement(xml.
get_writer()) < 0)
1155 bool sem = (d_type !=
dods_null_c && d_name.length());
1158 msg =
"Every variable must have both a name and a type\n";
1204 throw InternalErr(__FILE__, __LINE__,
"Unimplemented operator.");
1220 throw InternalErr(__FILE__, __LINE__,
"not implemented");
1222 return width(constrained);