libdap::D4Attributes Class Reference
Inheritance diagram for libdap::D4Attributes:

## Public Types

typedef vector< D4Attribute * >::const_iterator | D4AttributesCIter
typedef vector< D4Attribute * >::iterator | D4AttributesIter

## Public Member Functions

void | add_attribute (D4Attribute *attr)
void | add_attribute_nocopy (D4Attribute *attr)
D4AttributesIter | attribute_begin ()
| Get an iterator to the start of the enumerations.
D4AttributesIter | attribute_end ()
| Get an iterator to the end of the enumerations.
const vector< D4Attribute * > & | attributes () const
| D4Attributes (const D4Attributes &rhs)
virtual void | dump (ostream &strm) const
| dumps information about this object
bool | empty () const
void | erase (const string &fqn)
| Erase the given attribute.
void | erase_named_attribute (const string &name)
| Erase an attribute from a specific container This method expects to find 'name' in the D4Attributes object on which it is called.
D4Attribute * | find (const string &name)
D4Attribute * | get (const string &fqn)
bool | has_dap4_types (const std::string &path, std::vector< std::string > &inventory) const
D4Attributes & | operator= (const D4Attributes &rhs)
void | print_dap4 (XMLWriter &xml) const
void | transform_attrs_to_dap2 (AttrTable *d2_attr_table)
| Copy the attributes from this D4Attributes object to a DAP2 AttrTable.
void | transform_to_dap4 (AttrTable &at)
| copy attributes from DAP2 to DAP4

## Detailed Description

Definition at line 98 of file D4Attributes.h.

## Member Typedef Documentation

## D4AttributesCIter

typedef vector<D4Attribute*>::const_iterator libdap::D4Attributes::D4AttributesCIter

Definition at line 101 of file D4Attributes.h.

## D4AttributesIter

typedef vector<D4Attribute*>::iterator libdap::D4Attributes::D4AttributesIter

Definition at line 100 of file D4Attributes.h.

## Constructor & Destructor Documentation

## D4Attributes() [1/2]

libdap::D4Attributes::D4Attributes | ( |  | ) |

inline

Definition at line 116 of file D4Attributes.h.

## D4Attributes() [2/2]

libdap::D4Attributes::D4Attributes | ( | const D4Attributes & | rhs | ) |

inline

Definition at line 117 of file D4Attributes.h.

## ~D4Attributes()

virtual libdap::D4Attributes::~D4Attributes | ( |  | ) |

inline virtual

Definition at line 119 of file D4Attributes.h.

## Member Function Documentation

## add_attribute()

void libdap::D4Attributes::add_attribute | ( | D4Attribute * | attr | ) |

inline

Definition at line 138 of file D4Attributes.h.

## add_attribute_nocopy()

void libdap::D4Attributes::add_attribute_nocopy | ( | D4Attribute * | attr | ) |

inline

Definition at line 140 of file D4Attributes.h.

## attribute_begin()

D4AttributesIter libdap::D4Attributes::attribute_begin | ( |  | ) |

inline

Get an iterator to the start of the enumerations.

Definition at line 143 of file D4Attributes.h.

## attribute_end()

D4AttributesIter libdap::D4Attributes::attribute_end | ( |  | ) |

inline

Get an iterator to the end of the enumerations.

Definition at line 146 of file D4Attributes.h.

## attributes()

const vector< D4Attribute * > & libdap::D4Attributes::attributes | ( |  | ) | const

inline

Get a const reference to the vector of D$attribute pointers.

Note
  Use this in range-based for loops to iterate over the variables.

Returns
  A const reference to the vector of D4Attribute pointers.

Definition at line 158 of file D4Attributes.h.

## dump()

void libdap::D4Attributes::dump | ( | ostream & | strm | ) | const

virtual

dumps information about this object

Displays the pointer value of this instance and then displays information about this base type.

Parameters

  strm | C++ i/o stream to dump the information to

Returns
  void

Implements libdap::DapObj.

Definition at line 677 of file D4Attributes.cc.

## empty()

bool libdap::D4Attributes::empty | ( |  | ) | const

inline

Definition at line 136 of file D4Attributes.h.

## erase()

void libdap::D4Attributes::erase | ( | const string & | fqn | ) |

Erase the given attribute.

Parameters

  fqn | Fully Qualified Name for the attribute to remove.

Definition at line 500 of file D4Attributes.cc.

## erase_named_attribute()

void libdap::D4Attributes::erase_named_attribute | ( | const string & | name | ) |

Erase an attribute from a specific container This method expects to find 'name' in the D4Attributes object on which it is called.

Parameters

  name | The name of the attribute in this container

See also
  void D4Attributes::erase(const string &fqn) for code that searches for a fully qualified attribute name and erases it.

Definition at line 486 of file D4Attributes.cc.

## find()

D4Attribute * libdap::D4Attributes::find | ( | const string & | name | ) |

Definition at line 439 of file D4Attributes.cc.

## get()

D4Attribute * libdap::D4Attributes::get | ( | const string & | fqn | ) |

Return a pointer to the D4Attribute object that has the given FQN.

Note
  A FQN for an attribute is a series of names separated by dots.

Definition at line 444 of file D4Attributes.cc.

## has_dap4_types()

bool libdap::D4Attributes::has_dap4_types | ( | const std::string & | path,
|  | std::vector< std::string > & | inventory ) const

Checks the child Attributes for ones with dap4 types and, when found, adds a description of each to the inventory

Parameters

  path |
  inventory |

Returns
  true when dap4 types are found, false otherwise.

Definition at line 656 of file D4Attributes.cc.

## operator=()

D4Attributes & libdap::D4Attributes::operator= | ( | const D4Attributes & | rhs | ) |

inline

Definition at line 126 of file D4Attributes.h.

## print_dap4()

void libdap::D4Attributes::print_dap4 | ( | XMLWriter & | xml | ) | const

Definition at line 617 of file D4Attributes.cc.

## transform_attrs_to_dap2()

void libdap::D4Attributes::transform_attrs_to_dap2 | ( | AttrTable * | d2_attr_table | ) |

Copy the attributes from this D4Attributes object to a DAP2 AttrTable.

Parameters

  d2_attr_table

  Load
  - d2_attr_table with the D4Attributes found in this object.

Definition at line 331 of file D4Attributes.cc.

## transform_to_dap4()

void libdap::D4Attributes::transform_to_dap4 | ( | AttrTable & | at | ) |

copy attributes from DAP2 to DAP4

Given a DAP2 AttrTable, copy all of its attributes into this DAP4 D4Attributes object as D4Attribute object instances.

Parameters

  at | Read the DAP2 attributes from here.

Definition at line 184 of file D4Attributes.cc.

The documentation for this class was generated from the following files:

- D4Attributes.h
- D4Attributes.cc