| 946 | } |
| 947 | |
| 948 | void Expression::getDepObjects(std::map<App::DocumentObject*, bool>& deps, |
| 949 | std::vector<std::string>* labels, |
| 950 | std::map<std::pair<std::string, App::DocumentObject*>, bool>* propDeps) const |
| 951 | { |
| 952 | for(auto &v : getIdentifiers()) { |
| 953 | bool hidden = v.second; |
| 954 | const ObjectIdentifier &var = v.first; |
| 955 | std::vector<std::string> strings; |
| 956 | for(auto &dep : var.getDep(propDeps != nullptr, &strings)) { |
| 957 | DocumentObject *obj = dep.first; |
| 958 | if (!obj->testStatus(ObjectStatus::Remove)) { |
| 959 | if (labels) { |
| 960 | std::copy(strings.begin(), strings.end(), std::back_inserter(*labels)); |
| 961 | } |
| 962 | |
| 963 | auto res = deps.insert(std::make_pair(obj, hidden)); |
| 964 | if (!hidden || res.second) |
| 965 | res.first->second = hidden; |
| 966 | if (propDeps) { |
| 967 | for (auto &propName : dep.second) { |
| 968 | (*propDeps)[std::make_pair(propName, obj)] = hidden; |
| 969 | } |
| 970 | } |
| 971 | } |
| 972 | |
| 973 | strings.clear(); |
| 974 | } |
| 975 | } |
| 976 | } |
| 977 | |
| 978 | std::map<App::DocumentObject*,bool> Expression::getDepObjects(std::vector<std::string> *labels) const { |
| 979 | std::map<App::DocumentObject*,bool> deps; |
no test coverage detected