MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / getPyValue

Method getPyValue

src/App/ObjectIdentifier.cpp:1712–1739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1710}
1711
1712Py::Object ObjectIdentifier::getPyValue(bool pathValue, bool* isPseudoProperty) const
1713{
1714 ResolveResults rs(*this);
1715
1716 if (isPseudoProperty) {
1717 *isPseudoProperty = rs.propertyType != PseudoNone;
1718 if (rs.propertyType == PseudoSelf && isLocalProperty()
1719 && rs.propertyIndex + 1 < (int)components.size()
1720 && owner->getPropertyByName(components[rs.propertyIndex + 1].getName().c_str())) {
1721 *isPseudoProperty = false;
1722 }
1723 }
1724
1725 if (rs.resolvedProperty && rs.propertyType == PseudoNone && pathValue) {
1726 Py::Object res;
1727 if (rs.resolvedProperty->getPyPathValue(*this, res)) {
1728 return res;
1729 }
1730 }
1731
1732 try {
1733 return access(rs);
1734 }
1735 catch (Py::Exception&) {
1736 Base::PyException::throwException();
1737 }
1738 return Py::Object();
1739}
1740
1741void ObjectIdentifier::setValue(const App::any& value) const
1742{

Callers

nothing calls this directly

Calls 7

isLocalPropertyFunction · 0.85
ObjectClass · 0.70
sizeMethod · 0.45
getPropertyByNameMethod · 0.45
c_strMethod · 0.45
getNameMethod · 0.45
getPyPathValueMethod · 0.45

Tested by

no test coverage detected