Holds a table of Attributes.
An AttrTable (``Attribute Table'') stores a set of names and, for each name, either a type and a value, or another attribute table. The attribute value can be a vector containing many values of the same type. The attributes can have any of the types listed in the #AttrType# list. However, all attribute types are stored as string data, except for the container type, which is stored as a pointer to another attribute table. Each element in the attribute table can itself be an attribute table. The table can also contain ``alias'' attributes whose value is given by the value of another attribute to which it is linked. The attribute tables have a standard printed representation. There is a member function #print()# for writing this form. Use the #DAS::parse()# function to read the printed form. An attribute table might look something like this: \begin{verbatim} string long_name "Weekly Means of Sea Surface Temperature"; actual_range { Float64 min -1.8; Float64 max 35.09; } string units "degC"; conversion_data { Float64 add_offset 0.; Float64 scale_factor 0.0099999998; } Int32 missing_value 32767; \end{verbatim} Here, #long_name#, #units#, and #missing_value# are simple attributes, and #actual_range# and #conversion_data# are container attributes containing other attribute tables.
AttrTable& operator=(const AttrTable &rhs)
unsigned int get_size()
Pix first_attr()
void next_attr(Pix &p)
string get_name(Pix p)
bool is_container(Pix p)
get\_attr\_table()
get\_type()
get\_attr\_type()
get\_attr\_num()
get\_attr()
get\_attr\_vector()
append\_attr()
type - The type of the attribute to add or modify.
value - The value to add to the attribute table.
unsigned int append_attr(const string &name, const string &type, const string &value)
unsigned int append_attr(const char *name, const char *type, const char *value)
AttrTable* append_container(const string &name)
attr\_alias()
bool attr_alias(const string &alias, AttrTable *at, const string &name)
name - The name of the already-existing attribute to which
the alias will refer.
at - An attribute table in which to insert the alias. bool attr_alias(const string &alias, const string &name)
name - The name of the already-existing attribute to which
the alias will refer. void del_attr(const string &name, int i = -1)
i - If the named attribute is a vector, and {\it i} is
non-negative, the i-th entry in the vector is deleted, and the
array is repacked. If {\it i} equals -1 (the default), the
entire attribute is deleted. void print(ostream &os, string pad = " ")
alphabetic index hierarchy of classes
generated by doc++