CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CLIParse.hh
Go to the documentation of this file.
1 #ifndef CASM_CLIParse
2 #define CASM_CLIParse
3 
4 #include <wordexp.h>
5 
6 #include <string>
7 
8 namespace CASM {
9 
10 class CLIParse {
11  public:
13  CLIParse(int _argc, char **_argv);
14 
16  CLIParse(std::string _args);
17 
18  ~CLIParse();
19 
20  int argc() const { return m_argc; }
21 
22  char **argv() const { return m_argv; }
23 
24  int parse_result() const { return m_parse_result; }
25 
26  private:
27  int m_argc;
28  char **m_argv;
29 
33 
34  bool m_free_p;
35  wordexp_t m_p;
36 };
37 
38 namespace Completer {
39 class OptionHandlerBase;
40 }
41 
44 void parse_args(Completer::OptionHandlerBase &opt, std::string args);
45 } // namespace CASM
46 
47 #endif
int argc() const
Definition: CLIParse.hh:20
int parse_result() const
Definition: CLIParse.hh:24
char ** m_argv
Definition: CLIParse.hh:28
CLIParse(int _argc, char **_argv)
Non-owning.
Definition: CLIParse.cc:11
int m_parse_result
Definition: CLIParse.hh:32
char ** argv() const
Definition: CLIParse.hh:22
wordexp_t m_p
Definition: CLIParse.hh:35
Main CASM namespace.
Definition: APICommand.hh:8
void parse_args(Completer::OptionHandlerBase &opt, std::string args)
Definition: CLIParse.cc:48