Pre-condition: ReversePointer(sourceHandle,index) is not in m_targetData. Post-condition: m_targetData indicates that object sourceHandle points to this object from field index.
| 1028 | // Post-condition: m_targetData indicates that object sourceHandle points to this object from |
| 1029 | // field index. |
| 1030 | void WorkspaceObject_Impl::setReversePointer(const Handle& sourceHandle, unsigned index) { |
| 1031 | OS_ASSERT(!m_handle.isNull()); |
| 1032 | if (!m_targetData) { |
| 1033 | m_targetData = TargetData(); |
| 1034 | } |
| 1035 | // automatically maintains uniqueness |
| 1036 | std::pair<TargetData::pointer_set::iterator, bool> insertResult; |
| 1037 | insertResult = m_targetData->reversePointers.insert(ReversePointer(sourceHandle, index)); |
| 1038 | OS_ASSERT(insertResult.second); |
| 1039 | } |
| 1040 | |
| 1041 | void WorkspaceObject_Impl::restorePointers() { |
| 1042 | OS_ASSERT(!m_handle.isNull()); |
no test coverage detected