basedefs.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
11 
12 #define Longint long
13 #define Wordint short
14 
15 #if !defined (NO_BENTLEY_PUBLIC)
16 #define Public
17 #define SemiPrivate
18 #endif
19 
20 #define MdlPublic
21 #define BsiPublic
22 
23 #define CHAR_WORD(c1,c2,c3,c4) (((((((c1)<<8)|c2)<<8)|c3)<<8)|c4)
24 
25 #define CONST_CAST_(t,v) const_cast<t> (v)
26 
27 #if !defined (NULLFUNC)
28 # define NULLFUNC 0
29 #endif
30 
31 #define bsiInterface struct __declspec(novtable)
32 
33 #define PAD_BITS_IF_NEEDED(size)
34 
36 /*----------------------------------------------------------------------+
37 | |
38 | Product IDs |
39 | |
40 +----------------------------------------------------------------------*/
42  {
43  PRODUCT_MS = 10,
44  PRODUCT_MDE = 20, /* do not use */
53  PRODUCT_GEOOUTLOOK = 110, /* alias for PRODUCT_POWERMAP */
57  PRODUCT_VIEW = 150,
60  PRODUCT_HOST = 180,
64  };
65 
67 
68 /*----------------------------------------------------------------------+
69 | |
70 | Platform specific capabilities |
71 | |
72 +----------------------------------------------------------------------*/
73 #if defined (DATA_ALIGNMENT_FORCED)
74 #error "got here"
75 #endif
76 
77 #if defined (winNT)
78 # define NATIVE_DIALOGS
79 # define NATIVE_BACKGROUND
80 #endif
81 
82 #if defined (DATA_ALIGNMENT_FORCED)
83 # define CHAR_ALIGN 1L
84 # define SHORT_ALIGN 2L
85 # define LONG_ALIGN 4L
86 # define LONG64_ALIGN 8L
87 # define FLOAT_ALIGN 4L
88 # define DOUBLE_ALIGN 8L
89 # define PTR_ALIGN 4L
90 #elif defined (winNT)
91 # define CHAR_ALIGN 1L
92 # define SHORT_ALIGN 2L
93 # define LONG_ALIGN 4L
94 # define LONG64_ALIGN 8L
95 # define FLOAT_ALIGN 4L
96 # define DOUBLE_ALIGN 8L
97  #if defined (_M_X64)
98 # define PTR_ALIGN 8L
99  #else
100 # define PTR_ALIGN 4L
101  #endif
102 #else
103 # error Data Alignment must be defined in basedefs.h
104 #endif
105 
106 #if defined (winNT) && defined (_X86_)
107 # define MIN_MALLOC_ALIGN LONG_ALIGN
108 #else
109 # define MIN_MALLOC_ALIGN DOUBLE_ALIGN
110 #endif
111 
112 #if defined (winNT) && !defined (win32)
113 # define win32
114 #endif
115 
116 /* define option for Hosts that support drives in file/dir list boxes */
117 #if defined (winNT)
118 # define DISK_SUPPORT
119 #endif
120 
121 #if !defined (mdl)
122 # if ! defined (nativeCode)
123 # define nativeCode
124 # endif
125 #endif
126 
127 
128 /*----------------------------------------------------------------------+
129 | |
130 | Exporting from a DLL |
131 | |
132 +----------------------------------------------------------------------*/
133 #if defined (winNT) && !defined (mdl)
134 # define DLLEXPORT __declspec( dllexport )
135 # define DLLIMPORT __declspec( dllimport )
136 #else
137 # define DLLEXPORT
138 # define DLLIMPORT
139 #endif
140 
Definition: basedefs.h:61
Definition: basedefs.h:60
#define END_BENTLEY_MSTNPLATFORM_NAMESPACE
Definition: DgnPlatform.h:30
Definition: basedefs.h:48
Definition: basedefs.h:62
Definition: basedefs.h:57
#define BEGIN_BENTLEY_MSTNPLATFORM_NAMESPACE
Definition: DgnPlatform.h:29
Definition: basedefs.h:44
Definition: basedefs.h:45
Definition: basedefs.h:43
Definition: basedefs.h:46
MstnProductIds
Definition: basedefs.h:41
Definition: basedefs.h:63
Definition: basedefs.h:47

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.