00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __libutilxx__sella__util__CommandLineOption_H__
00010 #define __libutilxx__sella__util__CommandLineOption_H__
00011
00012 #include "../../common.h"
00013
00014 #include <string>
00015
00016 namespace sella {
00017 namespace util {
00018 class CommandLineOption;
00019 }
00020 }
00021
00022 class sella::util::CommandLineOption {
00023 public:
00024 CommandLineOption(char opt, const std::string &option, const std::string &usage, const std::string &label = "", const std::string &value = "") throw ();
00025 CommandLineOption() throw ();
00026
00027 CommandLineOption(const CommandLineOption ©) throw ();
00028 virtual ~CommandLineOption() throw ();
00029
00030 public:
00031 CommandLineOption & operator = (const CommandLineOption &other) throw ();
00032
00033 public:
00034 void setOpt(char opt) throw ();
00035 void setOption(const std::string &option) throw ();
00036
00037 void setUsage(const std::string &usage) throw ();
00038 void setValue(const std::string &value) throw ();
00039
00040 void setTags(const std::string &tags) throw ();
00041
00042 void setArgumented(bool value) throw ();
00043
00044 public:
00045 char getOpt() const throw ();
00046 const std::string & getOption() const throw ();
00047
00048 const std::string & getUsage() const throw ();
00049 const std::string & getValue() const throw ();
00050
00051 const std::string & getTags() const throw ();
00052
00053 bool getArgumented() const throw ();
00054
00055 private:
00056 char opt;
00057 std::string option;
00058
00059 std::string usage;
00060 std::string value;
00061
00062 std::string tags;
00063
00064 bool argumented;
00065 };
00066
00067 #endif
00068
00069
00070
00071