| 1827 | } |
| 1828 | |
| 1829 | SubAssemblyID Assembly::encodeSubPath(std::vector<SubAssemblyID> const& _subPath) |
| 1830 | { |
| 1831 | assertThrow(!_subPath.empty(), AssemblyException, ""); |
| 1832 | if (_subPath.size() == 1) |
| 1833 | { |
| 1834 | solAssert(_subPath[0].value < m_subs.size()); |
| 1835 | return _subPath[0]; |
| 1836 | } |
| 1837 | |
| 1838 | if (!m_subPaths.contains(_subPath)) |
| 1839 | { |
| 1840 | SubAssemblyID const objectId{std::numeric_limits<SubAssemblyID::ValueType>::max() - m_subPaths.size()}; |
| 1841 | solAssert(objectId.value >= m_subs.size()); |
| 1842 | m_subPaths[_subPath] = objectId; |
| 1843 | } |
| 1844 | |
| 1845 | return m_subPaths[_subPath]; |
| 1846 | } |
| 1847 | |
| 1848 | Assembly const* Assembly::subAssemblyById(SubAssemblyID const _subId) const |
| 1849 | { |
no test coverage detected