CASM  1.1.0
A Clusters Approach to Statistical Mechanics
rm.hh
Go to the documentation of this file.
1 #ifndef CASM_rm
2 #define CASM_rm
3 
4 #include "casm/app/APICommand.hh"
6 
7 namespace CASM {
8 /* namespace Completer {
9 
10  class RmOption : public OptionHandlerBase {
11 
12  public:
13 
14  using OptionHandlerBase::selection_path;
15  using OptionHandlerBase::name_strs;
16  using OptionHandlerBase::db_type;
17  using OptionHandlerBase::db_type_opts;
18  using OptionHandlerBase::dry_run;
19 
20  RmOption();
21 
22  bool force() const;
23 
24  bool data() const;
25 
26  private:
27 
28  void initialize() override;
29 
30  };
31  }
32 */
33 
34 class RmCommandImplBase;
35 template <typename T>
36 class RmCommandImpl;
37 
40 class RmCommand : public APICommand<Completer::RmOption> {
41  public:
43  template <typename ConfigType>
45 
46  static const std::string name;
47 
48  RmCommand(const CommandArgs &_args, Completer::RmOption &_opt);
49 
50  ~RmCommand();
51 
52  int vm_count_check() const override;
53 
54  int help() const override;
55 
56  int desc() const override;
57 
58  int run() const override;
59 
60  // -- custom --
61 
62  RmCommandImplBase &impl() const;
63 
64  void print_names(std::ostream &sout) const;
65 
66  void print_config_names(std::ostream &sout) const;
67 
68  private:
69  mutable std::unique_ptr<RmCommandImplBase> m_impl;
70 };
71 
72 } // namespace CASM
73 
74 #endif
RmCommandImplBase & impl() const
Definition: rm.cc:184
int desc() const override
Definition: rm.cc:180
int run() const override
Definition: rm.cc:182
int help() const override
Definition: rm.cc:178
static const std::string name
Definition: rm.hh:46
void print_config_names(std::ostream &sout) const
Definition: rm.cc:212
void print_names(std::ostream &sout) const
Definition: rm.cc:204
~RmCommand()
Definition: rm.cc:166
RmCommand(const CommandArgs &_args, Completer::RmOption &_opt)
Definition: rm.cc:163
int vm_count_check() const override
Definition: rm.cc:168
std::unique_ptr< RmCommandImplBase > m_impl
Definition: rm.hh:69
Defaults used if DataObject type doesn't matter or not given.
Definition: rm.cc:69
Main CASM namespace.
Definition: APICommand.hh:8
Data structure holding basic CASM command info.