38static char rcsid[] not_used = {
"$Id$"};
43#include <libdap/DAS.h>
44#include <libdap/InternalErr.h>
46#include "WWWSequence.h"
48#include "get_html_form.h"
50using namespace dap_html_form;
53WWWSequence::ptr_duplicate()
55 return new WWWSequence(*
this);
58WWWSequence::WWWSequence(
const string &n) :
65 Vars_iter p = bt->var_begin();
66 while (p != bt->var_end()) {
67 BaseType *new_bt = basetype_to_wwwtype(*p);
68 new_bt->set_attr_table((*p)->get_attr_table());
75WWWSequence::~WWWSequence()
79int WWWSequence::size()
const
84bool WWWSequence::is_simple_sequence()
86 for (Vars_iter i = var_begin(); i != var_end(); ++i) {
87 if ((*i)->type() == dods_sequence_c) {
88 if (!
dynamic_cast<WWWSequence *
> ((*i))->is_simple_sequence())
92 if (!(*i)->is_simple_type())
104WWWSequence::print_val(FILE *os,
string ,
bool print_decls)
106 fprintf(os,
"<b>Sequence %s</b><br>\n", name().c_str());
107 fprintf(os,
"<dl><dd>\n");
109 for (Vars_iter i = var_begin(); i != var_end(); ++i) {
110 (*i)->print_val(os,
"", print_decls);
111 wo->write_variable_attributes(*i);
112 fprintf(os,
"<p><p>\n");
115 fprintf(os,
"</dd></dl>\n");
120WWWSequence::print_val(
ostream &strm,
string ,
bool print_decls)
122 strm <<
"<b>Sequence " << name() <<
"</b><br>\n";
123 strm <<
"<dl><dd>\n";
125 for (Vars_iter i = var_begin(); i != var_end(); ++i) {
126 (*i)->print_val(strm,
"", print_decls);
127 wo->write_variable_attributes(*i);
131 strm <<
"</dd></dl>\n";