Skip to content

Coding - Refactor RWStepAP214 module to use custom hasher for string_view types#888

Merged
dpasukhi merged 1 commit intoOpen-Cascade-SAS:IRfrom
dpasukhi:step_string_view_cash
Dec 6, 2025
Merged

Coding - Refactor RWStepAP214 module to use custom hasher for string_view types#888
dpasukhi merged 1 commit intoOpen-Cascade-SAS:IRfrom
dpasukhi:step_string_view_cash

Conversation

@dpasukhi
Copy link
Copy Markdown
Member

@dpasukhi dpasukhi commented Dec 6, 2025

  • Introduced StringViewHasher for efficient hashing of std::string_view using OCCT utilities.
  • Updated THE_TYPENUMS and THE_TYPESHOR maps to utilize StringViewDataMap with the new hasher.
  • Modified initialization functions to accept the new map type for better type safety and clarity.

…view types

- Introduced StringViewHasher for efficient hashing of std::string_view using OCCT utilities.
- Updated THE_TYPENUMS and THE_TYPESHOR maps to utilize StringViewDataMap with the new hasher.
- Modified initialization functions to accept the new map type for better type safety and clarity.
@dpasukhi dpasukhi requested a review from Copilot December 6, 2025 17:57
@dpasukhi dpasukhi added the 1. Coding Coding rules, trivial changes and misprints label Dec 6, 2025
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 RWStepAP214 module to use a custom hasher for std::string_view types in hash maps, improving type safety and code clarity. The changes introduce a dedicated StringViewHasher struct that wraps OCCT's hash utilities and updates the static type mapping infrastructure to use this custom hasher.

Key Changes:

  • Introduced StringViewHasher struct to provide hashing and equality operations for std::string_view
  • Created StringViewDataMap type alias using NCollection_DataMap with the custom hasher
  • Updated static map declarations and initialization functions to use the new type alias

@dpasukhi dpasukhi merged commit a873c1c into Open-Cascade-SAS:IR Dec 6, 2025
41 of 48 checks passed
@dpasukhi dpasukhi deleted the step_string_view_cash branch December 6, 2025 19:17
@github-project-automation github-project-automation bot moved this from Todo to Done in Maintenance Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. Coding Coding rules, trivial changes and misprints

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants