1 //============================================================================
2 //==== Titre: Standard_ExtCharacter.hxx
3 //==== Role : The headr file of primitve type "ExtCharacter" from package
6 //==== Implementation: This is a primitive type implemented with typedef
7 //==== Excepting "Unicod encoding"
8 //============================================================================
10 #ifndef _Standard_ExtCharacter_HeaderFile
11 #define _Standard_ExtCharacter_HeaderFile
13 #ifndef _Standard_ctype_HeaderFile
14 #include <Standard_ctype.hxx>
19 #ifndef _Standard_TypeDef_HeaderFile
20 #include <Standard_TypeDef.hxx>
23 #ifndef _Standard_OStream_HeaderFile
24 #include <Standard_OStream.hxx>
27 class Handle_Standard_Type;
29 __Standard_API Handle_Standard_Type& Standard_ExtCharacter_Type_();
30 //class Standard_OStream;
31 //void ShallowDump (const Standard_ExtCharacter, Standard_OStream& );
32 // =====================================
33 // Method implemented in Standard_ExtCharacter.cxx
34 // =====================================
35 __Standard_API Standard_Integer HashCode(const Standard_ExtCharacter, const Standard_Integer);
37 // ===============================================
38 // Methods from Standard_Entity class which are redefined:
44 // ===============================================
50 // ------------------------------------------------------------------
51 // ToExtCharacter : Returns an ExtCharacter from a Character
52 // ------------------------------------------------------------------
53 inline Standard_ExtCharacter ToExtCharacter(const Standard_Character achar)
55 // extension a zero (partie haute-->octet de gauche) de achar
56 return (Standard_ExtCharacter)( (unsigned char)achar & 0x00ff );
59 // ------------------------------------------------------------------
60 // ToCharacter : Returns an Character from an ExtCharacter
61 // ------------------------------------------------------------------
62 inline Standard_Character ToCharacter(const Standard_ExtCharacter achar)
64 // recuperer partie basse(octet de droite) de achar
65 return (Standard_Character)(unsigned char)(achar & 0x00ff);
68 // ------------------------------------------------------------------
69 // IsAnAscii : Returns True if an ExtCharacter is in the "Ascii Range"
70 // ------------------------------------------------------------------
71 inline Standard_Boolean IsAnAscii(const Standard_ExtCharacter achar)
73 return ! ( achar & 0xff00 );
76 // ------------------------------------------------------------------
77 // IsEqual : Returns Standard_True if two characters have the same value
78 // ------------------------------------------------------------------
79 inline Standard_Boolean IsEqual(const Standard_ExtCharacter One,
80 const Standard_ExtCharacter Two)
81 { return One == Two; }
83 // ------------------------------------------------------------------
84 // IsSimilar : Returns Standard_True if two characters have the same value
85 // ------------------------------------------------------------------
86 inline Standard_Boolean IsSimilar(const Standard_ExtCharacter One,
87 const Standard_ExtCharacter Two)
88 { return One == Two; }
91 // ------------------------------------------------------------------
92 // ShallowCopy : Make a copy of one Character
93 // ------------------------------------------------------------------
94 inline Standard_ExtCharacter ShallowCopy (const Standard_ExtCharacter me)