home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 March / Chip_2002-03_cd1.bin / zkuste / delphi / kompon / d3456 / SYSIMAGE.ZIP / DELPHIAREA.INC next >
Encoding:
Text File  |  2001-12-26  |  10.9 KB  |  343 lines

  1. {******************************************************************************}
  2. {                                                                              }
  3. { The contents of this file are subject to the Mozilla Public License Version  }
  4. { 1.1 (the "License"); you may not use this file except in compliance with the }
  5. { License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ }
  6. {                                                                              }
  7. { Software distributed under the License is distributed on an "AS IS" basis,   }
  8. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  9. { the specific language governing rights and limitations under the License.    }
  10. {                                                                              }
  11. { The Original Code is JEDI.INC.                                               }
  12. {                                                                              }
  13. { The Initial Developer of the Original Code is Project JEDI                   }
  14. { http://www.delphi-jedi.org                                                   }
  15. {                                                                              }
  16. { Last modified: October 27 2000                                               }
  17. {                                                                              }
  18. {******************************************************************************}
  19.  
  20. { This file defines various generic compiler directives used in the JEDI Code
  21.   Library (JCL) and JEDI Visual Component Library Library (J-VCL). The directives
  22.   in this file are of generic nature and consist mostly of mappings from the
  23.   VERXXX directives defined by Delphi and C++ Builder to friendly names such as
  24.   DELPHI5 and SUPPORTS_WIDESTRING. These friendly names or subsequently used in
  25.   both libraries to test for compiler versions and/or whether the compiler
  26.   supports certain features (such as widestring's or 64 bit integers. Both
  27.   libraries provide an additional, library specific, include file. For the JCL
  28.   this is JCL.INC. These files should be included in source files instead of
  29.   this file, which is included through the library specific file.
  30.  
  31. - Development environment directives
  32.  
  33.   This file defines two driectives to indicate which development environment the
  34.   library is being compiled with. Currently this can either be Delphi or
  35.   C++ Builder (in the near future "Kylix" will be added).
  36.  
  37.   Directive    Description
  38.   ------------------------------------------------------------------------------
  39.   DELPHI       Defined if compiled with Delphi
  40.   BCB          Defined if compiled with C++ Builder
  41.  
  42. - Platform Directives
  43.  
  44.   Platform directives are not explicitly defined in this file but are defined
  45.   by the compiler itself. They are listed here only for completeness.
  46.  
  47.   Directive    Description
  48.   ------------------------------------------------------------------------------
  49.   WIN32        Defined when target platform is 32 bit Windows
  50.   LINUX        Defined when target platform is Linux
  51.  
  52. - Delphi Versions
  53.  
  54.   The following directives are direct mappings from the VERXXX directives to a
  55.   friendly name of the associated compiler. These directives are only defined if
  56.   the compiler is Delphi (ie DELPHI is defined).
  57.  
  58.   Directive    Description
  59.   ------------------------------------------------------------------------------
  60.   DELPHI1      Defined when compiling with Delphi 1
  61.   DELPHI2      Defined when compiling with Delphi 2
  62.   DELPHI3      Defined when compiling with Delphi 3
  63.   DELPHI4      Defined when compiling with Delphi 4
  64.   DELPHI5      Defined when compiling with Delphi 5
  65.   DELPHI6      Defined when compiling with Delphi 6
  66.   DELPHI1_UP   Defined when compiling with Delphi 1 or higher
  67.   DELPHI2_UP   Defined when compiling with Delphi 2 or higher
  68.   DELPHI3_UP   Defined when compiling with Delphi 3 or higher
  69.   DELPHI4_UP   Defined when compiling with Delphi 4 or higher
  70.   DELPHI5_UP   Defined when compiling with Delphi 5 or higher
  71.   DELPHI6_UP   Defined when compiling with Delphi 6 or higher
  72.  
  73. - C++ Builder Versions
  74.  
  75.   The following directives are direct mappings from the VERXXX directives to a
  76.   friendly name of the associated compiler. These directives are only defined if
  77.   the compiler is C++ Builder (ie BCB is defined).
  78.  
  79.   Directive    Description
  80.   ------------------------------------------------------------------------------
  81.   BCB1         Defined when compiling with C++ Builder 1
  82.   BCB3         Defined when compiling with C++ Builder 3
  83.   BCB4         Defined when compiling with C++ Builder 4
  84.   BCB5         Defined when compiling with C++ Builder 5
  85.   BCB6         Defined when compiling with C++ Builder 6
  86.   BCB1_UP      Defined when compiling with C++ Builder 1 or higher
  87.   BCB3_UP      Defined when compiling with C++ Builder 3 or higher
  88.   BCB4_UP      Defined when compiling with C++ Builder 4 or higher
  89.   BCB5_UP      Defined when compiling with C++ Builder 5 or higher
  90.   BCB6_UP      Defined when compiling with C++ Builder 6 or higher
  91.  
  92. - Compiler Versions
  93.  
  94.   The following directives are direct mappings from the VERXXX directives to a
  95.   friendly name of the associated compiler. Unlike the DELPHI_X and BCB_X
  96.   directives, these directives are indepedent of the development environment.
  97.   That is, they are defined regardless of whether compilation takes place using
  98.   Delphi or C++ Builder.
  99.  
  100.   Directive    Description
  101.   ------------------------------------------------------------------------------
  102.   COMPILER1    Defined when compiling with Delphi 1
  103.   COMPILER2    Defined when compiling with Delphi 2 or C++ Builder 1
  104.   COMPILER3    Defined when compiling with Delphi 3
  105.   COMPILER35   Defined when compiling with C++ Builder 3
  106.   COMPILER4    Defined when compiling with Delphi 4 or C++ Builder 4
  107.   COMPILER5    Defined when compiling with Delphi 5 or C++ Builder 5
  108.   COMPILER6    Defined when compiling with Delphi 6 or C++ Builder 6
  109.   COMPILER1_UP Defined when compiling with Delphi 1 or higher
  110.   COMPILER2_UP Defined when compiling with Delphi 2 or C++ Builder 1 or higher
  111.   COMPILER3_UP Defined when compiling with Delphi 3 or higher
  112.   COMPILER35UP Defined when compiling with C++ Builder 3 or higher
  113.   COMPILER4_UP Defined when compiling with Delphi 4 or C++ Builder 4 or higher
  114.   COMPILER5_UP Defined when compiling with Delphi 5 or C++ Builder 5 or higher
  115.   COMPILER6_UP Defined when compiling with Delphi 6 or C++ Builder 6 or higher
  116.  
  117. - Feature Directives
  118.  
  119.   The features directives are used to test if the compiler supports specific
  120.   features, such as method overloading, and adjust the sources accordingly. Use
  121.   of these directives is preferred over the use of the DELPHI and COMPILER
  122.   directives.
  123.  
  124.   Directive              Description
  125.   ------------------------------------------------------------------------------
  126.   SUPPORTS_WIDESTRING    Compiler supports the WideString type (D3/BCB3 up)
  127.   SUPPORTS_INTERFACE     Compiler supports interfaces (D3/BCB3)
  128.   SUPPORTS_EXTSYM        Compiler supports the $EXTERNALSYM directive (D4/BCB3)
  129.   SUPPORTS_NODEFINE      Compiler supports the $NODEFINE directive (D4/BCB3)
  130.   SUPPORTS_INT64         Compiler supports the Int64 type (D4/BCB4)
  131.   SUPPORTS_DYNAMICARRAYS Compiler supports dynamic arrays (D4/BCB4)
  132.   SUPPORTS_DEFAULTPARAMS Compiler supports default parameters (D4/BCB4)
  133.   SUPPORTS_OVERLOAD      Compiler supports overloading (D4/BCB4)
  134. }
  135.  
  136. // VERXXX to COMPILERX, DELPHIX and BCBX mappings
  137.  
  138. {$IFDEF VER140}
  139.   {$DEFINE COMPILER6}
  140.   {$IFDEF BCB}
  141.     {$DEFINE BCB6}
  142.     {$DEFINE BCB}
  143.   {$ELSE}
  144.     {$DEFINE DELPHI6}
  145.     {$DEFINE DELPHI}
  146.   {$ENDIF}
  147. {$ENDIF}
  148.  
  149. {$IFDEF VER130}
  150.   {$DEFINE COMPILER5}
  151.   {$IFDEF BCB}
  152.     {$DEFINE BCB5}
  153.     {$DEFINE BCB}
  154.   {$ELSE}
  155.     {$DEFINE DELPHI5}
  156.     {$DEFINE DELPHI}
  157.   {$ENDIF}
  158. {$ENDIF}
  159.  
  160. {$IFDEF VER125}
  161.   {$DEFINE COMPILER4}
  162.   {$DEFINE BCB4}
  163.   {$DEFINE BCB}
  164. {$ENDIF}
  165.  
  166. {$IFDEF VER120}
  167.   {$DEFINE COMPILER4}
  168.   {$DEFINE DELPHI4}
  169.   {$DEFINE DELPHI}
  170. {$ENDIF}
  171.  
  172. {$IFDEF VER110}
  173.   {$DEFINE COMPILER35}
  174.   {$DEFINE BCB3}
  175. {$ENDIF}
  176.  
  177. {$IFDEF VER100}
  178.   {$DEFINE COMPILER3}
  179.   {$DEFINE DELPHI3}
  180.   {$DEFINE DELPHI}
  181. {$ENDIF}
  182.  
  183. {$IFDEF VER93}
  184.   {$DEFINE COMPILER2}
  185.   {$DEFINE BCB1}
  186.   {$DEFINE BCB}
  187. {$ENDIF}
  188.  
  189. {$IFDEF VER90}
  190.   {$DEFINE COMPILER2}
  191.   {$DEFINE DELPHI2}
  192.   {$DEFINE DELPHI}
  193. {$ENDIF}
  194.  
  195. {$IFDEF VER80}
  196.   {$DEFINE COMPILER1}
  197.   {$DEFINE DELPHI1}
  198.   {$DEFINE DELPHI}
  199. {$ENDIF}
  200.  
  201. // DELPHIX_UP from DELPHIX mappings
  202.  
  203. {$IFDEF DELPHI6}
  204.   {$DEFINE DELPHI6_UP}
  205.   {$DEFINE DELPHI5_UP}
  206.   {$DEFINE DELPHI4_UP}
  207.   {$DEFINE DELPHI3_UP}
  208.   {$DEFINE DELPHI2_UP}
  209.   {$DEFINE DELPHI1_UP}
  210. {$ENDIF}
  211.  
  212. {$IFDEF DELPHI5}
  213.   {$DEFINE DELPHI5_UP}
  214.   {$DEFINE DELPHI4_UP}
  215.   {$DEFINE DELPHI3_UP}
  216.   {$DEFINE DELPHI2_UP}
  217.   {$DEFINE DELPHI1_UP}
  218. {$ENDIF}
  219.  
  220. {$IFDEF DELPHI4}
  221.   {$DEFINE DELPHI4_UP}
  222.   {$DEFINE DELPHI3_UP}
  223.   {$DEFINE DELPHI2_UP}
  224.   {$DEFINE DELPHI1_UP}
  225. {$ENDIF}
  226.  
  227. {$IFDEF DELPHI3}
  228.   {$DEFINE DELPHI3_UP}
  229.   {$DEFINE DELPHI2_UP}
  230.   {$DEFINE DELPHI1_UP}
  231. {$ENDIF}
  232.  
  233. {$IFDEF DELPHI2}
  234.   {$DEFINE DELPHI2_UP}
  235.   {$DEFINE DELPHI1_UP}
  236. {$ENDIF}
  237.  
  238. {$IFDEF DELPHI1}
  239.   {$DEFINE DELPHI1_UP}
  240. {$ENDIF}
  241.  
  242. // BCBX_UP from BCBX mappings
  243.  
  244. {$IFDEF BCB6}
  245.   {$DEFINE BCB6_UP}
  246.   {$DEFINE BCB5_UP}
  247.   {$DEFINE BCB4_UP}
  248.   {$DEFINE BCB3_UP}
  249.   {$DEFINE BCB1_UP}
  250. {$ENDIF}
  251.  
  252. {$IFDEF BCB5}
  253.   {$DEFINE BCB5_UP}
  254.   {$DEFINE BCB4_UP}
  255.   {$DEFINE BCB3_UP}
  256.   {$DEFINE BCB1_UP}
  257. {$ENDIF}
  258.  
  259. {$IFDEF BCB4}
  260.   {$DEFINE BCB4_UP}
  261.   {$DEFINE BCB3_UP}
  262.   {$DEFINE BCB1_UP}
  263. {$ENDIF}
  264.  
  265. {$IFDEF BCB3}
  266.   {$DEFINE BCB3_UP}
  267.   {$DEFINE BCB1_UP}
  268. {$ENDIF}
  269.  
  270. {$IFDEF BCB1}
  271.   {$DEFINE BCB1_UP}
  272. {$ENDIF}
  273.  
  274. // COMPILERX_UP from COMPILERX mappings
  275.  
  276. {$IFDEF COMPILER6}
  277.   {$DEFINE COMPILER6_UP}
  278.   {$DEFINE COMPILER5_UP}
  279.   {$DEFINE COMPILER4_UP}
  280.   {$DEFINE COMPILER35_UP}
  281.   {$DEFINE COMPILER3_UP}
  282.   {$DEFINE COMPILER2_UP}
  283.   {$DEFINE COMPILER1_UP}
  284. {$ENDIF}
  285.  
  286. {$IFDEF COMPILER5}
  287.   {$DEFINE COMPILER5_UP}
  288.   {$DEFINE COMPILER4_UP}
  289.   {$DEFINE COMPILER35_UP}
  290.   {$DEFINE COMPILER3_UP}
  291.   {$DEFINE COMPILER2_UP}
  292.   {$DEFINE COMPILER1_UP}
  293. {$ENDIF}
  294.  
  295. {$IFDEF COMPILER4}
  296.   {$DEFINE COMPILER4_UP}
  297.   {$DEFINE COMPILER35_UP}
  298.   {$DEFINE COMPILER3_UP}
  299.   {$DEFINE COMPILER2_UP}
  300.   {$DEFINE COMPILER1_UP}
  301. {$ENDIF}
  302.  
  303. {$IFDEF COMPILER35}
  304.   {$DEFINE COMPILER35_UP}
  305.   {$DEFINE COMPILER3_UP}
  306.   {$DEFINE COMPILER2_UP}
  307.   {$DEFINE COMPILER1_UP}
  308. {$ENDIF}
  309.  
  310. {$IFDEF COMPILER3}
  311.   {$DEFINE COMPILER3_UP}
  312.   {$DEFINE COMPILER2_UP}
  313.   {$DEFINE COMPILER1_UP}
  314. {$ENDIF}
  315.  
  316. {$IFDEF COMPILER2}
  317.   {$DEFINE COMPILER2_UP}
  318.   {$DEFINE COMPILER1_UP}
  319. {$ENDIF}
  320.  
  321. {$IFDEF COMPILER1}
  322.   {$DEFINE COMPILER1_UP}
  323. {$ENDIF}
  324.  
  325. // Map COMPILERX_UP to friendly feature names
  326.  
  327. {$IFDEF COMPILER3_UP}
  328.   {$DEFINE SUPPORTS_WIDESTRING}
  329.   {$DEFINE SUPPORTS_INTERFACE}
  330. {$ENDIF}
  331.  
  332. {$IFDEF COMPILER35_UP}
  333.   {$DEFINE SUPPORTS_EXTSYM}
  334.   {$DEFINE SUPPORTS_NODEFINE}
  335. {$ENDIF}
  336.  
  337. {$IFDEF COMPILER4_UP}
  338.   {$DEFINE SUPPORTS_INT64}
  339.   {$DEFINE SUPPORTS_DYNAMICARRAYS}
  340.   {$DEFINE SUPPORTS_DEFAULTPARAMS}
  341.   {$DEFINE SUPPORTS_OVERLOAD}
  342. {$ENDIF}
  343.