| 1813 | } |
| 1814 | |
| 1815 | std::vector<SubAssemblyID> Assembly::decodeSubPath(SubAssemblyID _subObjectId) const |
| 1816 | { |
| 1817 | if (_subObjectId.value < m_subs.size()) |
| 1818 | return {_subObjectId}; |
| 1819 | |
| 1820 | auto subIdPathIt = ranges::find_if( |
| 1821 | m_subPaths, |
| 1822 | [_subObjectId](auto const& subId) { return subId.second == _subObjectId; } |
| 1823 | ); |
| 1824 | |
| 1825 | assertThrow(subIdPathIt != m_subPaths.end(), AssemblyException, ""); |
| 1826 | return subIdPathIt->first; |
| 1827 | } |
| 1828 | |
| 1829 | SubAssemblyID Assembly::encodeSubPath(std::vector<SubAssemblyID> const& _subPath) |
| 1830 | { |
no test coverage detected