47 for_each(d_enums.begin(), d_enums.end(), enum_del);
72 d_enums.push_back(enum_def);
75 class PrintVariable :
public unary_function<BaseType *, void>
80 PrintVariable(
XMLWriter &x,
bool c) : d_xml(x), d_constrained(c) {}
82 void operator()(BaseType *btp)
84 btp->print_xml_writer(d_xml, d_constrained);
88 class PrintEnum :
public unary_function<D4EnumDef *, void>
93 PrintEnum(XMLWriter &x) : d_xml(x){}
95 void operator()(D4EnumDef *e)
97 e->print_xml_writer(d_xml);
104 if (constrained && !
send_p())
111 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"name", (
const xmlChar*)
name().c_str()) < 0)
112 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for name");
115 if (d_enums.size() > 0)
116 for_each(d_enums.begin(), d_enums.end(), PrintEnum(xml));
126 if (xmlTextWriterEndElement(xml.
get_writer()) < 0)
void add_enumeration_nocopy(D4EnumDef *enum_def)
xmlTextWriterPtr get_writer()
void m_duplicate(const Constructor &s)
void print_xml_writer(XMLWriter &xml, bool constrained)
void print_xml_writer(XMLWriter &xml)
A class for software fault reporting.
string type_name() const
Returns the type of the class instance as a string.
virtual BaseType * ptr_duplicate()
string name() const
Returns the name of the class instance.
virtual AttrTable & get_attr_table()
D4Group & operator=(const D4Group &rhs)
The basic data type for the DODS DAP types.
virtual bool send_p()
Should this variable be sent?
virtual unsigned int get_size() const
Get the number of entries in this attribute table.