App: add convenience method DocumentObject::clearExpression()

This commit is contained in:
wmayer
2022-03-10 12:09:57 +01:00
parent c1d86b2f0b
commit b34a00fe14
4 changed files with 35 additions and 8 deletions

View File

@@ -949,6 +949,16 @@ void DocumentObject::setExpression(const ObjectIdentifier &path, std::shared_ptr
ExpressionEngine.setValue(path, expr);
}
/**
* @brief Clear the expression of the object identifier \a path in this document object.
* @param path Target object identifier
*/
void DocumentObject::clearExpression(const ObjectIdentifier & path)
{
setExpression(path, std::shared_ptr<Expression>());
}
/**
* @brief Get expression information associated with \a path.
* @param path Object identifier