For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

[Feature request] NCollection classes to have extra argument instead of IsEqual()

Roman Lygin's picture

Currently NCollection classes (e.g. NCollection_DataMap) enforces use of the IsEqual() function to compare map keys. This makes it impossible (or makes use of ugly work-arounds) if I want to use two maps with the same key types but with different comparison functions, inside one file. For instance, in the same class I want to have two data maps with TopoDS_Shape as key. In most cases, IsEqual(S1, S2) must be defined as return S1.IsSame (S2). But I also need a map that would implement S1.IsPartner (S2).

To enable that, NCollection_DataMap should offer an extra argument in its template declaration that would default to IsEqual() but would allow a user-defined value.

Thank you.