1 // Copyright (c) 1998-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 //============================================================================
16 //==== Titre: Standard_ExtCharacter.cxx
17 //==== Role : the methodes which raise the exceptions are implemented in
19 //============================================================================
21 #include <Standard_ExtCharacter.hxx>
22 #include <Standard_Integer.hxx>
23 #include <Standard_RangeError.hxx>
25 #include <Standard_Type.hxx>
26 #ifndef _Standard_Stream_HeaderFile
27 #include <Standard_Stream.hxx>
29 #ifndef _Standard_OStream_HeaderFile
30 #include <Standard_OStream.hxx>
33 const Handle_Standard_Type& Standard_ExtCharacter_Type_()
35 static Handle_Standard_Type _aType =
36 new Standard_Type("Standard_ExtCharacter",sizeof(Standard_ExtCharacter),
43 // ------------------------------------------------------------------
44 // Hascode : Computes a hascoding value for a given ExtCharacter
45 // ------------------------------------------------------------------
46 Standard_Integer HashCode(const Standard_ExtCharacter me,
47 const Standard_Integer Upper)
51 Raise("Try to apply HashCode method with negative or null argument.");
53 Standard_Integer aCode = me;
54 return ( aCode % Upper) + 1;
57 // ------------------------------------------------------------------
58 // ShallowDump : Writes a character
59 // ------------------------------------------------------------------
60 Standard_EXPORT void ShallowDump (const Standard_ExtCharacter Value
63 s << hex << Value << " Standard_ExtCharacter" << endl;