|
@@ -152,12 +152,12 @@ public:
|
|
|
/// data to the given reference and returning true
|
|
|
///
|
|
|
//@{
|
|
|
- virtual bool getValue(long int& t);
|
|
|
- virtual bool getValue(double& t);
|
|
|
- virtual bool getValue(bool& t);
|
|
|
- virtual bool getValue(std::string& t);
|
|
|
- virtual bool getValue(std::vector<ConstElementPtr>& t);
|
|
|
- virtual bool getValue(std::map<std::string, ConstElementPtr>& t);
|
|
|
+ virtual bool getValue(long int& t) const;
|
|
|
+ virtual bool getValue(double& t) const;
|
|
|
+ virtual bool getValue(bool& t) const;
|
|
|
+ virtual bool getValue(std::string& t) const;
|
|
|
+ virtual bool getValue(std::vector<ConstElementPtr>& t) const;
|
|
|
+ virtual bool getValue(std::map<std::string, ConstElementPtr>& t) const;
|
|
|
//@}
|
|
|
|
|
|
///
|
|
@@ -253,7 +253,7 @@ public:
|
|
|
/// \param identifier The identifier of the element to find
|
|
|
/// \param t Reference to store the resulting ElementPtr, if found.
|
|
|
/// \return true if the element was found, false if not.
|
|
|
- virtual bool find(const std::string& identifier, ConstElementPtr t) const;
|
|
|
+ virtual bool find(const std::string& identifier, ConstElementPtr& t) const;
|
|
|
//@}
|
|
|
|
|
|
|
|
@@ -378,7 +378,7 @@ public:
|
|
|
IntElement(long int v) : Element(integer), i(v) { }
|
|
|
long int intValue() const { return (i); }
|
|
|
using Element::getValue;
|
|
|
- bool getValue(long int& t) { t = i; return (true); }
|
|
|
+ bool getValue(long int& t) const { t = i; return (true); }
|
|
|
using Element::setValue;
|
|
|
bool setValue(const long int v) { i = v; return (true); }
|
|
|
void toJSON(std::ostream& ss) const;
|
|
@@ -392,7 +392,7 @@ public:
|
|
|
DoubleElement(double v) : Element(real), d(v) {};
|
|
|
double doubleValue() const { return (d); }
|
|
|
using Element::getValue;
|
|
|
- bool getValue(double& t) { t = d; return (true); }
|
|
|
+ bool getValue(double& t) const { t = d; return (true); }
|
|
|
using Element::setValue;
|
|
|
bool setValue(const double v) { d = v; return (true); }
|
|
|
void toJSON(std::ostream& ss) const;
|
|
@@ -406,7 +406,7 @@ public:
|
|
|
BoolElement(const bool v) : Element(boolean), b(v) {};
|
|
|
bool boolValue() const { return (b); }
|
|
|
using Element::getValue;
|
|
|
- bool getValue(bool& t) { t = b; return (true); }
|
|
|
+ bool getValue(bool& t) const { t = b; return (true); }
|
|
|
using Element::setValue;
|
|
|
bool setValue(const bool v) { b = v; return (true); }
|
|
|
void toJSON(std::ostream& ss) const;
|
|
@@ -427,7 +427,7 @@ public:
|
|
|
StringElement(std::string v) : Element(string), s(v) {};
|
|
|
std::string stringValue() const { return (s); }
|
|
|
using Element::getValue;
|
|
|
- bool getValue(std::string& t) { t = s; return (true); }
|
|
|
+ bool getValue(std::string& t) const { t = s; return (true); }
|
|
|
using Element::setValue;
|
|
|
bool setValue(const std::string& v) { s = v; return (true); }
|
|
|
void toJSON(std::ostream& ss) const;
|
|
@@ -441,7 +441,7 @@ public:
|
|
|
ListElement() : Element(list) {}
|
|
|
const std::vector<ConstElementPtr>& listValue() const { return (l); }
|
|
|
using Element::getValue;
|
|
|
- bool getValue(std::vector<ConstElementPtr>& t) {
|
|
|
+ bool getValue(std::vector<ConstElementPtr>& t) const {
|
|
|
t = l;
|
|
|
return (true);
|
|
|
}
|
|
@@ -474,7 +474,7 @@ public:
|
|
|
return (m);
|
|
|
}
|
|
|
using Element::getValue;
|
|
|
- bool getValue(std::map<std::string, ConstElementPtr>& t) {
|
|
|
+ bool getValue(std::map<std::string, ConstElementPtr>& t) const {
|
|
|
t = m;
|
|
|
return (true);
|
|
|
}
|
|
@@ -507,7 +507,7 @@ public:
|
|
|
// returns true if found, or false if not found (either because
|
|
|
// it doesnt exist or one of the elements in the path is not
|
|
|
// a MapElement)
|
|
|
- bool find(const std::string& id, ConstElementPtr t) const;
|
|
|
+ bool find(const std::string& id, ConstElementPtr& t) const;
|
|
|
|
|
|
bool equals(const Element& other) const;
|
|
|
};
|