1 // Copyright (c) 1998-1999 Matra Datavision
2 // Copyright (c) 1999-2013 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 #ifndef _Standard_TypeDef_HeaderFile
16 #define _Standard_TypeDef_HeaderFile
22 #if(defined(_MSC_VER) && (_MSC_VER < 1800))
23 // only Visual Studio 2013 (vc12) provides <cinttypes> header
24 // we do not defined all macros here - only used by OCCT framework
26 #define PRIdPTR "I64d"
27 #define PRIuPTR "I64u"
28 #define SCNdPTR "I64d"
29 #define SCNuPTR "I64u"
37 // should be just <cinttypes> since C++11
38 // however we use this code for compatibility with old C99 compilers
39 #ifndef __STDC_FORMAT_MACROS
40 #define __STDC_FORMAT_MACROS
45 #define Standard_False false
46 #define Standard_True true
48 #include <Standard_Macro.hxx>
50 typedef int Standard_Integer;
51 typedef double Standard_Real;
52 typedef bool Standard_Boolean;
53 typedef float Standard_ShortReal;
54 typedef char Standard_Character;
55 typedef unsigned char Standard_Byte;
56 typedef void* Standard_Address;
57 typedef size_t Standard_Size;
58 typedef std::time_t Standard_Time;
60 // Unicode primitives, char16_t, char32_t
61 typedef char Standard_Utf8Char; //!< signed UTF-8 char
62 typedef unsigned char Standard_Utf8UChar; //!< unsigned UTF-8 char
63 #if (defined(__GNUC__) && !defined(__clang__) && ((__GNUC__ == 4 && __GNUC_MINOR__ <= 3) || __GNUC__ < 4))
64 // compatibility with old GCC compilers
65 typedef uint16_t Standard_ExtCharacter;
66 typedef uint16_t Standard_Utf16Char;
67 typedef uint32_t Standard_Utf32Char;
69 typedef char16_t Standard_ExtCharacter;
70 typedef char16_t Standard_Utf16Char; //!< UTF-16 char (always unsigned)
71 typedef char32_t Standard_Utf32Char; //!< UTF-32 char (always unsigned)
73 typedef wchar_t Standard_WideChar; //!< wide char (unsigned UTF-16 on Windows platform and signed UTF-32 on Linux)
76 typedef const Standard_Character* Standard_CString;
77 typedef const Standard_ExtCharacter* Standard_ExtString;
79 #endif // _Standard_TypeDef_HeaderFile