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

Method getSubListValues

src/App/PropertyLinks.cpp:2625–2654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2623}
2624
2625std::vector<PropertyLinkSubList::SubSet> PropertyLinkSubList::getSubListValues(bool newStyle) const
2626{
2627 std::vector<PropertyLinkSubList::SubSet> values;
2628 if (_lValueList.size() != _lSubList.size()) {
2629 throw Base::ValueError("PropertyLinkSubList::getSubListValues: size of subelements list != "
2630 "size of objects list");
2631 }
2632
2633 assert(_ShadowSubList.size() == _lSubList.size());
2634
2635 for (std::size_t i = 0; i < _lValueList.size(); i++) {
2636 App::DocumentObject* link = _lValueList[i];
2637 std::string sub;
2638 if (newStyle && !_ShadowSubList[i].newName.empty()) {
2639 sub = _ShadowSubList[i].newName;
2640 }
2641 else if (!newStyle && !_ShadowSubList[i].oldName.empty()) {
2642 sub = _ShadowSubList[i].oldName;
2643 }
2644 else {
2645 sub = _lSubList[i];
2646 }
2647 if (values.empty() || values.back().first != link) {
2648 // new object started, start a new subset.
2649 values.emplace_back(link, std::vector<std::string>());
2650 }
2651 values.back().second.push_back(sub);
2652 }
2653 return values;
2654}
2655
2656PyObject* PropertyLinkSubList::getPyObject()
2657{

Callers 15

relinkToOriginMethod · 0.80
addConstraintsMethod · 0.80
executeMethod · 0.80
getWireMethod · 0.80
allowEdgeMethod · 0.80
openMethod · 0.80
slotDeletedObjectMethod · 0.80
acceptMethod · 0.80
rejectMethod · 0.80
appendCurveMethod · 0.80
removeCurveMethod · 0.80
highlightReferencesMethod · 0.80

Calls 4

sizeMethod · 0.45
emptyMethod · 0.45
backMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected