0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / Standard / Standard_TypeDef.hxx
CommitLineData
b311480e 1// Copyright (c) 1998-1999 Matra Datavision
a174a3c5 2// Copyright (c) 1999-2013 OPEN CASCADE SAS
b311480e 3//
973c2be1 4// This file is part of Open CASCADE Technology software library.
b311480e 5//
d5f74e42 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
973c2be1 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.
b311480e 11//
973c2be1 12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
b311480e 14
7fd59977 15#ifndef _Standard_TypeDef_HeaderFile
16#define _Standard_TypeDef_HeaderFile
17
a174a3c5 18#include <cstddef>
6c3e4c29 19#include <ctime>
7fd59977 20
a174a3c5 21#if(defined(_MSC_VER) && (_MSC_VER < 1600))
22 // old MSVC - hasn't stdint header
23 typedef unsigned __int16 uint16_t;
24 typedef unsigned __int32 uint32_t;
25#else
26 #include <stdint.h>
27#endif
28
64531d9c 29#if(defined(_MSC_VER) && (_MSC_VER < 1800))
30 // only Visual Studio 2013 (vc12) provides <cinttypes> header
31 // we do not defined all macros here - only used by OCCT framework
32 #ifdef _WIN64
33 #define PRIdPTR "I64d"
34 #define PRIuPTR "I64u"
35 #define SCNdPTR "I64d"
36 #define SCNuPTR "I64u"
37 #else
38 #define PRIdPTR "d"
39 #define PRIuPTR "u"
40 #define SCNdPTR "d"
41 #define SCNuPTR "u"
42 #endif
43#else
44 // should be just <cinttypes> since C++11
45 // however we use this code for compatibility with old C99 compilers
46 #ifndef __STDC_FORMAT_MACROS
47 #define __STDC_FORMAT_MACROS
48 #endif
49 #include <inttypes.h>
50#endif
51
7fd59977 52#define Standard_False (Standard_Boolean)0
53#define Standard_True (Standard_Boolean)1
54
7fd59977 55#include <Standard_Macro.hxx>
7fd59977 56
64531d9c 57typedef int Standard_Integer;
58typedef double Standard_Real;
59typedef unsigned int Standard_Boolean;
60typedef float Standard_ShortReal;
61typedef char Standard_Character;
62typedef short Standard_ExtCharacter;
63typedef unsigned char Standard_Byte;
64typedef void* Standard_Address;
65typedef size_t Standard_Size;
66typedef std::time_t Standard_Time;
a174a3c5 67
7fd59977 68//
64531d9c 69typedef const char* Standard_CString;
70typedef const short* Standard_ExtString;
7fd59977 71
a174a3c5 72// Unicode primitives, char16_t, char32_t
73typedef char Standard_Utf8Char; //!< signed UTF-8 char
74typedef unsigned char Standard_Utf8UChar; //!< unsigned UTF-8 char
75typedef uint16_t Standard_Utf16Char; //!< UTF-16 char (always unsigned)
76typedef uint32_t Standard_Utf32Char; //!< UTF-32 char (always unsigned)
77typedef wchar_t Standard_WideChar; //!< wide char (unsigned UTF-16 on Windows platform and signed UTF-32 on Linux)
78
64531d9c 79#endif // _Standard_TypeDef_HeaderFile