diff options
Diffstat (limited to 'project2/common/options.cpp')
-rw-r--r-- | project2/common/options.cpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/project2/common/options.cpp b/project2/common/options.cpp index 13e189b..b2777fa 100644 --- a/project2/common/options.cpp +++ b/project2/common/options.cpp @@ -125,11 +125,19 @@ Options::find(const Glib::ustring & n) const { return NULL; } -Options::InstanceTarget::InstanceTarget() : - ts(Default) +Options::InstanceTarget::InstanceTarget(const Assigner & a, const Resetter & r) : + ts(Default), + assigner(a), + resetter(r) { } +bool +Options::InstanceTarget::paramRequired() const +{ + return true; +} + void Options::InstanceTarget::consume(const Glib::ustring & p, const VariableType & v) const { @@ -143,3 +151,16 @@ Options::InstanceTarget::consume(const Glib::ustring & p, const VariableType & v } } +void +Options::InstanceTarget::reset() const +{ + ts = Default; + resetter(); +} + +void +Options::InstanceTarget::assign(const VariableType & value) const +{ + assigner(value); +} + |