219 attr =
new std::vector<string>(*rhs.
attr);
239 bool is_dap4_type(
const std::string &path, std::vector<std::string> &inventory)
const {
240 bool ima_d4_attr =
false;
248 ima_d4_attr =
attributes->has_dap4_types(path, inventory);
263 std::vector<entry *> attr_map;
271 bool d_is_global_attribute;
273 void delete_attr_table();
289 virtual void erase();
291 virtual unsigned int get_size()
const;
293 virtual void set_name(
const string &n);
303 virtual unsigned int append_attr(
const string &name,
const string &type,
const string &value);
304 virtual unsigned int append_attr(
const string &name,
const string &type, vector<string> *values);
305 virtual unsigned int append_attr(
const string &name,
const string &type,
const string &value,
bool is_utf8_str);
306 virtual unsigned int append_attr(
const string &name,
const string &type, vector<string> *values,
bool is_utf8_str);
319 virtual string get_type(
const string &name);
322 virtual string get_attr(
const string &name,
unsigned int i = 0);
324 virtual void del_attr(
const string &name,
int i = -1);
344 virtual bool attr_alias(
const string &alias,
const string &name);
346 bool has_dap4_types(
const std::string &path, std::vector<std::string> &inventory)
const;
347 bool is_dap4_type(
const std::string &path, std::vector<std::string> &inventory)
const;
349 virtual void print(FILE *out,
string pad =
" ",
bool dereference =
false);
350 virtual void print(ostream &out,
string pad =
" ",
bool dereference =
false);
352 virtual void print_xml(FILE *out,
string pad =
" ",
bool constrained =
false);
353 virtual void print_xml(ostream &out,
string pad =
" ",
bool constrained =
false);
359 virtual void dump(ostream &strm)
const;
Contains the attributes for a dataset.
virtual AttrTable * append_container(const string &name)
Add a container to the attribute table.
bool is_dap4_type(const std::string &path, std::vector< std::string > &inventory) const
void simple_print(FILE *out, string pad, Attr_iter i, bool dereference)
virtual unsigned int get_attr_num(const string &name)
Get the number of attributes in this container.
bool has_dap4_types(const std::string &path, std::vector< std::string > &inventory) const
virtual bool attr_alias(const string &alias, AttrTable *at, const string &name)
Adds an alias to the set of attributes.
virtual bool is_container(Attr_iter iter)
virtual void find(const string &target, AttrTable **at, Attr_iter *iter)
virtual void set_name(const string &n)
Set the name of this attribute table.
virtual AttrTable * get_attr_table(const string &name)
Get an attribute container.
void clone(const AttrTable &at)
AttrTable & operator=(const AttrTable &rhs)
virtual Attr_iter attr_end()
virtual void print_xml(FILE *out, string pad=" ", bool constrained=false)
virtual string get_attr(const string &name, unsigned int i=0)
AttrTable * simple_find_container(const string &target)
virtual AttrTable * get_parent() const
virtual string get_type(const string &name)
Get the type name of an attribute within this attribute table.
virtual bool is_global_attribute() const
virtual vector< string > * get_attr_vector(const string &name)
Get a vector-valued attribute.
virtual void add_value_alias(AttrTable *at, const string &name, const string &source)
Add an alias for an attribute.
virtual unsigned int append_attr(const string &name, const string &type, const string &value)
Add an attribute to the table.
virtual Attr_iter attr_begin()
virtual Attr_iter get_attr_iter(int i)
void print_dap4(XMLWriter &xml)
virtual void del_attr(const string &name, int i=-1)
Deletes an attribute.
virtual string get_name() const
Get the name of this attribute table.
virtual void erase()
Erase the attribute table.
virtual void set_is_global_attribute(bool ga)
friend class AttrTableTest
void print_xml_writer(XMLWriter &xml)
virtual Attr_iter del_attr_table(Attr_iter iter)
virtual void print(FILE *out, string pad=" ", bool dereference=false)
Prints the attribute table.
virtual void add_container_alias(const string &name, AttrTable *src)
Add an alias to a container held by this attribute table.
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
std::vector< entry * >::const_iterator Attr_citer
virtual AttrTable * find_container(const string &target)
Find an attribute with a given name.
Attr_iter simple_find(const string &target)
std::vector< entry * >::iterator Attr_iter
virtual AttrType get_attr_type(const string &name)
Get the type of an attribute.
virtual AttrTable * recurrsive_find(const string &target, Attr_iter *location)
libdap base object for common functionality of libdap objects
top level DAP object to house generic methods
string add_space_encoding(const string &s)
AttrType String_to_AttrType(const string &s)
string AttrType_to_String(const AttrType at)
string remove_space_encoding(const string &s)
std::vector< string > * attr
void clone(const entry &rhs)
entry & operator=(const entry &rhs)
bool is_dap4_type(const std::string &path, std::vector< std::string > &inventory) const