mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
First milestone towards flags rewrite --- it builds and the tests pass, but
nothing actually works.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user