CASM  1.1.0
A Clusters Approach to Statistical Mechanics
ConfigData_impl.hh
Go to the documentation of this file.
1 #ifndef CASM_DB_ConfigData_impl
2 #define CASM_DB_ConfigData_impl
3 
5 #include "casm/clex/PrimClex.hh"
7 
8 namespace CASM {
9 namespace DB {
10 
11 // --- class ConfigData ---
12 template <typename ConfigType>
14  : m_primclex(_primclex) {
15  m_db_props_func = [&]() -> PropertiesDatabase & {
16  return primclex().template db_props<ConfigType>(
17  primclex().settings().default_clex().calctype);
18  };
19 }
20 
21 template <typename ConfigType>
23  return primclex().template db<ConfigType>();
24 }
25 
26 // template<typename ConfigType>
27 // PropertiesDatabase &ConfigData<ConfigType>::db_props() const {
28 // return primclex().template db_props<ConfigType>(
29 // primclex().settings().default_clex().calctype);
30 //}
31 
32 } // namespace DB
33 } // namespace CASM
34 
35 #endif
Database< ConfigType > & db_config() const
ConfigData(const PrimClex &_primclex, TypeTag< ConfigType >)
std::function< PropertiesDatabase &()> m_db_props_func
Definition: ConfigData.hh:192
const PrimClex & primclex() const
Definition: ConfigData.hh:152
PrimClex is the top-level data structure for a CASM project.
Definition: PrimClex.hh:55
Main CASM namespace.
Definition: APICommand.hh:8
pair_type calctype
Definition: settings.cc:143