| 1 | -- File: BOPTColStd_ShapeWithRankHasher.cdl |
| 2 | -- Created: Fri Jun 8 17:30:21 2001 |
| 3 | -- Author: Peter KURNEV |
| 4 | -- <pkv@irinox> |
| 5 | ---Copyright: Matra Datavision 2001 |
| 6 | |
| 7 | |
| 8 | class ShapeWithRankHasher from BOPTColStd |
| 9 | |
| 10 | ---Purpose: |
| 11 | -- The auxiliary class provides hash code for mapping |
| 12 | -- ShapeWithRank objects |
| 13 | uses |
| 14 | ShapeWithRank from BOPTColStd |
| 15 | |
| 16 | |
| 17 | is |
| 18 | HashCode(myclass; |
| 19 | SR : ShapeWithRank from BOPTColStd; |
| 20 | Upper : Integer from Standard) |
| 21 | returns Integer from Standard; |
| 22 | ---Purpose: Returns a HasCode value for the Key <K> in the |
| 23 | -- range 0..Upper. |
| 24 | -- |
| 25 | IsEqual(myclass; |
| 26 | SR1, SR2 : ShapeWithRank from BOPTColStd) |
| 27 | returns Boolean; |
| 28 | ---Purpose: Returns True when the two keys are the same. Two |
| 29 | -- same keys must have the same hashcode, the |
| 30 | -- contrary is not necessary. |
| 31 | |
| 32 | end ShapeWithRankHasher; |