+ fix clang warning: -Woverloaded-virtual

This commit is contained in:
wmayer 2015-10-02 20:42:16 +02:00
parent 4b00fe91ab
commit e4768c1c75
12 changed files with 36 additions and 36 deletions

View File

@ -272,7 +272,7 @@ void DocumentObject::setExpression(const ObjectIdentifier &path, boost::shared_p
const PropertyExpressionEngine::ExpressionInfo DocumentObject::getExpression(const ObjectIdentifier &path) const
{
boost::any value = ExpressionEngine.getValue(path);
boost::any value = ExpressionEngine.getPathValue(path);
if (value.type() == typeid(PropertyExpressionEngine::ExpressionInfo))
return boost::any_cast<PropertyExpressionEngine::ExpressionInfo>(value);

View File

@ -1007,7 +1007,7 @@ Expression * VariableExpression::eval() const
if (!parent->isDerivedFrom(App::DocumentObject::getClassTypeId()))
throw ExpressionError("Property must belong to a document object.");
boost::any value = prop->getValue(var);
boost::any value = prop->getPathValue(var);
if (value.type() == typeid(Quantity)) {
Quantity qvalue = boost::any_cast<Quantity>(value);

View File

@ -83,12 +83,12 @@ void Property::setContainer(PropertyContainer *Father)
father = Father;
}
void Property::setValue(const ObjectIdentifier &path, const boost::any &value)
void Property::setPathValue(const ObjectIdentifier &path, const boost::any &value)
{
path.setValue(value);
}
const boost::any Property::getValue(const ObjectIdentifier &path) const
const boost::any Property::getPathValue(const ObjectIdentifier &path) const
{
return path.getValue();
}

View File

@ -88,10 +88,10 @@ public:
PropertyContainer *getContainer(void) const {return father;}
/// Set value of property
virtual void setValue(const App::ObjectIdentifier & path, const boost::any & value);
virtual void setPathValue(const App::ObjectIdentifier & path, const boost::any & value);
/// Get value of property
virtual const boost::any getValue(const App::ObjectIdentifier & path) const;
virtual const boost::any getPathValue(const App::ObjectIdentifier & path) const;
/// Convert p to a canonical representation of it
virtual const App::ObjectIdentifier canonicalPath(const App::ObjectIdentifier & p) const;

View File

@ -284,7 +284,7 @@ void PropertyExpressionEngine::slotObjectRenamed(const DocumentObject &obj)
* @return Expression for \a path, or empty boost::any if not found.
*/
const boost::any PropertyExpressionEngine::getValue(const App::ObjectIdentifier & path) const
const boost::any PropertyExpressionEngine::getPathValue(const App::ObjectIdentifier & path) const
{
// Get a canonical path
ObjectIdentifier usePath(canonicalPath(path));
@ -310,7 +310,7 @@ void PropertyExpressionEngine::setValue(const ObjectIdentifier & path, boost::sh
const Property * prop = usePath.getProperty();
// Try to access value; it should trigger an exception if it is not supported, or if the path is invalid
prop->getValue(usePath);
prop->getPathValue(usePath);
if (expr) {
std::string error = validateExpression(usePath, expr);
@ -486,7 +486,7 @@ DocumentObjectExecReturn *App::PropertyExpressionEngine::execute()
#endif
/* Set value of property */
prop->setValue(*it, e->getValueAsAny());
prop->setPathValue(*it, e->getValueAsAny());
++it;
}

View File

@ -93,7 +93,7 @@ public:
void setValue(const App::ObjectIdentifier &path, boost::shared_ptr<App::Expression> expr, const char * comment = 0);
const boost::any getValue(const App::ObjectIdentifier & path) const;
const boost::any getPathValue(const App::ObjectIdentifier & path) const;
DocumentObjectExecReturn * execute();

View File

@ -133,7 +133,7 @@ void PropertyInteger::Paste(const Property &from)
hasSetValue();
}
void PropertyInteger::setValue(const ObjectIdentifier &path, const boost::any &value)
void PropertyInteger::setPathValue(const ObjectIdentifier &path, const boost::any &value)
{
verifyPath(path);
@ -481,7 +481,7 @@ void PropertyEnumeration::Paste(const Property &from)
hasSetValue();
}
void PropertyEnumeration::setValue(const ObjectIdentifier &path, const boost::any &value)
void PropertyEnumeration::setPathValue(const ObjectIdentifier &path, const boost::any &value)
{
verifyPath(path);
@ -959,7 +959,7 @@ void PropertyFloat::Paste(const Property &from)
hasSetValue();
}
void PropertyFloat::setValue(const ObjectIdentifier &path, const boost::any &value)
void PropertyFloat::setPathValue(const ObjectIdentifier &path, const boost::any &value)
{
verifyPath(path);
@ -971,7 +971,7 @@ void PropertyFloat::setValue(const ObjectIdentifier &path, const boost::any &val
throw bad_cast();
}
const boost::any PropertyFloat::getValue(const ObjectIdentifier &path) const
const boost::any PropertyFloat::getPathValue(const ObjectIdentifier &path) const
{
verifyPath(path);
return _dValue;
@ -1347,12 +1347,12 @@ unsigned int PropertyString::getMemSize (void) const
return static_cast<unsigned int>(_cValue.size());
}
void PropertyString::setValue(const ObjectIdentifier &path, const boost::any &value)
void PropertyString::setPathValue(const ObjectIdentifier &path, const boost::any &value)
{
verifyPath(path);
}
const boost::any PropertyString::getValue(const ObjectIdentifier &path) const
const boost::any PropertyString::getPathValue(const ObjectIdentifier &path) const
{
verifyPath(path);
return _cValue;
@ -1906,7 +1906,7 @@ void PropertyBool::Paste(const Property &from)
hasSetValue();
}
void PropertyBool::setValue(const ObjectIdentifier &path, const boost::any &value)
void PropertyBool::setPathValue(const ObjectIdentifier &path, const boost::any &value)
{
verifyPath(path);
@ -1922,7 +1922,7 @@ void PropertyBool::setValue(const ObjectIdentifier &path, const boost::any &valu
throw bad_cast();
}
const boost::any PropertyBool::getValue(const ObjectIdentifier &path) const
const boost::any PropertyBool::getPathValue(const ObjectIdentifier &path) const
{
verifyPath(path);

View File

@ -77,8 +77,8 @@ public:
virtual unsigned int getMemSize (void) const{return sizeof(long);}
virtual void setValue(const App::ObjectIdentifier & path, const boost::any & value);
virtual const boost::any getValue(const App::ObjectIdentifier & path) const { return _lValue; }
virtual void setPathValue(const App::ObjectIdentifier & path, const boost::any & value);
virtual const boost::any getPathValue(const App::ObjectIdentifier & path) const { return _lValue; }
protected:
long _lValue;
@ -198,8 +198,8 @@ public:
virtual Property * Copy(void) const;
virtual void Paste(const Property &from);
virtual void setValue(const App::ObjectIdentifier & path, const boost::any & value);
virtual const boost::any getValue(const App::ObjectIdentifier & path) const { return _enum; }
virtual void setPathValue(const App::ObjectIdentifier & path, const boost::any & value);
virtual const boost::any getPathValue(const App::ObjectIdentifier & path) const { return _enum; }
private:
Enumeration _enum;
@ -459,8 +459,8 @@ public:
virtual unsigned int getMemSize (void) const{return sizeof(double);}
void setValue(const App::ObjectIdentifier &path, const boost::any &value);
const boost::any getValue(const App::ObjectIdentifier &path) const;
void setPathValue(const App::ObjectIdentifier &path, const boost::any &value);
const boost::any getPathValue(const App::ObjectIdentifier &path) const;
protected:
double _dValue;
@ -614,8 +614,8 @@ public:
virtual void Paste(const Property &from);
virtual unsigned int getMemSize (void) const;
void setValue(const App::ObjectIdentifier &path, const boost::any &value);
const boost::any getValue(const App::ObjectIdentifier &path) const;
void setPathValue(const App::ObjectIdentifier &path, const boost::any &value);
const boost::any getPathValue(const App::ObjectIdentifier &path) const;
private:
std::string _cValue;
@ -768,8 +768,8 @@ public:
virtual unsigned int getMemSize (void) const{return sizeof(bool);}
void setValue(const App::ObjectIdentifier &path, const boost::any &value);
const boost::any getValue(const App::ObjectIdentifier &path) const;
void setPathValue(const App::ObjectIdentifier &path, const boost::any &value);
const boost::any getPathValue(const App::ObjectIdentifier &path) const;
private:
bool _lValue;

View File

@ -118,7 +118,7 @@ void PropertyQuantity::setPyObject(PyObject *value)
PropertyFloat::setValue(quant.getValue());
}
void PropertyQuantity::setValue(const ObjectIdentifier &path, const boost::any &value)
void PropertyQuantity::setPathValue(const ObjectIdentifier &path, const boost::any &value)
{
if (value.type() == typeid(double))
setValue(boost::any_cast<double>(value));
@ -128,7 +128,7 @@ void PropertyQuantity::setValue(const ObjectIdentifier &path, const boost::any &
throw bad_cast();
}
const boost::any PropertyQuantity::getValue(const ObjectIdentifier &path) const
const boost::any PropertyQuantity::getPathValue(const ObjectIdentifier &path) const
{
return Quantity(_dValue, _Unit);
}

View File

@ -68,8 +68,8 @@ public:
void setValue(double lValue) { PropertyFloat::setValue(lValue); }
double getValue(void) const { return PropertyFloat::getValue(); }
virtual void setValue(const App::ObjectIdentifier &path, const boost::any &value);
virtual const boost::any getValue(const App::ObjectIdentifier &path) const;
virtual void setPathValue(const App::ObjectIdentifier &path, const boost::any &value);
virtual const boost::any getPathValue(const App::ObjectIdentifier &path) const;
protected:
Base::Quantity createQuantityFromPy(PyObject *value);

View File

@ -408,7 +408,7 @@ int PropertyConstraintList::getIndexFromConstraintName(const string &name)
return std::atoi(name.substr(10,4000).c_str()) - 1;
}
void PropertyConstraintList::setValue(const ObjectIdentifier &path, const boost::any &value)
void PropertyConstraintList::setPathValue(const ObjectIdentifier &path, const boost::any &value)
{
const ObjectIdentifier::Component & c0 = path.getPropertyComponent(0);
double dvalue;
@ -464,7 +464,7 @@ const Constraint * PropertyConstraintList::getConstraint(const ObjectIdentifier
throw Base::Exception("Invalid constraint");
}
const boost::any PropertyConstraintList::getValue(const ObjectIdentifier &path) const
const boost::any PropertyConstraintList::getPathValue(const ObjectIdentifier &path) const
{
return boost::any(getConstraint(path)->getValue());
}

View File

@ -103,8 +103,8 @@ public:
const Constraint *getConstraint(const App::ObjectIdentifier &path) const;
virtual void setValue(const App::ObjectIdentifier & path, const boost::any & value);
virtual const boost::any getValue(const App::ObjectIdentifier & path) const;
virtual void setPathValue(const App::ObjectIdentifier & path, const boost::any & value);
virtual const boost::any getPathValue(const App::ObjectIdentifier & path) const;
virtual const App::ObjectIdentifier canonicalPath(const App::ObjectIdentifier & p) const;
virtual void getPaths(std::vector<App::ObjectIdentifier> & paths) const;