CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <DatabaseHandler.hh>
Provides access to all databases.
Definition at line 28 of file DatabaseHandler.hh.
Classes | |
class | PropDBKey |
Public Member Functions | |
DatabaseHandler (const PrimClex &_primclex) | |
~DatabaseHandler () | |
const PrimClex & | primclex () const |
template<typename T > | |
ValDatabase< T > & | generic_db () |
Access default Database<T> More... | |
template<typename T > | |
const ValDatabase< T > & | generic_db () const |
Access default Database<T> More... | |
template<typename T > | |
const ValDatabase< T > & | const_generic_db () |
Access default Database<T> More... | |
template<typename T > | |
Database< T > & | db () |
Access default Database<T> More... | |
template<typename T > | |
const Database< T > & | db () const |
Access default Database<T> More... | |
template<typename T > | |
const Database< T > & | const_db () |
Access default Database<T> More... | |
template<typename T > | |
PropertiesDatabase & | db_props (std::string calc_type) |
Access default PropertiesDatabase. More... | |
template<typename T > | |
const PropertiesDatabase & | db_props (std::string calc_type) const |
Access default PropertiesDatabase. More... | |
template<typename T > | |
const PropertiesDatabase & | const_db_props (std::string calc_type) |
Access default PropertiesDatabase. More... | |
void | close () |
Close all databases. More... | |
template<typename T > | |
void | insert (std::string db_name, std::unique_ptr< DatabaseBase > &&value) |
Insert a Database. More... | |
template<typename T > | |
void | insert_props (std::string db_name, std::string calc_type, std::unique_ptr< PropertiesDatabase > &&value) |
Insert a PropertiesDatabase. More... | |
template<typename T > | |
ValDatabase< T > & | generic_db (std::string db_name) |
Access specified ValDatabase<T> More... | |
template<typename T > | |
const ValDatabase< T > & | generic_db (std::string db_name) const |
Access specified ValDatabase<T> More... | |
template<typename T > | |
const ValDatabase< T > & | const_generic_db (std::string db_name) |
Access specified ValDatabase<T> More... | |
template<typename T > | |
Database< T > & | db (std::string db_name) |
Access specified Database<T> More... | |
template<typename T > | |
const Database< T > & | db (std::string db_name) const |
Access specified Database<T> More... | |
template<typename T > | |
const Database< T > & | const_db (std::string db_name) |
Access specified Database<T> More... | |
template<typename T > | |
PropertiesDatabase & | db_props (std::string db_name, std::string calc_type) |
Access specified PropertiesDatabase. More... | |
template<typename T > | |
const PropertiesDatabase & | db_props (std::string db_name, std::string calc_type) const |
Access specified PropertiesDatabase. More... | |
template<typename T > | |
const PropertiesDatabase & | const_db_props (std::string db_name, std::string calc_type) |
Access specified PropertiesDatabase. More... | |
Private Types | |
typedef std::map< std::pair< std::string, std::string >, std::unique_ptr< DatabaseBase > > | map_type |
typedef std::map< PropDBKey, std::unique_ptr< PropertiesDatabase > > | props_map_type |
Private Member Functions | |
template<typename T > | |
map_type::iterator | _find (std::string db_name) const |
template<typename T > | |
props_map_type::iterator | _find_props (std::string db_name, std::string calc_type) const |
template<typename T > | |
void | _no_database_error (std::string db_name) const |
template<typename T > | |
void | _no_props_database_error (std::string db_name, std::string calc_type) const |
Private Attributes | |
const PrimClex * | m_primclex |
std::string | m_default_db_name |
map_type | m_db |
props_map_type | m_db_props |
|
private |
Definition at line 134 of file DatabaseHandler.hh.
|
private |
Definition at line 159 of file DatabaseHandler.hh.
CASM::DB::DatabaseHandler::DatabaseHandler | ( | const PrimClex & | _primclex | ) |
Constructor
Definition at line 14 of file DatabaseHandler.cc.
CASM::DB::DatabaseHandler::~DatabaseHandler | ( | ) |
Definition at line 20 of file DatabaseHandler.cc.
|
private |
Definition at line 153 of file DatabaseHandler_impl.hh.
|
private |
Definition at line 164 of file DatabaseHandler_impl.hh.
|
private |
Definition at line 175 of file DatabaseHandler_impl.hh.
|
private |
Definition at line 183 of file DatabaseHandler_impl.hh.
void CASM::DB::DatabaseHandler::close | ( | ) |
Close all databases.
Definition at line 25 of file DatabaseHandler.cc.
const Database< T > & CASM::DB::DatabaseHandler::const_db |
Access default Database<T>
Definition at line 62 of file DatabaseHandler_impl.hh.
const Database< T > & CASM::DB::DatabaseHandler::const_db | ( | std::string | db_name | ) |
Access specified Database<T>
Definition at line 123 of file DatabaseHandler_impl.hh.
const PropertiesDatabase & CASM::DB::DatabaseHandler::const_db_props | ( | std::string | calc_type | ) |
Access default PropertiesDatabase.
Definition at line 81 of file DatabaseHandler_impl.hh.
const PropertiesDatabase & CASM::DB::DatabaseHandler::const_db_props | ( | std::string | db_name, |
std::string | calc_type | ||
) |
Access specified PropertiesDatabase.
Definition at line 146 of file DatabaseHandler_impl.hh.
const ValDatabase< T > & CASM::DB::DatabaseHandler::const_generic_db |
Access default Database<T>
Definition at line 44 of file DatabaseHandler_impl.hh.
const ValDatabase< T > & CASM::DB::DatabaseHandler::const_generic_db | ( | std::string | db_name | ) |
Access specified ValDatabase<T>
Access specified Database<T>
Definition at line 102 of file DatabaseHandler_impl.hh.
Database< T > & CASM::DB::DatabaseHandler::db |
Access default Database<T>
Definition at line 50 of file DatabaseHandler_impl.hh.
const Database< T > & CASM::DB::DatabaseHandler::db |
Access default Database<T>
Definition at line 56 of file DatabaseHandler_impl.hh.
Database< T > & CASM::DB::DatabaseHandler::db | ( | std::string | db_name | ) |
Access specified Database<T>
Definition at line 109 of file DatabaseHandler_impl.hh.
const Database< T > & CASM::DB::DatabaseHandler::db | ( | std::string | db_name | ) | const |
Access specified Database<T>
Definition at line 116 of file DatabaseHandler_impl.hh.
PropertiesDatabase & CASM::DB::DatabaseHandler::db_props | ( | std::string | calc_type | ) |
Access default PropertiesDatabase.
Definition at line 68 of file DatabaseHandler_impl.hh.
const PropertiesDatabase & CASM::DB::DatabaseHandler::db_props | ( | std::string | calc_type | ) | const |
Access default PropertiesDatabase.
Definition at line 74 of file DatabaseHandler_impl.hh.
PropertiesDatabase & CASM::DB::DatabaseHandler::db_props | ( | std::string | db_name, |
std::string | calc_type | ||
) |
Access specified PropertiesDatabase.
Definition at line 130 of file DatabaseHandler_impl.hh.
const PropertiesDatabase & CASM::DB::DatabaseHandler::db_props | ( | std::string | db_name, |
std::string | calc_type | ||
) | const |
Access specified PropertiesDatabase.
Definition at line 138 of file DatabaseHandler_impl.hh.
ValDatabase< T > & CASM::DB::DatabaseHandler::generic_db |
Access default Database<T>
Definition at line 32 of file DatabaseHandler_impl.hh.
const ValDatabase< T > & CASM::DB::DatabaseHandler::generic_db |
Access default Database<T>
Definition at line 38 of file DatabaseHandler_impl.hh.
ValDatabase< T > & CASM::DB::DatabaseHandler::generic_db | ( | std::string | db_name | ) |
Access specified ValDatabase<T>
Access specified Database<T>
Definition at line 88 of file DatabaseHandler_impl.hh.
const ValDatabase< T > & CASM::DB::DatabaseHandler::generic_db | ( | std::string | db_name | ) | const |
Access specified ValDatabase<T>
Access specified Database<T>
Definition at line 95 of file DatabaseHandler_impl.hh.
void CASM::DB::DatabaseHandler::insert | ( | std::string | db_name, |
std::unique_ptr< DatabaseBase > && | value | ||
) |
Insert a Database.
Definition at line 16 of file DatabaseHandler_impl.hh.
void CASM::DB::DatabaseHandler::insert_props | ( | std::string | db_name, |
std::string | calc_type, | ||
std::unique_ptr< PropertiesDatabase > && | value | ||
) |
Insert a PropertiesDatabase.
Definition at line 23 of file DatabaseHandler_impl.hh.
const PrimClex & CASM::DB::DatabaseHandler::primclex | ( | ) | const |
Definition at line 22 of file DatabaseHandler.cc.
|
mutableprivate |
Definition at line 181 of file DatabaseHandler.hh.
|
mutableprivate |
Definition at line 185 of file DatabaseHandler.hh.
|
private |
Definition at line 177 of file DatabaseHandler.hh.
|
private |
Definition at line 175 of file DatabaseHandler.hh.