CASM  1.1.0
A Clusters Approach to Statistical Mechanics
EnumInterface.hh
Go to the documentation of this file.
1 #ifndef CASM_EnumInterface
2 #define CASM_EnumInterface
3 
4 #include <string>
5 
7 
8 namespace CASM {
9 
10 class Log;
11 class PrimClex;
12 class ParentInputParser;
13 class jsonParser;
14 
15 namespace Completer {
16 class EnumOption;
17 }
18 
25  public:
28  virtual std::string desc() const = 0;
29 
31  virtual std::string name() const = 0;
32 
62  virtual void run(PrimClex &primclex, jsonParser const &json_options,
63  jsonParser const &cli_options_as_json) const = 0;
64 };
65 
67 jsonParser &to_json(const Completer::EnumOption &enum_opt, jsonParser &json);
68 
71  Log &log, jsonParser const &json_options,
72  jsonParser const &cli_options_as_json);
73 
76 inline std::string dry_run_msg(bool dry_run) {
77  return dry_run ? "(dry run) " : "";
78 }
79 
80 } // namespace CASM
81 
82 #endif
virtual std::string desc() const =0
virtual std::string name() const =0
Enumeration method name (i.e. "ConfigEnumAllOccupations")
virtual void run(PrimClex &primclex, jsonParser const &json_options, jsonParser const &cli_options_as_json) const =0
Definition: Log.hh:48
PrimClex is the top-level data structure for a CASM project.
Definition: PrimClex.hh:55
Base class for cloning.
#define ABSTRACT_CLONEABLE(T)
Main CASM namespace.
Definition: APICommand.hh:8
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
Log & log()
Definition: Log.hh:424
ParentInputParser make_enum_parent_parser(Log &log, jsonParser const &json_options, jsonParser const &cli_options_as_json)
Combine –input / –settings JSON with CLI options.
std::string dry_run_msg(bool dry_run)
PrimClex * primclex
Definition: settings.cc:135