Skip to content

Foundation Classes - Refactor TColStd_PackedMapOfInteger and related classes#1023

Merged
dpasukhi merged 7 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi:int_map_move_to_ncollection
Jan 22, 2026
Merged

Foundation Classes - Refactor TColStd_PackedMapOfInteger and related classes#1023
dpasukhi merged 7 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi:int_map_move_to_ncollection

Conversation

@dpasukhi
Copy link
Copy Markdown
Member

  • Removed TColStd_HPackedMapOfInteger and its associated methods.
  • Updated TColStd_PackedMapOfInteger to be a typedef for NCollection_PackedMapOfInteger.
  • Replaced all instances of TColStd_MapIteratorOfPackedMapOfInteger with the new iterator from TColStd_PackedMapOfInteger.
  • Adjusted related files in the Visualization and ModelingAlgorithms directories to reflect the changes in the map and iterator usage.

…classes

- Removed TColStd_HPackedMapOfInteger and its associated methods.
- Updated TColStd_PackedMapOfInteger to be a typedef for NCollection_PackedMapOfInteger.
- Replaced all instances of TColStd_MapIteratorOfPackedMapOfInteger with the new iterator from TColStd_PackedMapOfInteger.
- Adjusted related files in the Visualization and ModelingAlgorithms directories to reflect the changes in the map and iterator usage.
- Removed the NCollection_PackedMapOfInteger class, consolidating its functionality into TColStd_PackedMapOfInteger.
- Updated TColStd_HPackedMapOfInteger to use TColStd_PackedMapOfInteger instead of NCollection_PackedMapOfInteger.
- Changed the typedef for TColStd_PackedMapOfInteger to use NCollection_PackedMap<int> for better type consistency.
- Marked the previous classes as deprecated to guide users towards the new implementation.
- Introduced a new header file NCollection_PackedMapAlgo.hxx containing template functions for boolean operations on packed maps, including union, intersection, subtraction, and symmetric difference.
- Updated various source files in the visualization module to utilize the new NCollection_PackedMapAlgo functions for operations on packed maps, enhancing code clarity and performance.
- Replaced direct method calls on packed maps with corresponding functions from NCollection_PackedMapAlgo in MeshVS_ElementalColorPrsBuilder, MeshVS_Mesh, MeshVS_MeshOwner, MeshVS_MeshPrsBuilder, MeshVS_NodalColorPrsBuilder, MeshVS_TextPrsBuilder, MeshVS_VectorPrsBuilder, and Select3D_SensitivePrimitiveArray.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the TColStd_PackedMapOfInteger class and its related components by modernizing the implementation and moving it to a more generic template-based design. The refactoring eliminates the separate TColStd_HPackedMapOfInteger wrapper implementation and replaces the old iterator with a modern type alias.

Changes:

  • Replaced TColStd_PackedMapOfInteger implementation with a typedef to NCollection_PackedMap<int>
  • Introduced new NCollection_PackedMap template class and NCollection_PackedMapAlgo namespace with standalone boolean operation functions
  • Removed TColStd_HPackedMapOfInteger implementation files, keeping only the header as a deprecated wrapper
  • Updated all iterator references from TColStd_MapIteratorOfPackedMapOfInteger to TColStd_PackedMapOfInteger::Iterator
  • Replaced direct map method calls (Unite, Subtract, etc.) with standalone algorithm functions from NCollection_PackedMapAlgo

Reviewed changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated no comments.

Show a summary per file
File Description
NCollection_PackedMap.hxx New template implementation of packed map for various integer types
NCollection_PackedMapAlgo.hxx New namespace with standalone boolean operations for packed maps
TColStd_PackedMapOfInteger.hxx Converted to typedef for NCollection_PackedMap<int>
TColStd_HPackedMapOfInteger.hxx Converted to thin wrapper with inline methods, marked as deprecated
Multiple .cxx files Updated to use new iterator type and NCollection_PackedMapAlgo functions
NCollection_PackedMap_Test.cxx Comprehensive test suite for the new implementation

@dpasukhi dpasukhi merged commit f71af06 into Open-Cascade-SAS:IR Jan 22, 2026
18 checks passed
@dpasukhi dpasukhi deleted the int_map_move_to_ncollection branch January 22, 2026 17:19
@github-project-automation github-project-automation bot moved this from Todo to Done in Maintenance Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants