void Parameters::set(const QString &pName, const QString &pValue) { MetricMap::iterator it = _values.find(pName); if (it != _values.end()) { if (it.value() == pValue) return; else it.value() = pValue; } else _values[pName] = pValue; _set(pName, pValue); }
QString Parameters::value(const QString &pName) { MetricMap::iterator it = _values.find(pName); if (it == _values.end()) return QString::null; else return it.value(); }
QString Parameters::parent(const QString &pValue) { for (MetricMap::iterator it = _values.begin(); it != _values.end(); it++) if (it.value() == pValue) return it.key(); return QString::null; }
void Parametersenc::set(const QString &pName, int pValue) { MetricMap::iterator it = _values.find(pName); if ( (it != _values.end()) && (it.value().toInt() == pValue) ) return; _set(pName, pValue); }
void Parametersenc::set(const QString &pName, bool pValue) { MetricMap::iterator it = _values.find(pName); if ( (it != _values.end()) && (it.value() == ((pValue) ? "t" : "f")) ) return; _set(pName, ((pValue) ? QString("t") : QString("f"))); }
bool Parameters::boolean(const QString &pName) { MetricMap::iterator it = _values.find(pName); if (it == _values.end()) return FALSE; else if (it.value() == "t") return TRUE; return FALSE; }