Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:58

0001 // Copyright (c) 1998-1999 Matra Datavision
0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 //============================================================================
0016 //==== Title: Standard_ExtCharacter.hxx
0017 //==== Role : The headr file of primitive type "ExtCharacter" from package "Standard"
0018 //==== 
0019 //==== Implementation:  This is a primitive type implemented with typedef
0020 //====                  Excepting "Unicod encoding"
0021 //============================================================================
0022 
0023 #ifndef _Standard_ExtCharacter_HeaderFile
0024 #define _Standard_ExtCharacter_HeaderFile
0025 
0026 #include <Standard_TypeDef.hxx>
0027 
0028 // ===============
0029 // inline methods 
0030 // ===============
0031 
0032 // ------------------------------------------------------------------
0033 // ToExtCharacter : Returns an ExtCharacter from a Character
0034 // ------------------------------------------------------------------
0035 inline Standard_ExtCharacter ToExtCharacter(const Standard_Character achar)
0036 {
0037 //  extension a zero (partie haute-->octet de gauche) de achar
0038     return (Standard_ExtCharacter)( (unsigned char)achar & 0x00ff );
0039 }
0040 
0041 // ------------------------------------------------------------------
0042 // ToCharacter : Returns an Character from an ExtCharacter
0043 // ------------------------------------------------------------------
0044 inline Standard_Character ToCharacter(const Standard_ExtCharacter achar)
0045 {
0046 //  recuperer partie basse(octet de droite) de achar
0047     return (Standard_Character)(unsigned char)(achar & 0x00ff);
0048 }
0049 
0050 // ------------------------------------------------------------------
0051 // IsAnAscii : Returns True if an ExtCharacter is in the "Ascii Range"
0052 // ------------------------------------------------------------------
0053 inline Standard_Boolean IsAnAscii(const Standard_ExtCharacter achar)
0054 {
0055     return ! ( achar & 0xff00 );
0056 }
0057 
0058 // ------------------------------------------------------------------
0059 // IsEqual : Returns Standard_True if two characters have the same value
0060 // ------------------------------------------------------------------
0061 inline Standard_Boolean IsEqual(const Standard_ExtCharacter One,
0062                 const Standard_ExtCharacter Two)
0063 { return One == Two; }
0064 
0065 #endif