]> OCCT Git - occt.git/commit
Data Exchange, STEP - use std::string_view for STEP type names and API (#784)
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Wed, 5 Nov 2025 16:50:28 +0000 (16:50 +0000)
committerGitHub <noreply@github.com>
Wed, 5 Nov 2025 16:50:28 +0000 (16:50 +0000)
commitdc13c08c8e24ca79223b8fa8b9429a3182642761
treeaf9cb276d99bf6c69f00c7ec52a93e30a4bc7667
parentbd53a03b317b39ffcbf71be99cdeb410fce94eb0
Data Exchange, STEP - use std::string_view for STEP type names and API (#784)

- Replace many static TCollection_AsciiString recognition constants with
  constexpr std::string_view (Reco_*, s_* short names) and include <string_view>.
- Change StepType() API to return const std::string_view& in
  StepData_ReadWriteModule and related modules (RWHeaderSection, RWStepAP214).
- Convert typenums/typeshor maps to use std::string_view keys and lazy
  initialization via initializeTypenums/initializeTypeshor + getTypenums/getTypeshor.
- Update call sites to adapt to new return type (wrap into TCollection_AsciiString
  where a TCollection_AsciiString is required).
- Minor refactoring to headers to add <string_view> includes and keep thread-safe
  singleton initialization for the maps.
src/DataExchange/TKDESTEP/RWHeaderSection/RWHeaderSection_ReadWriteModule.cxx
src/DataExchange/TKDESTEP/RWHeaderSection/RWHeaderSection_ReadWriteModule.hxx
src/DataExchange/TKDESTEP/RWStepAP214/RWStepAP214_ReadWriteModule.cxx
src/DataExchange/TKDESTEP/RWStepAP214/RWStepAP214_ReadWriteModule.pxx
src/DataExchange/TKDESTEP/StepData/StepData_ReadWriteModule.hxx
src/DataExchange/TKDESTEP/StepSelect/StepSelect_StepType.cxx