82 append_container(attr,
www2id(name));
100 return _container_name ;
113 if (cn != _container_name) {
121 _container_name = cn;
155 d_container->
erase();
251 FILE *in = fopen(fname.c_str(),
"r");
259 int res = fclose(in);
261 DBG(cerr <<
"DAS::parse - Failed to close file " << (
void *)in << endl ;) ;
279 FILE *in = fdopen(_dup(fd),
"r");
281 FILE *in = fdopen(dup(fd),
"r");
285 throw InternalErr(__FILE__, __LINE__,
"Could not access file.");
290 int res = fclose(in);
292 DBG(cerr <<
"DAS::parse(fd) - Failed to close " << (
void *)in << endl ;) ;
308 throw InternalErr(__FILE__, __LINE__,
"Null input stream.");
323 if (!status || !arg.
status()) {
346 fprintf(out,
"Attributes {\n") ;
348 d_attrs.
print(out,
" ", dereference);
350 fprintf(out,
"}\n") ;
368 out <<
"Attributes {\n" ;
370 d_attrs.
print(out,
" ", dereference);
386 << (
void *)
this <<
")" << endl ;
std::vector< entry * >::iterator Attr_iter
virtual AttrTable * container()
Returns the current attribute container when multiple files used to build this DAS.
AttrTable * get_table(AttrTable::Attr_iter &i)
Returns the referenced variable attribute table.
virtual Attr_iter attr_end()
Contains the attributes for a dataset.
AttrTable::Attr_iter var_begin()
Returns a reference to the attribute table for the first variable.
virtual AttrTable * add_table(const string &name, AttrTable *at)
Adds a variable attribute table to the DAS or the current dataset container attribute table...
virtual void set_is_global_attribute(bool ga)
virtual void print(FILE *out, string pad=" ", bool dereference=false)
Prints the attribute table.
virtual string get_name() const
Get the name of this attribute table.
virtual void print(FILE *out, bool dereference=false)
A class for software fault reporting.
int dasparse(libdap::parser_arg *arg)
void * das_buffer(FILE *fp)
virtual AttrTable * append_container(const string &name)
Add a container to the attribute table.
virtual AttrTable * get_attr_table(const string &name)
Get an attribute container.
string get_name(AttrTable::Attr_iter &i)
Returns the name of the referenced variable attribute table.
virtual void erase()
Erase the attribute table.
virtual void erase()
erase all attributes in this DAS
virtual Attr_iter attr_begin()
string www2id(const string &in, const string &escape, const string &except)
AttrTable::Attr_iter var_end()
virtual void dump(ostream &strm) const
dumps information about this object
static ostream & LMarg(ostream &strm)
virtual void parse(string fname)
Reads a DAS from the named file.
void das_delete_buffer(void *buffer)
libdap base object for common functionality of libdap objects
Pass parameters by reference to a parser.
virtual ~DAS()
This deletes the pointers to AttrTables allocated during the parse (and at other times). jhrg 7/29/94.
virtual void dump(ostream &strm) const
dumps information about this object
void das_switch_to_buffer(void *new_buffer)
A class for error processing.
virtual unsigned int get_size() const
Returns the number of attributes in the current attribute table.
virtual unsigned int get_size() const
Get the number of entries in this attribute table.
virtual string container_name()
Returns the name of the current attribute container when multiple files used to build this DAS...