1 #ifndef CASM_DatabaseTypes
2 #define CASM_DatabaseTypes
4 #include <boost/preprocessor/seq/enum.hpp>
5 #include <boost/preprocessor/seq/for_each.hpp>
13 #define CASM_DB_NONCONFIG_TYPES (Supercell)
14 #define CASM_DB_CONFIG_TYPES (Configuration)
22 #define CASM_DB_TYPES CASM_DB_NONCONFIG_TYPES CASM_DB_CONFIG_TYPES
41 std::enable_if<CASM_TMP::has_type<T, ConfigTypeTuple>::value, T>;
45 std::enable_if<!CASM_TMP::has_type<T, ConfigTypeTuple>::value, T>;
51 return CASM_TMP::for_each_type<DataObjectTypeTuple, F>(f);
56 return CASM_TMP::for_type<DataObjectTypeTuple, F>(
name, f);
61 return CASM_TMP::for_type_short<DataObjectTypeTuple, F>(short_name, f);
65 const std::set<std::string> &
types();
72 return CASM_TMP::for_each_type<ConfigTypeTuple, F>(f);
77 return CASM_TMP::for_type<ConfigTypeTuple, F>(
name, f);
82 return CASM_TMP::for_type_short<ConfigTypeTuple, F>(short_name, f);
#define CASM_DB_CONFIG_TYPES
PrimClex is the top-level data structure for a CASM project.
std::string scelname(const Structure &prim, const Lattice &superlat)
Make supercell name name [deprecated].
std::tuple< BOOST_PP_SEQ_ENUM(CASM_DB_TYPES)> DataObjectTypeTuple
void for_type_short(std::string short_name, F f)
std::enable_if<!CASM_TMP::has_type< T, ConfigTypeTuple >::value, T > IfNotConfigType
Index config_count(std::string scelname, const PrimClex &primclex)
Total number of configs of all types in a supercell.
const std::set< std::string > & types()
std::set of all QueryTraits<DataObject>::name
Index config_data_count(std::string scelname, const PrimClex &primclex)
Total number of configs w/ data or files of all types in a supercell.
std::tuple< BOOST_PP_SEQ_ENUM(CASM_DB_CONFIG_TYPES)> ConfigTypeTuple
const std::set< std::string > & config_types()
std::set of all QueryTraits<ConfigType>::name
void for_config_type_short(std::string short_name, F f)
const std::set< std::string > & types_short()
std::set of all QueryTraits<DataObject>::short_name
void for_config_type(std::string name, F f)
void for_type(std::string name, F f)
const std::set< std::string > & config_types_short()
std::set of all QueryTraits<ConfigType>::short_name
std::enable_if< CASM_TMP::has_type< T, ConfigTypeTuple >::value, T > IfConfigType
void for_each_config_type(F f)
Index config_calculated_count(std::string scelname, const PrimClex &primclex)
Total number of calculated configs of all types in a supercell.
GenericDatumFormatter< std::string, DataObject > name()
INDEX_TYPE Index
For long integer indexing: