libutil++  1.9.3
 All Classes Functions Variables
CommandLineOption.h
1 /*
2 ** libutil++
3 ** $Id: CommandLineOption.h 1653 2016-02-28 19:54:59Z sella $
4 ** Copyright (c) 2011-2016 Digital Genesis, LLC. All Rights Reserved.
5 ** Released under the LGPL Version 2.1 License.
6 ** http://www.digitalgenesis.com
7 */
8 
9 #ifndef __libutilxx__sella__util__CommandLineOption_H__
10 #define __libutilxx__sella__util__CommandLineOption_H__
11 
12 #include "../../common.h"
13 
14 #include <string>
15 
16 namespace sella {
17  namespace util {
18  class CommandLineOption;
19  }
20 }
21 
23  public:
24  CommandLineOption(char opt, const std::string &option, const std::string &usage, const std::string &label = "", const std::string &value = "") throw ();
25  CommandLineOption() throw ();
26 
27  CommandLineOption(const CommandLineOption &copy) throw ();
28  virtual ~CommandLineOption() throw ();
29 
30  public:
31  CommandLineOption & operator = (const CommandLineOption &other) throw ();
32 
33  public:
34  void setOpt(char opt) throw ();
35  void setOption(const std::string &option) throw ();
36 
37  void setUsage(const std::string &usage) throw ();
38  void setValue(const std::string &value) throw ();
39 
40  void setTags(const std::string &tags) throw ();
41 
42  void setArgumented(bool value) throw ();
43 
44  public:
45  char getOpt() const throw ();
46  const std::string & getOption() const throw ();
47 
48  const std::string & getUsage() const throw ();
49  const std::string & getValue() const throw ();
50 
51  const std::string & getTags() const throw ();
52 
53  bool getArgumented() const throw ();
54 
55  private:
56  char opt;
57  std::string option;
58 
59  std::string usage;
60  std::string value;
61 
62  std::string tags;
63 
64  bool argumented;
65 };
66 
67 #endif
68 
69 /*
70 ** vim: noet ts=3 sw=3
71 */