First milestone towards flags rewrite --- it builds and the tests pass, but

nothing actually works.
This commit is contained in:
David Given
2019-07-02 23:06:40 +02:00
parent bba2f856a5
commit a1c207cb8f
32 changed files with 247 additions and 79 deletions

View File

@@ -58,15 +58,21 @@ public:
DataSpecFlag(const std::vector<std::string>& names, const std::string helptext,
const std::string& defaultValue):
Flag(names, helptext),
value(defaultValue)
_value(defaultValue)
{}
bool hasArgument() const { return true; }
const std::string defaultValueAsString() const { return value; }
void set(const std::string& value) { this->value.set(value); }
const DataSpec& get() const
{ checkInitialised(); return _value; }
public:
DataSpec value;
operator const DataSpec& () const
{ return get(); }
bool hasArgument() const { return true; }
const std::string defaultValueAsString() const { return _value; }
void set(const std::string& value) { _value.set(value); }
private:
DataSpec _value;
};
#endif