#include "ValDB.hh"

/*
 * class ValDB
 */

bool ValDB::addEntry(Symbol const &id, dbEntry *ref) {
  return m_entries.add(id, ref);
}

dbEntry *ValDB::getEntry(Symbol const &name) const /* throw(UnknownKey) */ {
  return m_entries[name];
}

void ValDB::clear() {
  while( !empty() ) {
    dbEntry *to_del = m_entries.front();
    m_entries.pop_front();
    delete to_del;
  }
}
