59 CmdOption(
const T& _val) : val_(_val), valid_(
true), enabled_(
false) { }
60 CmdOption() : val_(T()),valid_(
false), enabled_(
false) { }
63 bool is_valid(
void)
const {
return valid_; }
64 bool has_value(
void)
const {
return is_valid(); }
67 bool is_enabled()
const {
return enabled_; }
69 void enable() { enabled_ =
true; }
79 operator T ()
const {
return val_; }
82 operator T* ()
const {
return is_valid() ? &val_ : NULL; }
97 template <
typename T >
98 std::ostream& operator << ( std::ostream& _os, CmdOption<T>& _opt )
Definition: CmdOption.hh:53