CASM  1.1.0
A Clusters Approach to Statistical Mechanics
query.hh
Go to the documentation of this file.
1 #ifndef CASM_query
2 #define CASM_query
3 
4 #include "casm/app/APICommand.hh"
7 
8 namespace CASM {
9 /*namespace Completer {
10 
11  class QueryOption : public OptionHandlerBase {
12 
13  public:
14 
15  using OptionHandlerBase::selection_path;
16  using OptionHandlerBase::output_path;
17  using OptionHandlerBase::gzip_flag;
18  using OptionHandlerBase::help_opt_vec;
19  using OptionHandlerBase::db_type;
20  using OptionHandlerBase::db_type_opts;
21 
22  QueryOption();
23 
24  bool verbatim_flag() const;
25 
26  const std::vector<std::string> &columns_vec() const;
27 
28  const std::vector<std::string> &new_alias_vec() const;
29 
30  private:
31 
32  void initialize() override;
33 
34  std::vector<std::string> m_columns_vec;
35 
36  std::vector<std::string> m_new_alias_vec;
37 
38  };
39 
40 }*/
41 }
42 
43 namespace CASM {
44 
45 class QueryCommandImplBase;
46 template <typename T>
47 class QueryCommandImpl;
48 
55 class QueryCommand : public APICommand<Completer::QueryOption> {
56  public:
58  template <typename ConfigType>
60 
61  static const std::string name;
62 
63  QueryCommand(const CommandArgs &_args, Completer::QueryOption &_opt);
64 
65  ~QueryCommand();
66 
67  int vm_count_check() const override;
68 
69  int help() const override;
70 
71  int desc() const override;
72 
73  int run() const override;
74 
75  // -- custom --
76 
77  QueryCommandImplBase &impl() const;
78 
79  void print_names(std::ostream &sout) const;
80 
81  private:
82  mutable std::unique_ptr<QueryCommandImplBase> m_impl;
83 };
84 
85 } // namespace CASM
86 
87 #endif
int run() const override
Definition: query.cc:598
QueryCommandImplBase & impl() const
Definition: query.cc:600
static const std::string name
Definition: query.hh:61
std::unique_ptr< QueryCommandImplBase > m_impl
Definition: query.hh:82
int help() const override
Definition: query.cc:594
QueryCommand(const CommandArgs &_args, Completer::QueryOption &_opt)
Definition: query.cc:554
int vm_count_check() const override
Definition: query.cc:560
int desc() const override
Definition: query.cc:596
void print_names(std::ostream &sout) const
Definition: query.cc:620
Defaults used if DataObject type doesn't matter or not given.
Definition: query.cc:106
Main CASM namespace.
Definition: APICommand.hh:8
Data structure holding basic CASM command info.