~Var( void ) { DimList::iterator dim = m_dims.begin(); DimList::const_iterator last_dim = m_dims.end(); while ( dim != last_dim ) { if ( *dim ) delete *dim; dim++; } m_dims.clear(); }
const Dim* dim( const std::string name ) const { DimList::const_iterator dim = m_dims.begin(); DimList::const_iterator last = m_dims.end(); while ( dim != last ) { if ( (*dim)->name() == name ) break; dim++; } return( *dim ); }
const Dim* dim( const size_t index ) const { DimList::const_iterator dim = m_dims.begin(); DimList::const_iterator last = m_dims.end(); size_t counter = 0; while ( dim != last ) { if ( counter++ == index ) break; dim++; } return( *dim ); }
~File( void ) { if ( m_file ) delete m_file; DimList::iterator dim = m_dims.begin(); DimList::const_iterator last_dim = m_dims.end(); while ( dim != last_dim ) { if ( *dim ) delete *dim; dim++; } m_dims.clear(); VarList::iterator var = m_vars.begin(); VarList::const_iterator last_var = m_vars.end(); while ( var != last_var ) { if ( *var ) delete *var; var++; } m_vars.clear(); }