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

Method setPyObject

src/App/PropertyStandard.cpp:102–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102void PropertyInteger::setPyObject(PyObject* value)
103{
104 if (PyLong_Check(value)) {
105 aboutToSetValue();
106 _lValue = PyLong_AsLong(value);
107 hasSetValue();
108 }
109 else {
110 std::string error = std::string("type must be int, not ");
111 error += value->ob_type->tp_name;
112 throw Base::TypeError(error);
113 }
114}
115
116void PropertyInteger::Save(Base::Writer& writer) const
117{

Callers 1

getPyValueMethod · 0.45

Calls 15

getFullNameFunction · 0.85
maxFunction · 0.85
setValuesFunction · 0.85
asBooleanFunction · 0.85
setDeletableMethod · 0.80
setValueFunction · 0.70
ObjectClass · 0.70
ExceptionClass · 0.70
c_strMethod · 0.45
isValidMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected