CASM  1.1.0
A Clusters Approach to Statistical Mechanics
EnumeratorHandler.cc
Go to the documentation of this file.
3 
4 namespace CASM {
5 
7  : m_set(&set), m_enumerator(make_standard_enumerator_interfaces()) {
8  load_enumerator_plugins(*m_set, std::back_inserter(m_enumerator),
9  std::inserter(m_lib, m_lib.end()));
10 }
11 
12 EnumeratorHandler::~EnumeratorHandler() {
13  // order of deletion matters
14  m_enumerator.clear();
15  m_lib.clear();
16 }
17 
18 namespace {
19 typedef std::insert_iterator<
20  std::map<std::string, std::shared_ptr<RuntimeLibrary> > >
21  runtimelib_it_type;
22 typedef std::insert_iterator<EnumInterfaceVector> enum_it_type;
23 } // namespace
24 
25 template std::pair<enum_it_type, runtimelib_it_type> load_enumerator_plugins(
26  ProjectSettings const &set, enum_it_type enum_it,
27  runtimelib_it_type lib_it);
28 
29 } // namespace CASM
ProjectSettings const * m_set
std::map< std::string, std::shared_ptr< RuntimeLibrary > > m_lib
EnumInterfaceVector m_enumerator
EnumeratorHandler(ProjectSettings const &set)
Main CASM namespace.
Definition: APICommand.hh:8
std::pair< EnumInterfaceVectorInserter, RuntimeLibInserter > load_enumerator_plugins(ProjectSettings const &set, EnumInterfaceVectorInserter enum_it, RuntimeLibInserter lib_it)
Load enumerator plugins from a CASM project.
EnumInterfaceVector make_standard_enumerator_interfaces()
ProjectSettings & set
Definition: settings.cc:137