|
@@ -148,6 +148,19 @@ public:
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ const Values& get(const std::string& selector_name) const
|
|
|
+ {
|
|
|
+ SelectorValues::const_iterator it = _values.find(selector_name);
|
|
|
+
|
|
|
+ if (it != _values.end()) {
|
|
|
+ assert(it->second.size() == 1);
|
|
|
+
|
|
|
+ return it->second.begin()->second;
|
|
|
+ } else {
|
|
|
+ assert(false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
void observe(double time, const common::Model < common::DoubleTime >* model,
|
|
|
const std::string& selector_name, unsigned int variable_index)
|
|
|
{
|
|
@@ -210,7 +223,6 @@ public:
|
|
|
void selector(const std::string& name, const Selector& chain)
|
|
|
{
|
|
|
_selectors[name] = chain;
|
|
|
- _values[name] = VariableValues();
|
|
|
}
|
|
|
|
|
|
const SelectorValues& values() const
|
|
@@ -219,8 +231,8 @@ public:
|
|
|
private:
|
|
|
typedef std::map < std::string, Selector > Selectors;
|
|
|
|
|
|
- Selectors _selectors;
|
|
|
- SelectorValues _values;
|
|
|
+ Selectors _selectors;
|
|
|
+ SelectorValues _values;
|
|
|
const artis::common::Model < Time >* _model;
|
|
|
};
|
|
|
|