1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0022744: Global HashCode function for TCollection_ExtendedString

This commit is contained in:
SSV
2011-11-18 08:37:15 +00:00
committed by bugmaster
parent 997cf5f22c
commit 7fa0a5984d
4 changed files with 54 additions and 21 deletions

View File

@@ -324,11 +324,13 @@ is
HashCode(myclass ; astring : ExtendedString from TCollection; Upper : Integer)
returns Integer;
---Level: Internal
---Purpose: Returns a hashed value for the extended string
-- astring within the range 1..Upper.
-- Note: if astring is ASCII, the computed value is
-- the same as the value computed with the HashCode function on a
-- TCollection_AsciiString string composed with equivalent ASCII characters
---C++: inline
IsEqual(myclass ; string1 : ExtendedString from TCollection;
string2 : ExtendedString from TCollection)
@@ -336,6 +338,7 @@ is
---Purpose: Returns true if the characters in this extended
-- string are identical to the characters in the other extended string.
-- Note that this method is an alias of operator ==.
---C++: inline
ToUTF8CString(me; theCString : out PCharacter from Standard)
returns Integer from Standard;

View File

@@ -991,26 +991,6 @@ Standard_ExtCharacter TCollection_ExtendedString::Value
}
//------------------------------------------------------------------------
// HashCode
//------------------------------------------------------------------------
Standard_Integer TCollection_ExtendedString::HashCode
(const TCollection_ExtendedString& astring,
const Standard_Integer Upper)
{
return ::HashCode(astring.ToExtString(),Upper);
}
//------------------------------------------------------------------------
// IsEqual
//------------------------------------------------------------------------
Standard_Boolean TCollection_ExtendedString::IsEqual
(const TCollection_ExtendedString& string1,
const TCollection_ExtendedString& string2)
{
return string1.IsEqual(string2);
}
//----------------------------------------------------------------------------
// Convert CString (including multibyte case) to UniCode representation
//----------------------------------------------------------------------------

View File

@@ -0,0 +1,28 @@
//------------------------------------------------------------------------
// HashCode
//------------------------------------------------------------------------
inline Standard_Integer HashCode(const TCollection_ExtendedString& theString,
const Standard_Integer theUpper)
{
return TCollection_ExtendedString::HashCode(theString, theUpper);
}
//------------------------------------------------------------------------
// HashCode
//------------------------------------------------------------------------
inline Standard_Integer
TCollection_ExtendedString::HashCode (const TCollection_ExtendedString& theString,
const Standard_Integer theUpper)
{
return ::HashCode(theString.ToExtString(), theUpper);
}
//------------------------------------------------------------------------
// IsEqual
//------------------------------------------------------------------------
inline Standard_Boolean
TCollection_ExtendedString::IsEqual (const TCollection_ExtendedString& theString1,
const TCollection_ExtendedString& theString2)
{
return theString1.IsEqual(theString2);
}