40 {
"$Id: DAS.cc 22804 2010-05-19 18:28:46Z pwest $" 111 return _container_name ;
125 if( cn != _container_name )
136 _container_name = cn;
174 d_container->
erase() ;
280 FILE *in = fopen(fname.c_str(),
"r");
288 int res = fclose(in);
290 DBG(cerr <<
"DAS::parse - Failed to close file " << (
void *)in << endl ;) ;
308 FILE *in = fdopen(_dup(fd),
"r");
310 FILE *in = fdopen(dup(fd),
"r");
314 throw InternalErr(__FILE__, __LINE__,
"Could not access file.");
319 int res = fclose(in);
321 DBG(cerr <<
"DAS::parse(fd) - Failed to close " << (
void *)in << endl ;) ;
337 throw InternalErr(__FILE__, __LINE__,
"Null input stream.");
345 bool status =
dasparse((
void *) & arg) == 0;
351 if (!status || !arg.status()) {
374 fprintf(out,
"Attributes {\n") ;
376 d_attrs.
print(out,
" ", dereference);
378 fprintf(out,
"}\n") ;
396 out <<
"Attributes {\n" ;
398 d_attrs.
print(out,
" ", dereference);
414 << (
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.
void dasrestart(FILE *yyin)
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 string get_name() const
Get the name of this attribute table.
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 void print(FILE *out, bool dereference=false)
A class for software fault reporting.
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 unsigned int get_size() const
Returns the number of attributes in the current attribute table.
virtual void erase()
erase all attributes in this DAS
virtual Attr_iter attr_begin()
AttrTable::Attr_iter var_end()
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
Get the number of entries in this attribute table.
virtual void dump(ostream &strm) const
dumps information about this object
virtual string container_name()
Returns the name of the current attribute container when multiple files used to build this DAS...