Skip to content

Commit

Permalink
+ fix clang warning: -Woverloaded-virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Oct 2, 2015
1 parent 4b00fe9 commit e4768c1
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/App/DocumentObject.cpp
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/App/Expression.cpp
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/App/Property.cpp
Expand Up @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions src/App/Property.h
Expand Up @@ -88,10 +88,10 @@ class AppExport Property : public Base::Persistence
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;
Expand Down
6 changes: 3 additions & 3 deletions src/App/PropertyExpressionEngine.cpp
Expand Up @@ -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));
Expand All @@ -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);
Expand Down Expand Up @@ -486,7 +486,7 @@ DocumentObjectExecReturn *App::PropertyExpressionEngine::execute()
#endif

/* Set value of property */
prop->setValue(*it, e->getValueAsAny());
prop->setPathValue(*it, e->getValueAsAny());

++it;
}
Expand Down
2 changes: 1 addition & 1 deletion src/App/PropertyExpressionEngine.h
Expand Up @@ -93,7 +93,7 @@ class AppExport PropertyExpressionEngine : public App::Property

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();

Expand Down
16 changes: 8 additions & 8 deletions src/App/PropertyStandard.cpp
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand All @@ -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);

Expand Down
20 changes: 10 additions & 10 deletions src/App/PropertyStandard.h
Expand Up @@ -77,8 +77,8 @@ class AppExport PropertyInteger: public Property

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;
Expand Down Expand Up @@ -198,8 +198,8 @@ class AppExport PropertyEnumeration: public Property
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;
Expand Down Expand Up @@ -459,8 +459,8 @@ class AppExport PropertyFloat: public Property

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;
Expand Down Expand Up @@ -614,8 +614,8 @@ class AppExport PropertyString: public Property
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;
Expand Down Expand Up @@ -768,8 +768,8 @@ class AppExport PropertyBool : public Property

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;
Expand Down
4 changes: 2 additions & 2 deletions src/App/PropertyUnits.cpp
Expand Up @@ -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));
Expand All @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/App/PropertyUnits.h
Expand Up @@ -68,8 +68,8 @@ class AppExport PropertyQuantity : public PropertyFloat
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);
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Sketcher/App/PropertyConstraintList.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Sketcher/App/PropertyConstraintList.h
Expand Up @@ -103,8 +103,8 @@ class SketcherExport PropertyConstraintList : public App::PropertyLists


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;

Expand Down

0 comments on commit e4768c1

Please sign in to comment.