38 static char rcsid[] not_used = {
"$Id$"};
44 #include "InternalErr.h"
46 #include "WWWStructure.h"
47 #include "WWWSequence.h"
48 #include "WWWOutput.h"
49 #include "get_html_form.h"
51 using namespace dap_html_form;
54 WWWStructure::ptr_duplicate()
59 WWWStructure::WWWStructure(
const string &n) :
64 WWWStructure::WWWStructure(Structure *bt) :
67 Vars_iter p = bt->var_begin();
68 while (p != bt->var_end()) {
69 BaseType *new_bt = basetype_to_wwwtype(*p);
70 new_bt->set_attr_table((*p)->get_attr_table());
77 WWWStructure::~WWWStructure()
88 WWWStructure::print_val(FILE *os,
string ,
bool print_decls)
90 fprintf(os,
"<b>Structure %s </b><br>\n", name().c_str());
91 fprintf(os,
"<dl><dd>\n");
93 for (Vars_iter i = var_begin(); i != var_end(); ++i) {
94 (*i)->print_val(os,
"", print_decls);
96 fprintf(os,
"<p><p>\n");
99 fprintf(os,
"</dd></dl>\n");
104 WWWStructure::print_val(ostream &strm,
string ,
bool print_decls)
106 strm <<
"<b>Structure " << name() <<
" </b><br>\n";
107 strm <<
"<dl><dd>\n";
109 for (Vars_iter i = var_begin(); i != var_end(); ++i) {
110 (*i)->print_val(strm,
"", print_decls);
115 strm <<
"</dd></dl>\n";
121 bool WWWStructure::is_simple_structure()
123 for (Vars_iter i = var_begin(); i != var_end(); ++i) {
124 if ((*i)->type() == dods_structure_c) {
125 if (!
dynamic_cast<WWWStructure *
> (*i)->is_simple_structure())
129 if (!(*i)->is_simple_type())