38 #include <sys/types.h>
62 #include "InternalErr.h"
63 #include "Keywords2.h"
79 #include "Structure.h"
95 const string c_xml_xsi =
"http://www.w3.org/2001/XMLSchema-instance";
96 const string c_xml_namespace =
"http://www.w3.org/XML/1998/namespace";
98 const string grddl_transformation_dap32 =
"http://xml.opendap.org/transforms/ddxToRdfTriples.xsl";
100 const string c_default_dap20_schema_location =
"http://xml.opendap.org/dap/dap2.xsd";
101 const string c_default_dap32_schema_location =
"http://xml.opendap.org/dap/dap3.2.xsd";
102 const string c_default_dap40_schema_location =
"http://xml.opendap.org/dap/dap4.0.xsd";
104 const string c_dap20_namespace =
"http://xml.opendap.org/ns/DAP2";
105 const string c_dap32_namespace =
"http://xml.opendap.org/ns/DAP/3.2#";
106 const string c_dap40_namespace =
"http://xml.opendap.org/ns/DAP/4.0#";
108 const string c_dap_20_n_sl = c_dap20_namespace +
" " + c_default_dap20_schema_location;
109 const string c_dap_32_n_sl = c_dap32_namespace +
" " + c_default_dap32_schema_location;
110 const string c_dap_40_n_sl = c_dap40_namespace +
" " + c_default_dap40_schema_location;
126 void dds_switch_to_buffer(
void *new_buffer);
127 void dds_delete_buffer(
void * buffer);
128 void *dds_buffer(FILE *fp);
133 DDS::duplicate(
const DDS &dds)
135 DBG(cerr <<
"Entering DDS::duplicate... " <<endl);
137 BaseTypeFactory *d_factory;
141 string d_container_name;
142 Structure *d_container;
147 string d_dap_version;
148 string d_request_xml_base;
153 vector<BaseType *> vars;
160 long d_max_response_size;
163 d_factory = dds.d_factory;
166 d_filename = dds.d_filename;
167 d_container_name = dds.d_container_name;
168 d_container = dds.d_container;
170 d_dap_major = dds.d_dap_major;
171 d_dap_minor = dds.d_dap_minor;
173 d_dap_version = dds.d_dap_version;
174 d_request_xml_base = dds.d_request_xml_base;
175 d_namespace = dds.d_namespace;
179 DDS &dds_tmp =
const_cast<DDS &
>(dds);
182 for (Vars_iter i = dds_tmp.var_begin(); i != dds_tmp.var_end(); i++) {
186 d_timeout = dds.d_timeout;
188 d_keywords = dds.d_keywords;
190 d_max_response_size = dds.d_max_response_size;
206 : d_factory(factory), d_name(name), d_container_name(
""), d_container(0),
207 d_request_xml_base(
""),
208 d_timeout(0), d_keywords(), d_max_response_size(0)
210 DBG(cerr <<
"Building a DDS for the default version (2.0)" << endl);
233 : d_factory(factory), d_name(name), d_container_name(
""), d_container(0),
234 d_request_xml_base(
""),
235 d_timeout(0), d_keywords(), d_max_response_size(0)
237 DBG(cerr <<
"Building a DDS for version: " << version << endl);
247 DBG(cerr <<
"Entering DDS(const DDS &rhs) ..." << endl);
249 DBG(cerr <<
" bye." << endl);
255 for (Vars_iter i = vars.begin(); i != vars.end(); i++) {
257 delete btp ; btp = 0;
262 DDS::operator=(
const DDS &rhs)
264 DBG(cerr <<
"Entering DDS::operator= ..." << endl);
270 DBG(cerr <<
" bye." << endl);
295 "Error transferring attributes: working on a container in dds, but not das");
301 (*i)->transfer_attributes(top);
307 DBG(cerr <<
"Processing the attributes for: " << (*var)->d_name() <<
" a " << (*var)->type_name() << endl);
308 (*var)->transfer_attributes(top);
321 if ((*i)->type == Attr_container && (*i)->attributes->is_global_attribute()) {
325 d_attr.append_container(at, at->
get_name());
329 AttrTable::Attr_iter at_cont_p = top_level->attr_begin();
330 while (at_cont_p != top_level->attr_end()) {
334 if ((*at_cont_p)->type == Attr_container && (*at_cont_p)->attributes->is_global_attribute()) {
335 DBG(cerr << (*at_cont_p)->d_name <<
" is a global attribute." << endl);
339 d_attr.append_container(at, at->
get_name());
413 if (d_dap_minor >= 0) {
415 oss << d_dap_major <<
"." << d_dap_minor;
416 d_dap_version = oss.str();
428 if (d_dap_major >= 0) {
430 oss << d_dap_major <<
"." << d_dap_minor;
431 d_dap_version = oss.str();
443 istringstream iss(v);
445 int major = -1, minor = -1;
447 if (!iss.eof() && !iss.fail())
449 if (!iss.eof() && !iss.fail())
451 if (!iss.eof() && !iss.fail())
454 if (major == -1 || minor == -1 or dot !=
'.')
455 throw InternalErr(__FILE__, __LINE__,
"Could not parse dap version. Value given: " + v);
466 switch (d_dap_major) {
468 d_namespace = c_dap20_namespace;
471 d_namespace = c_dap32_namespace;
474 d_namespace = c_dap40_namespace;
477 throw InternalErr(__FILE__, __LINE__,
"Unknown DAP version.");
491 int major = floor(d);
492 int minor = (d-major)*10;
494 DBG(cerr <<
"Major: " << major <<
", Minor: " << minor << endl);
497 oss << major <<
"." << minor;
514 return d_container_name;
542 d_container_name = cn;
569 for (Vars_iter i = vars.begin(); i != vars.end(); i++) {
572 w += (*i)->width(constrained);
575 w += (*i)->width(constrained);
589 throw InternalErr(__FILE__, __LINE__,
"Trying to add a BaseType object with a NULL pointer.");
591 if (bt->is_dap4_only_type())
592 throw InternalErr(__FILE__, __LINE__,
"Attempt to add a DAP4 type to a DAP2 DDS.");
594 DBG2(cerr <<
"In DDS::add_var(), bt's address is: " << bt << endl);
597 DBG2(cerr <<
"In DDS::add_var(), btp's address is: " << btp << endl);
601 d_container->add_var(bt);
617 throw InternalErr(__FILE__, __LINE__,
"Trying to add a BaseType object with a NULL pointer.");
620 if (bt->is_dap4_only_type())
621 throw InternalErr(__FILE__, __LINE__,
"Attempt to add a DAP4 type to a DAP2 DDS.");
624 DBG2(cerr <<
"In DDS::add_var(), bt's address is: " << bt << endl);
627 d_container->add_var_nocopy(bt);
646 d_container->del_var( n ) ;
650 for (Vars_iter i = vars.begin(); i != vars.end(); i++) {
651 if ((*i)->name() == n) {
667 if (i != vars.end()) {
683 for (Vars_iter i_tmp = i1; i_tmp != i2; i_tmp++) {
726 return d_container->var( name,
false, s ) ;
732 return leaf_match(name, s);
736 DDS::leaf_match(
const string &n, BaseType::btp_stack *s)
738 DBG(cerr <<
"DDS::leaf_match: Looking for " << n << endl);
740 for (Vars_iter i = vars.begin(); i != vars.end(); i++) {
742 DBG(cerr <<
"DDS::leaf_match: Looking for " << n <<
" in: " << btp->
name() << endl);
744 if (btp->
name() == n) {
745 DBG(cerr <<
"Found " << n <<
" in: " << btp->
name() << endl);
750 BaseType *found = btp->
var(n,
false, s);
752 DBG(cerr <<
"Found " << n <<
" in: " << btp->
name() << endl);
756 #if STRUCTURE_ARRAY_SYNTAX_OLD
759 BaseType *found = btp->
var()->
var(n,
false, s);
761 DBG(cerr <<
"Found " << n <<
" in: " << btp->
var()->d_name() << endl);
772 DDS::exact_match(
const string &name, BaseType::btp_stack *s)
774 for (Vars_iter i = vars.begin(); i != vars.end(); i++) {
776 DBG2(cerr <<
"Looking for " << d_name <<
" in: " << btp << endl);
778 if (btp->name() == name) {
779 DBG2(cerr <<
"Found " << d_name <<
" in: " << btp << endl);
784 string::size_type dot_pos = name.find(
".");
785 if (dot_pos != string::npos) {
786 string aggregate = name.substr(0, dot_pos);
787 string field = name.substr(dot_pos + 1);
789 BaseType *agg_ptr =
var(aggregate, s);
791 DBG2(cerr <<
"Descending into " << agg_ptr->name() << endl);
792 return agg_ptr->var(field,
true, s);
813 return vars.rbegin();
834 return vars.begin() + i;
843 return *(vars.begin() + i);
854 if (ptr->is_dap4_only_type())
855 throw InternalErr(__FILE__, __LINE__,
"Attempt to add a DAP4 type to a DAP2 DDS.");
871 if (ptr->is_dap4_only_type())
872 throw InternalErr(__FILE__, __LINE__,
"Attempt to add a DAP4 type to a DAP2 DDS.");
887 #if USE_LOCAL_TIMEOUT_SCHEME
897 #if USE_LOCAL_TIMEOUT_SCHEME
916 DDS::set_timeout(
int)
918 #if USE_LOCAL_TIMEOUT_SCHEME
927 #if USE_LOCAL_TIMEOUT_SCHEME
938 for (Vars_iter i = vars.begin(); i != vars.end(); i++) {
939 if ((*i)->type() == dods_sequence_c)
941 else if ((*i)->type() == dods_structure_c)
950 FILE *in = fopen(fname.c_str(),
"r");
953 throw Error(cannot_read_file,
"Could not open: " + fname);
972 int new_fd = _dup(fd);
974 int new_fd = dup(fd);
978 throw InternalErr(__FILE__, __LINE__,
"Could not access file.");
979 FILE *in = fdopen(new_fd,
"r");
982 throw InternalErr(__FILE__, __LINE__,
"Could not access file.");
1005 throw InternalErr(__FILE__, __LINE__,
"Null input stream.");
1008 void *buffer = dds_buffer(in);
1009 dds_switch_to_buffer(buffer);
1013 bool status = ddsparse(&arg) == 0;
1015 dds_delete_buffer(buffer);
1017 DBG2(cout <<
"Status from parser: " << status << endl);
1021 if (!status || !arg.status()) {
1033 fwrite(oss.str().data(),
sizeof(
char), oss.str().length(), out);
1040 out <<
"Dataset {\n" ;
1042 for (Vars_citer i = vars.begin(); i != vars.end(); i++) {
1043 (*i)->print_decl(out) ;
1046 out <<
"} " <<
id2www(d_name) <<
";\n" ;
1060 static string four_spaces =
" ";
1061 void print_var_das(ostream &out,
BaseType *bt,
string indent=
""){
1065 attr_table.
print(out, indent+four_spaces);
1068 Constructor::Vars_iter i = cnstrctr->
var_begin();
1069 Constructor::Vars_iter e = cnstrctr->
var_end();
1071 print_var_das(out,*i,indent+four_spaces);
1075 out << indent <<
"}" << endl;
1080 DDS::print_das(ostream &out)
1083 out <<
"Attributes {" << endl ;
1084 for (Vars_citer i = vars.begin(); i != vars.end(); i++) {
1085 print_var_das(out, *i, four_spaces);
1088 d_attr.print(out,indent);
1089 out <<
"}" << endl ;
1107 fwrite(oss.str().data(),
sizeof(
char), oss.str().length(), out);
1123 out <<
"Dataset {\n" ;
1125 for (Vars_citer i = vars.begin(); i != vars.end(); i++) {
1129 (*i)->print_decl(out,
" ",
true,
false,
true) ;
1132 out <<
"} " <<
id2www(d_name) <<
";\n" ;
1153 fwrite(oss.str().data(), 1, oss.str().length(), out);
1173 class VariablePrintXMLWriter :
public unary_function<BaseType *, void>
1178 VariablePrintXMLWriter(
XMLWriter &xml,
bool constrained)
1179 : d_xml(xml), d_constrained(constrained)
1181 void operator()(BaseType *bt)
1183 bt->print_xml_writer(d_xml, d_constrained);
1211 if (xmlTextWriterStartElement(xml.get_writer(), (
const xmlChar*)
"Group") < 0)
1212 throw InternalErr(__FILE__, __LINE__,
"Could not write Group element");
1213 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"name", (
const xmlChar*)d_name.c_str()) < 0)
1214 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for name");
1216 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"dapVersion", (
const xmlChar*)get_dap_version().c_str()) < 0)
1217 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for dapVersion");
1220 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xmlns:xml", (
const xmlChar*)c_xml_namespace.c_str()) < 0)
1221 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:xml");
1223 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xml:base", (
const xmlChar*)
get_request_xml_base().c_str()) < 0)
1224 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xml:base");
1227 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xmlns", (
const xmlChar*)
get_namespace().c_str()) < 0)
1228 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns");
1232 if (xmlTextWriterStartElement(xml.get_writer(), (
const xmlChar*)
"Dataset") < 0)
1233 throw InternalErr(__FILE__, __LINE__,
"Could not write Dataset element");
1234 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"name", (
const xmlChar*)d_name.c_str()) < 0)
1235 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for name");
1236 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xmlns:xsi", (
const xmlChar*)
"http://www.w3.org/2001/XMLSchema-instance") < 0)
1237 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:xsi");
1239 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xsi:schemaLocation", (
const xmlChar*)c_dap_32_n_sl.c_str()) < 0)
1240 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:schemaLocation");
1242 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xmlns:grddl", (
const xmlChar*)
"http://www.w3.org/2003/g/data-view#") < 0)
1243 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:grddl");
1245 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"grddl:transformation", (
const xmlChar*)grddl_transformation_dap32.c_str()) < 0)
1246 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:transformation");
1248 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xmlns", (
const xmlChar*)c_dap32_namespace.c_str()) < 0)
1249 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns");
1250 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xmlns:dap", (
const xmlChar*)c_dap32_namespace.c_str()) < 0)
1251 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:dap");
1253 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"dapVersion", (
const xmlChar*)
"3.2") < 0)
1254 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for dapVersion");
1257 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xmlns:xml", (
const xmlChar*)c_xml_namespace.c_str()) < 0)
1258 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:xml");
1260 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xml:base", (
const xmlChar*)
get_request_xml_base().c_str()) < 0)
1261 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xml:base");
1265 if (xmlTextWriterStartElement(xml.get_writer(), (
const xmlChar*)
"Dataset") < 0)
1266 throw InternalErr(__FILE__, __LINE__,
"Could not write Dataset element");
1267 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"name", (
const xmlChar*)d_name.c_str()) < 0)
1268 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for d_name");
1269 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xmlns:xsi", (
const xmlChar*)
"http://www.w3.org/2001/XMLSchema-instance") < 0)
1270 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:xsi");
1272 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xmlns", (
const xmlChar*)c_dap20_namespace.c_str()) < 0)
1273 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns");
1275 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xsi:schemaLocation", (
const xmlChar*)c_dap_20_n_sl.c_str()) < 0)
1276 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:schemaLocation");
1280 d_attr.print_xml_writer(xml);
1283 for_each(
var_begin(),
var_end(), VariablePrintXMLWriter(xml, constrained));
1290 if (!blob.empty()) {
1291 if (xmlTextWriterStartElement(xml.get_writer(), (
const xmlChar*)
"blob") < 0)
1292 throw InternalErr(__FILE__, __LINE__,
"Could not write blob element");
1293 string cid =
"cid:" + blob;
1294 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"href", (
const xmlChar*) cid.c_str()) < 0)
1295 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for d_name");
1296 if (xmlTextWriterEndElement(xml.get_writer()) < 0)
1297 throw InternalErr(__FILE__, __LINE__,
"Could not end blob element");
1301 if (xmlTextWriterStartElement(xml.get_writer(), (
const xmlChar*)
"blob") < 0)
1302 throw InternalErr(__FILE__, __LINE__,
"Could not write blob element");
1303 string cid =
"cid:" + blob;
1304 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"href", (
const xmlChar*) cid.c_str()) < 0)
1305 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for d_name");
1306 if (xmlTextWriterEndElement(xml.get_writer()) < 0)
1307 throw InternalErr(__FILE__, __LINE__,
"Could not end blob element");
1310 if (xmlTextWriterStartElement(xml.get_writer(), (
const xmlChar*)
"dataBLOB") < 0)
1311 throw InternalErr(__FILE__, __LINE__,
"Could not write dataBLOB element");
1312 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"href", (
const xmlChar*)
"") < 0)
1313 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for d_name");
1314 if (xmlTextWriterEndElement(xml.get_writer()) < 0)
1315 throw InternalErr(__FILE__, __LINE__,
"Could not end dataBLOB element");
1318 if (xmlTextWriterEndElement(xml.get_writer()) < 0)
1319 throw InternalErr(__FILE__, __LINE__,
"Could not end Dataset element");
1321 out << xml.get_doc();
1340 throw InternalErr(__FILE__, __LINE__,
"Tried to print a DMR with DAP major version less than 4");
1345 if (xmlTextWriterStartElement(xml.get_writer(), (
const xmlChar*)
"Group") < 0)
1346 throw InternalErr(__FILE__, __LINE__,
"Could not write Group element");
1348 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xmlns:xml",
1349 (
const xmlChar*) c_xml_namespace.c_str()) < 0)
1350 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:xml");
1352 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xmlns:xsi", (
const xmlChar*) c_xml_xsi.c_str())
1354 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:xsi");
1356 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xsi:schemaLocation",
1357 (
const xmlChar*) c_dap_40_n_sl.c_str()) < 0)
1358 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:schemaLocation");
1360 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xmlns",
1362 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns");
1364 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"dapVersion",
1365 (
const xmlChar*) get_dap_version().c_str()) < 0)
1366 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for dapVersion");
1368 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"dmrVersion", (
const xmlChar*) get_dmr_version().c_str()) < 0)
1369 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for dapVersion");
1372 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"xml:base",
1374 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xml:base");
1377 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"name", (
const xmlChar*) d_name.c_str()) < 0)
1378 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for name");
1381 d_attr.print_xml_writer(xml);
1384 for_each(
var_begin(),
var_end(), VariablePrintXMLWriter(xml, constrained));
1392 if (!blob.empty()) {
1393 if (xmlTextWriterStartElement(xml.get_writer(), (
const xmlChar*)
"blob") < 0)
1394 throw InternalErr(__FILE__, __LINE__,
"Could not write blob element");
1395 string cid =
"cid:" + blob;
1396 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar*)
"href", (
const xmlChar*) cid.c_str()) < 0)
1397 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for d_name");
1398 if (xmlTextWriterEndElement(xml.get_writer()) < 0)
1399 throw InternalErr(__FILE__, __LINE__,
"Could not end blob element");
1404 if (xmlTextWriterEndElement(xml.get_writer()) < 0)
1405 throw InternalErr(__FILE__, __LINE__,
"Could not end the top-level Group element");
1407 out << xml.get_doc();
1430 cerr <<
"A dataset must have a d_name" << endl;
1435 if (!unique_names(vars, d_name,
"Dataset", msg))
1439 for (Vars_iter i = vars.begin(); i != vars.end(); i++)
1440 if (!(*i)->check_semantics(msg,
true))
1475 BaseType::btp_stack *s =
new BaseType::btp_stack;
1477 DBG2(cerr <<
"DDS::mark: Looking for " << n << endl);
1481 DBG2(cerr <<
"Could not find variable " << n << endl);
1487 DBG2(cerr <<
"DDS::mark: Set variable " << variable->d_name()
1488 <<
" (a " << variable->
type_name() <<
")" << endl);
1494 while (!s->empty()) {
1495 s->top()->BaseType::set_send_p(state);
1497 DBG2(cerr <<
"DDS::mark: Set variable " << s->top()->d_name()
1498 <<
" (a " << s->top()->type_name() <<
")" << endl);
1501 string parent_name = (s->top()->get_parent()) ? s->top()->get_parent()->name():
"none";
1502 string parent_type = (s->top()->get_parent()) ? s->top()->get_parent()->type_name():
"none";
1503 DBG2(cerr <<
"DDS::mark: Parent variable " << parent_name <<
" (a " << parent_type <<
")" << endl);
1521 for (Vars_iter i = vars.begin(); i != vars.end(); i++)
1522 (*i)->set_send_p(state);
1535 strm << DapIndent::LMarg <<
"DDS::dump - ("
1536 << (
void *)
this <<
")" << endl ;
1537 DapIndent::Indent() ;
1538 strm << DapIndent::LMarg <<
"d_name: " << d_name << endl ;
1539 strm << DapIndent::LMarg <<
"filename: " << d_filename << endl ;
1540 strm << DapIndent::LMarg <<
"protocol major: " << d_dap_major << endl;
1541 strm << DapIndent::LMarg <<
"protocol minor: " << d_dap_minor << endl;
1542 strm << DapIndent::LMarg <<
"factory: " << (
void *)d_factory << endl ;
1544 strm << DapIndent::LMarg <<
"global attributes:" << endl ;
1545 DapIndent::Indent() ;
1547 DapIndent::UnIndent() ;
1550 strm << DapIndent::LMarg <<
"vars:" << endl ;
1551 DapIndent::Indent() ;
1552 Vars_citer i = vars.begin() ;
1553 Vars_citer ie = vars.end() ;
1554 for (; i != ie; i++) {
1557 DapIndent::UnIndent() ;
1560 strm << DapIndent::LMarg <<
"vars: none" << endl ;
1563 DapIndent::UnIndent() ;