CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CompositionAxes.hh
Go to the documentation of this file.
1 #ifndef CASM_clex_CompositionAxes
2 #define CASM_clex_CompositionAxes
3 
4 #include <map>
5 #include <set>
6 #include <string>
7 
9 
10 namespace CASM {
11 
16 
19  template <typename IterType>
20  void insert_enumerated(IterType begin, IterType end);
21 
23  void erase_enumerated();
24 
26  void select(std::string key);
27 
29  bool has_current_axes() const { return !curr_key.empty(); }
30 
31  std::map<std::string, CompositionConverter> all_axes;
32  std::set<std::string> enumerated;
33  std::string curr_key;
35 
36  int err_code = 0;
37  std::string err_message;
38 };
39 
40 } // namespace CASM
41 
42 #endif
Convert between number of species per unit cell and parametric composition.
Main CASM namespace.
Definition: APICommand.hh:8
bool has_current_axes() const
True if curr_key is set.
std::set< std::string > enumerated
void select(std::string key)
Set this->curr using key.
CompositionConverter curr
std::map< std::string, CompositionConverter > all_axes
void insert_enumerated(IterType begin, IterType end)
Iterate over list of CompositionConverter and insert each one as an enumerated axes set with a unique...
void erase_enumerated()
Erase all enumerated axes and clear this->enumerated.