CASM  1.1.0
A Clusters Approach to Statistical Mechanics
DatabaseHandler.cc
Go to the documentation of this file.
2 #include "casm/clex/PrimClex.hh"
5 
6 namespace CASM {
7 
8 namespace DB {
9 
15  : m_primclex(&_primclex),
16  m_default_db_name(m_primclex->settings().default_database_name()) {
17  jsonDB::insert(*this);
18 }
19 
21 
22 const PrimClex &DatabaseHandler::primclex() const { return *m_primclex; }
23 
26  for (auto &db : m_db) {
27  db.second->close();
28  }
29 }
30 
31 } // namespace DB
32 
33 } // namespace CASM
const PrimClex & primclex() const
Database< T > & db()
Access default Database<T>
void close()
Close all databases.
DatabaseHandler(const PrimClex &_primclex)
PrimClex is the top-level data structure for a CASM project.
Definition: PrimClex.hh:55
Main CASM namespace.
Definition: APICommand.hh:8
static void insert(DatabaseHandler &)
Definition: jsonDatabase.cc:68