CASM  1.1.0
A Clusters Approach to Statistical Mechanics
select.hh
Go to the documentation of this file.
1 #ifndef CASM_select
2 #define CASM_select
3 
4 #include "casm/app/APICommand.hh"
7 
8 namespace CASM {
9 /*namespace Completer {
10 
12  class SelectOption : public OptionHandlerBase {
13 
14  public:
15 
16  using OptionHandlerBase::help_opt_vec;
17  using OptionHandlerBase::selection_paths;
18  using OptionHandlerBase::output_path;
19  using OptionHandlerBase::db_type;
20  using OptionHandlerBase::db_type_opts;
21 
22  SelectOption();
23 
24  const std::vector<std::string> &criteria_vec() const;
25 
26  private:
27 
28  void initialize() override;
29 
30  // vector necessary to allow --set/--set-on/--set-off with or without an
31 argument std::vector<std::string> m_criteria_vec;
32 
33  };
34 
35 }*/
36 }
37 
38 namespace CASM {
39 
40 class SelectCommandImplBase;
41 template <typename T>
42 class SelectCommandImpl;
43 
50 class SelectCommand : public APICommand<Completer::SelectOption> {
51  public:
53  template <typename ConfigType>
55 
56  static const std::string name;
57 
59 
61 
62  int vm_count_check() const override;
63 
64  int help() const override;
65 
66  int desc() const override;
67 
68  int run() const override;
69 
70  // -- custom --
71 
72  SelectCommandImplBase &impl() const;
73 
74  void print_names(std::ostream &sout) const;
75 
76  private:
77  mutable std::unique_ptr<SelectCommandImplBase> m_impl;
78 };
79 } // namespace CASM
80 
81 #endif
SelectCommandImplBase & impl() const
Definition: select.cc:490
std::unique_ptr< SelectCommandImplBase > m_impl
Definition: select.hh:77
int help() const override
Definition: select.cc:484
void print_names(std::ostream &sout) const
Definition: select.cc:510
int desc() const override
Definition: select.cc:486
static const std::string name
Definition: select.hh:56
SelectCommand(const CommandArgs &_args, Completer::SelectOption &_opt)
Definition: select.cc:418
int vm_count_check() const override
Definition: select.cc:424
int run() const override
Definition: select.cc:488
Defaults used if DataObject type doesn't matter or not given.
Definition: select.cc:66
Main CASM namespace.
Definition: APICommand.hh:8
Data structure holding basic CASM command info.