You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

575 lines
24 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: inetstl/inetstl.h
  3. *
  4. * Purpose: Root header for the InetSTL libraries. Performs various compiler
  5. * and platform discriminations, and definitions of types.
  6. *
  7. * Created: 24th April 2004
  8. * Updated: 2nd March 2012
  9. *
  10. * Home: http://stlsoft.org/
  11. *
  12. * Copyright (c) 2004-2012, Matthew Wilson and Synesis Software
  13. * All rights reserved.
  14. *
  15. * Redistribution and use in source and binary forms, with or without
  16. * modification, are permitted provided that the following conditions are met:
  17. *
  18. * - Redistributions of source code must retain the above copyright notice, this
  19. * list of conditions and the following disclaimer.
  20. * - Redistributions in binary form must reproduce the above copyright notice,
  21. * this list of conditions and the following disclaimer in the documentation
  22. * and/or other materials provided with the distribution.
  23. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
  24. * any contributors may be used to endorse or promote products derived from
  25. * this software without specific prior written permission.
  26. *
  27. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  28. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  29. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  30. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  31. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  32. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  33. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  34. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  35. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  36. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  37. * POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. * ////////////////////////////////////////////////////////////////////// */
  40. #ifndef INETSTL_INCL_INETSTL_H_INETSTL
  41. #define INETSTL_INCL_INETSTL_H_INETSTL
  42. #define INETSTL_INCL_H_INETSTL
  43. /* File version */
  44. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  45. # define INETSTL_VER_INETSTL_H_INETSTL_MAJOR 3
  46. # define INETSTL_VER_INETSTL_H_INETSTL_MINOR 6
  47. # define INETSTL_VER_INETSTL_H_INETSTL_REVISION 1
  48. # define INETSTL_VER_INETSTL_H_INETSTL_EDIT 53
  49. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  50. /** \file inetstl/inetstl.h \brief [C, C++] The root header for the \ref group__project__inetstl "InetSTL" project. */
  51. /* /////////////////////////////////////////////////////////////////////////
  52. * InetSTL version
  53. *
  54. * The libraries version information is comprised of major, minor and revision
  55. * components.
  56. *
  57. * The major version is denoted by the _INETSTL_VER_MAJOR preprocessor symbol.
  58. * A changes to the major version component implies that a dramatic change has
  59. * occurred in the libraries, such that considerable changes to source dependent
  60. * on previous versions would need to be effected.
  61. *
  62. * The minor version is denoted by the _INETSTL_VER_MINOR preprocessor symbol.
  63. * Changes to the minor version component imply that a significant change has
  64. * occurred to the libraries, either in the addition of new functionality or in
  65. * the destructive change to one or more components such that recomplilation and
  66. * code change may be necessitated.
  67. *
  68. * The revision version is denoted by the _INETSTL_VER_REVISION preprocessor
  69. * symbol. Changes to the revision version component imply that a bug has been
  70. * fixed. Dependent code should be recompiled in order to pick up the changes.
  71. *
  72. * In addition to the individual version symbols - _INETSTL_VER_MAJOR,
  73. * _INETSTL_VER_MINOR and _INETSTL_VER_REVISION - a composite symbol _INETSTL_VER
  74. * is defined, where the upper 8 bits are 0, bits 16-23 represent the major
  75. * component, bits 8-15 represent the minor component, and bits 0-7 represent
  76. * the revision component.
  77. *
  78. * Each release of the libraries will bear a different version, and that version
  79. * will also have its own symbol: Version 1.0.1 specifies _INETSTL_VER_1_0_1.
  80. *
  81. * Thus the symbol _INETSTL_VER may be compared meaningfully with a specific
  82. * version symbol, e.g. #if _INETSTL_VER >= _INETSTL_VER_1_0_1
  83. */
  84. /** \def _INETSTL_VER_MAJOR
  85. * The major version number of InetSTL
  86. */
  87. /** \def _INETSTL_VER_MINOR
  88. * The minor version number of InetSTL
  89. */
  90. /** \def _INETSTL_VER_REVISION
  91. * The revision version number of InetSTL
  92. */
  93. /** \def _INETSTL_VER
  94. * The current composite version number of InetSTL
  95. */
  96. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  97. # define _INETSTL_VER_1_0_1 0x00010001 /*!< Version 1.0.1 */
  98. # define _INETSTL_VER_1_0_2 0x00010002 /*!< Version 1.0.2 */
  99. # define _INETSTL_VER_1_1_1 0x00010101 /*!< Version 1.1.1 */
  100. # define _INETSTL_VER_1_1_2 0x00010102 /*!< Version 1.1.2 */
  101. # define _INETSTL_VER_1_1_3 0x00010103 /*!< Version 1.1.3 */
  102. # define _INETSTL_VER_1_1_4 0x00010104 /*!< Version 1.1.4 */
  103. # define _INETSTL_VER_1_2_1 0x00010201 /*!< Version 1.2.1 (with STLSoft 1.9.1) */
  104. # define _INETSTL_VER_1_2_2 0x00010202 /*!< Version 1.2.2 (with STLSoft 1.9.25) */
  105. # define _INETSTL_VER_1_2_3 0x010203ff /*!< Version 1.2.3 (with STLSoft 1.9.46) */
  106. # define _INETSTL_VER_1_3_1 0x010301ff /*!< Version 1.3.1 (with STLSoft 1.9.79) */
  107. # define _INETSTL_VER_1_3_2 0x010302ff /*!< Version 1.3.2 (with STLSoft 1.9.80) */
  108. # define _INETSTL_VER_1_3_3 0x010303ff /*!< Version 1.3.3 (with STLSoft 1.9.86) */
  109. # define _INETSTL_VER_1_3_4 0x010304ff /*!< Version 1.3.4 (with STLSoft 1.9.91) */
  110. # define _INETSTL_VER_1_3_5 0x010305ff /*!< Version 1.3.5 (with STLSoft 1.9.92) */
  111. # define _INETSTL_VER_1_3_6 0x010306ff /*!< Version 1.3.6 (with STLSoft 1.9.113) */
  112. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  113. #define _INETSTL_VER_MAJOR 1
  114. #define _INETSTL_VER_MINOR 3
  115. #define _INETSTL_VER_REVISION 6
  116. #define _INETSTL_VER _INETSTL_VER_1_3_6
  117. /* /////////////////////////////////////////////////////////////////////////
  118. * Includes
  119. */
  120. /* Strict */
  121. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  122. # ifndef STRICT
  123. # if defined(_INETSTL_STRICT) || \
  124. ( !defined(_INETSTL_NO_STRICT) && \
  125. !defined(NO_STRICT))
  126. # define STRICT 1
  127. # endif /* !NO_STRICT && !_INETSTL_NO_STRICT */
  128. # endif /* STRICT */
  129. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  130. #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
  131. # include <stlsoft/stlsoft.h>
  132. #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */
  133. #if defined(WIN32) || \
  134. defined(WIN64)
  135. # define INETSTL_OS_IS_WINDOWS
  136. # ifndef STLSOFT_INCL_H_WINDOWS
  137. # define STLSOFT_INCL_H_WINDOWS
  138. # include <windows.h>
  139. # endif /* !STLSOFT_INCL_H_WINDOWS */
  140. # ifndef STLSOFT_INCL_H_WININET
  141. # define STLSOFT_INCL_H_WININET
  142. # include <wininet.h>
  143. # endif /* !STLSOFT_INCL_H_WININET */
  144. #else /* ? OS */
  145. #endif /* OS */
  146. /* /////////////////////////////////////////////////////////////////////////
  147. * STLSoft version compatibility
  148. */
  149. #if _STLSOFT_VER < 0x010971ff
  150. # error This version of the InetSTL libraries requires STLSoft version 1.9.113, or later
  151. #endif /* _STLSOFT_VER */
  152. /* /////////////////////////////////////////////////////////////////////////
  153. * Sanity checks
  154. */
  155. /* /////////////////////////////////////////////////////////////////////////
  156. * Compiler compatibility
  157. *
  158. * Currently the only compilers supported by the InetSTL libraries are
  159. *
  160. * Borland C++ 5.5, 5.51, 5.6
  161. * Digital Mars C/C++ 8.26 - 8.32
  162. * Metrowerks 2.4 & 3.0 (CodeWarrior 7.0 & 8.0)
  163. * Intel C/C++ 6.0 & 7.0
  164. * Visual C++ 4.2, 5.0, 6.0, 7.0
  165. * Watcom C/C++ 11.0
  166. */
  167. #if defined(STLSOFT_COMPILER_IS_BORLAND)
  168. /* Borland C++ */
  169. # if __BORLANDC__ < 0x0550
  170. # error Versions of Borland C++ prior to 5.5 are not supported by the InetSTL libraries
  171. # endif /* __BORLANDC__ */
  172. #elif defined(STLSOFT_COMPILER_IS_COMO)
  173. /* Comeau C++ */
  174. # if __COMO_VERSION__ < 4300
  175. # error Versions of Comeau C++ prior to 4.3 are not supported by the InetSTL libraries
  176. # endif /* __COMO_VERSION__ */
  177. #elif defined(STLSOFT_COMPILER_IS_DMC)
  178. /* Digital Mars C/C++ */
  179. # if __DMC__ < 0x0826
  180. # error Versions of Digital Mars C/C++ prior to 8.26 are not supported by the InetSTL libraries
  181. # endif /* __DMC__ */
  182. #elif defined(STLSOFT_COMPILER_IS_GCC)
  183. /* GNU C/C++ */
  184. # if __GNUC__ < 2 || \
  185. ( __GNUC__ == 2 && \
  186. __GNUC_MINOR__ < 95)
  187. # error Versions of GNU C/C++ prior to 2.95 are not supported by the InetSTL libraries
  188. # endif /* __GNUC__ */
  189. #elif defined(STLSOFT_COMPILER_IS_INTEL)
  190. /* Intel C++ */
  191. # if (__INTEL_COMPILER < 600)
  192. # error Versions of Intel C++ prior to 6.0 are not supported by the InetSTL libraries
  193. # endif /* __INTEL_COMPILER */
  194. #elif defined(STLSOFT_COMPILER_IS_MWERKS)
  195. /* Metrowerks C++ */
  196. # if (__MWERKS__ & 0xFF00) < 0x2400
  197. # error Versions of Metrowerks CodeWarrior C++ prior to 7.0 are not supported by the InetSTL libraries
  198. # endif /* __MWERKS__ */
  199. #elif defined(STLSOFT_COMPILER_IS_MSVC)
  200. /* Visual C++ */
  201. # if _MSC_VER < 1020
  202. # error Versions of Visual C++ prior to 4.2 are not supported by the InetSTL libraries
  203. # endif /* _MSC_VER */
  204. #elif defined(STLSOFT_COMPILER_IS_VECTORC)
  205. /* VectorC C/C++ */
  206. #elif defined(STLSOFT_COMPILER_IS_WATCOM)
  207. /* Watcom C/C++ */
  208. # if (__WATCOMC__ < 1200)
  209. # error Versions of Watcom C/C++ prior to 12.0 are not supported by the InetSTL libraries
  210. # endif /* __WATCOMC__ */
  211. #else /* ? compiler */
  212. /* No recognised compiler */
  213. # ifdef _STLSOFT_FORCE_ANY_COMPILER
  214. # define _INETSTL_COMPILER_IS_UNKNOWN
  215. # ifdef STLSOFT_COMPILE_VERBOSE
  216. # pragma message("Compiler is unknown to InetSTL")
  217. # endif /* STLSOFT_COMPILE_VERBOSE */
  218. # else /* ? _STLSOFT_FORCE_ANY_COMPILER */
  219. # error Currently only Borland C++, Digital Mars C/C++, Intel C/C++, Metrowerks CodeWarrior and Visual C++ compilers are supported by the InetSTL libraries
  220. # endif /* _STLSOFT_FORCE_ANY_COMPILER */
  221. #endif /* compiler */
  222. /* /////////////////////////////////////////////////////////////////////////
  223. * Contract Enforcement
  224. *
  225. * The macro inetstl_assert provides standard debug-mode assert functionality.
  226. */
  227. /** \brief Defines a runtime assertion
  228. *
  229. * \ingroup group__library__macros__assertion
  230. *
  231. * \param expr Must be non-zero, or an assertion will be fired
  232. */
  233. #define INETSTL_ASSERT(expr) STLSOFT_ASSERT(expr)
  234. /** \brief Defines a runtime assertion, with message
  235. *
  236. * \ingroup group__library__macros__assertion
  237. *
  238. * \param expr Must be non-zero, or an assertion will be fired
  239. * \param msg The literal character string message to be included in the assertion
  240. */
  241. #define INETSTL_MESSAGE_ASSERT(msg, expr) STLSOFT_MESSAGE_ASSERT(msg, expr)
  242. /** \brief Defines a compile-time assertion
  243. *
  244. * \ingroup group__library__macros__assertion
  245. *
  246. * \param expr Must be non-zero, or compilation will fail
  247. */
  248. #define INETSTL_STATIC_ASSERT(expr) STLSOFT_STATIC_ASSERT(expr)
  249. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  250. # define inetstl_assert(expr) INETSTL_ASSERT(expr)
  251. # define inetstl_message_assert(msg, expr) INETSTL_MESSAGE_ASSERT(msg, expr)
  252. # define inetstl_static_assert(expr) INETSTL_STATIC_ASSERT(expr)
  253. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  254. /* /////////////////////////////////////////////////////////////////////////
  255. * Namespace
  256. *
  257. * The InetSTL components are contained within the inetstl namespace. This is
  258. * usually an alias for stlsoft::inetstl_project,
  259. *
  260. * When compilers support namespaces they are defined by default. They can be
  261. * undefined using a cascasing system, as follows:
  262. *
  263. * If _STLSOFT_NO_NAMESPACES is defined, then _INETSTL_NO_NAMESPACES is defined.
  264. *
  265. * If _INETSTL_NO_NAMESPACES is defined, then _INETSTL_NO_NAMESPACE is defined.
  266. *
  267. * If _INETSTL_NO_NAMESPACE is defined, then the InetSTL constructs are defined
  268. * in the global scope.
  269. *
  270. * If _STLSOFT_NO_NAMESPACES, _INETSTL_NO_NAMESPACES and _INETSTL_NO_NAMESPACE are
  271. * all undefined but the symbol _STLSOFT_NO_NAMESPACE is defined (whence the
  272. * namespace stlsoft does not exist), then the InetSTL constructs are defined
  273. * within the inetstl namespace. The definition matrix is as follows:
  274. *
  275. * _STLSOFT_NO_NAMESPACE _INETSTL_NO_NAMESPACE inetstl definition
  276. * --------------------- -------------------- -----------------
  277. * not defined not defined = stlsoft::inetstl_project
  278. * not defined defined not defined
  279. * defined not defined inetstl
  280. * defined defined not defined
  281. *
  282. *
  283. *
  284. * The macro inetstl_ns_qual() macro can be used to refer to elements in the
  285. * InetSTL libraries irrespective of whether they are in the
  286. * stlsoft::inetstl_project (or inetstl) namespace or in the global namespace.
  287. *
  288. * Furthermore, some compilers do not support the standard library in the std
  289. * namespace, so the inetstl_ns_qual_std() macro can be used to refer to elements
  290. * in the InetSTL libraries irrespective of whether they are in the std namespace
  291. * or in the global namespace.
  292. */
  293. /* No STLSoft namespaces means no InetSTL namespaces */
  294. #ifdef _STLSOFT_NO_NAMESPACES
  295. # define _INETSTL_NO_NAMESPACES
  296. #endif /* _STLSOFT_NO_NAMESPACES */
  297. /* No InetSTL namespaces means no inetstl namespace */
  298. #ifdef _INETSTL_NO_NAMESPACES
  299. # define _INETSTL_NO_NAMESPACE
  300. #endif /* _INETSTL_NO_NAMESPACES */
  301. #ifndef _INETSTL_NO_NAMESPACE
  302. # if defined(_STLSOFT_NO_NAMESPACE) || \
  303. defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  304. /* There is no stlsoft namespace, so must define ::inetstl */
  305. /** \brief The <code class="namespace">inetstl</code> namespace contains all components
  306. * in the \ref group__project__inetstl "InetSTL" project.
  307. *
  308. * By default, the <code>inetstl</code> namespace is actually an alias for
  309. * the namespace <code>stlsoft::inetstl_project</code>, which is where all
  310. * the \ref group__project__inetstl "InetSTL" components actually reside. This
  311. * measure allows all components within the main the
  312. * \ref group__project__stlsoft "STLSoft" project (which are defined within
  313. * the <code>stlsoft</code> namespace) to be visible to all components
  314. * "within" the <code>inetstl</code> namespace. (Otherwise, there would be a
  315. * whole lot of onerous qualification throughout the code of all
  316. * \ref group__projects "sub-projects".)
  317. *
  318. * \note If either/both of the symbols <code>_STLSOFT_NO_NAMESPACES</code>
  319. * and <code>_INETSTL_NO_NAMESPACE</code> are defined, all
  320. * \ref group__project__inetstl "InetSTL" components will be defined in the
  321. * global namespace. Conversely, if the <code>_STLSOFT_NO_NAMESPACE</code>
  322. * symbol (not to be confused with the
  323. * <code>_STLSOFT_NO_NAMESPACES</code> symbol!) is defined - meaning that
  324. * all \ref group__project__stlsoft "main project" components are to be
  325. * defined in the global namespace, and <code>_INETSTL_NO_NAMESPACE</code>
  326. * is <b>not</b> defined, then all \ref group__project__inetstl "InetSTL"
  327. * components will be defined within a bona fide <code>inetstl`</code>
  328. * namespace.
  329. *
  330. * \note This is a vestige of compatibility with compilers with
  331. * no (or no sensible) namespace support that is maintained for reasons of
  332. * backwards compatiblity and because it is, in <i>rare circumstances</i>, a
  333. * useful facility.
  334. */
  335. namespace inetstl
  336. {
  337. # else
  338. /* Define stlsoft::inetstl_project */
  339. namespace stlsoft
  340. {
  341. namespace inetstl_project
  342. {
  343. # endif /* _STLSOFT_NO_NAMESPACE */
  344. #else
  345. stlsoft_ns_using(move_lhs_from_rhs)
  346. #endif /* !_INETSTL_NO_NAMESPACE */
  347. /** \def inetstl_ns_qual(x)
  348. * Qualifies with <b>inetstl::</b> if InetSTL is using namespaces or, if not, does not qualify
  349. */
  350. /** \def inetstl_ns_using(x)
  351. * Declares a using directive (with respect to <b>inetstl</b>) if InetSTL is using namespaces or, if not, does nothing
  352. */
  353. #ifndef _INETSTL_NO_NAMESPACE
  354. # define inetstl_ns_qual(x) ::inetstl::x
  355. # define inetstl_ns_using(x) using ::inetstl::x;
  356. #else /* ? _INETSTL_NO_NAMESPACE */
  357. # define inetstl_ns_qual(x) x
  358. # define inetstl_ns_using(x)
  359. #endif /* !_INETSTL_NO_NAMESPACE */
  360. /** \def inetstl_ns_qual_std(x)
  361. * Qualifies with <b>std::</b> if InetSTL is being translated in the context of the standard library being within the <b>std</b> namespace or, if not, does not qualify
  362. */
  363. /** \def inetstl_ns_using_std(x)
  364. * Declares a using directive (with respect to <b>std</b>) if InetSTL is being translated in the context of the standard library being within the <b>std</b> namespace or, if not, does nothing
  365. */
  366. #ifdef STLSOFT_CF_std_NAMESPACE
  367. # define inetstl_ns_qual_std(x) ::std::x
  368. # define inetstl_ns_using_std(x) using ::std::x;
  369. #else /* ? STLSOFT_CF_std_NAMESPACE */
  370. # define inetstl_ns_qual_std(x) x
  371. # define inetstl_ns_using_std(x)
  372. #endif /* !STLSOFT_CF_std_NAMESPACE */
  373. /* /////////////////////////////////////////////////////////////////////////
  374. * Typedefs
  375. *
  376. * The InetSTL uses a number of typedefs to aid in compiler-independence in the
  377. * libraries' main code.
  378. */
  379. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  380. typedef stlsoft_ns_qual(ss_char_a_t) is_char_a_t; /*!< Ansi char type */
  381. typedef stlsoft_ns_qual(ss_char_w_t) is_char_w_t; /*!< Unicode char type */
  382. typedef stlsoft_ns_qual(ss_sint8_t) is_sint8_t; /*!< 8-bit signed integer */
  383. typedef stlsoft_ns_qual(ss_uint8_t) is_uint8_t; /*!< 8-bit unsigned integer */
  384. typedef stlsoft_ns_qual(ss_int16_t) is_int16_t; /*!< 16-bit integer */
  385. typedef stlsoft_ns_qual(ss_sint16_t) is_sint16_t; /*!< 16-bit signed integer */
  386. typedef stlsoft_ns_qual(ss_uint16_t) is_uint16_t; /*!< 16-bit unsigned integer */
  387. typedef stlsoft_ns_qual(ss_int32_t) is_int32_t; /*!< 32-bit integer */
  388. typedef stlsoft_ns_qual(ss_sint32_t) is_sint32_t; /*!< 32-bit signed integer */
  389. typedef stlsoft_ns_qual(ss_uint32_t) is_uint32_t; /*!< 32-bit unsigned integer */
  390. #ifdef STLSOFT_CF_64BIT_INT_SUPPORT
  391. typedef stlsoft_ns_qual(ss_int64_t) is_int64_t; /*!< 64-bit integer */
  392. typedef stlsoft_ns_qual(ss_sint64_t) is_sint64_t; /*!< 64-bit signed integer */
  393. typedef stlsoft_ns_qual(ss_uint64_t) is_uint64_t; /*!< 64-bit unsigned integer */
  394. #endif /* STLSOFT_CF_64BIT_INT_SUPPORT */
  395. typedef stlsoft_ns_qual(ss_int_t) is_int_t; /*!< integer */
  396. typedef stlsoft_ns_qual(ss_sint_t) is_sint_t; /*!< signed integer */
  397. typedef stlsoft_ns_qual(ss_uint_t) is_uint_t; /*!< unsigned integer */
  398. typedef stlsoft_ns_qual(ss_long_t) is_long_t; /*!< long */
  399. typedef stlsoft_ns_qual(ss_byte_t) is_byte_t; /*!< byte type */
  400. #ifdef __cplusplus
  401. typedef stlsoft_ns_qual(ss_bool_t) is_bool_t; /*!< Boolean type */
  402. #endif /* __cplusplus */
  403. # ifdef INETSTL_OS_IS_WINDOWS
  404. typedef DWORD is_dword_t; /*!< dword */
  405. # endif /* INETSTL_OS_IS_WINDOWS */
  406. typedef stlsoft_ns_qual(ss_size_t) is_size_t; /*!< size */
  407. typedef stlsoft_ns_qual(ss_ptrdiff_t) is_ptrdiff_t; /*!< ptr diff */
  408. typedef stlsoft_ns_qual(ss_streampos_t) is_streampos_t; /*!< streampos */
  409. typedef stlsoft_ns_qual(ss_streamoff_t) is_streamoff_t; /*!< streamoff */
  410. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  411. #ifndef _INETSTL_NO_NAMESPACE
  412. typedef is_char_a_t char_a_t; /*!< Ansi char type */
  413. typedef is_char_w_t char_w_t; /*!< Unicode char type */
  414. typedef is_sint8_t sint8_t; /*!< 8-bit signed integer */
  415. typedef is_uint8_t uint8_t; /*!< 8-bit unsigned integer */
  416. typedef is_int16_t int16_t; /*!< 16-bit integer */
  417. typedef is_sint16_t sint16_t; /*!< 16-bit signed integer */
  418. typedef is_uint16_t uint16_t; /*!< 16-bit unsigned integer */
  419. typedef is_int32_t int32_t; /*!< 32-bit integer */
  420. typedef is_sint32_t sint32_t; /*!< 32-bit signed integer */
  421. typedef is_uint32_t uint32_t; /*!< 32-bit unsigned integer */
  422. # ifdef STLSOFT_CF_64BIT_INT_SUPPORT
  423. typedef is_int64_t int64_t; /*!< 64-bit integer */
  424. typedef is_sint64_t sint64_t; /*!< 64-bit signed integer */
  425. typedef is_uint64_t uint64_t; /*!< 64-bit unsigned integer */
  426. # endif /* STLSOFT_CF_64BIT_INT_SUPPORT */
  427. typedef is_int_t int_t; /*!< integer */
  428. typedef is_sint_t sint_t; /*!< signed integer */
  429. typedef is_uint_t uint_t; /*!< unsigned integer */
  430. typedef is_long_t long_t; /*!< long integer */
  431. typedef is_byte_t byte_t; /*!< byte type */
  432. typedef is_bool_t bool_t; /*!< Boolean type */
  433. # ifdef INETSTL_OS_IS_WINDOWS
  434. typedef is_dword_t dword_t; /*!< dword */
  435. # endif /* INETSTL_OS_IS_WINDOWS */
  436. # if !defined(STLSOFT_COMPILER_IS_DMC)
  437. typedef is_streampos_t streampos_t; /*!< streampos */
  438. typedef is_streamoff_t streamoff_t; /*!< streamoff */
  439. # endif /* compiler */
  440. #endif /* !_INETSTL_NO_NAMESPACE */
  441. /* /////////////////////////////////////////////////////////////////////////
  442. * Values
  443. *
  444. * Since the boolean type may not be supported natively on all compilers, the
  445. * values of true and false may also not be provided. Hence the values of
  446. * is_true_v and is_false_v are defined, and are used in all code.
  447. */
  448. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  449. #define is_true_v ss_true_v
  450. #define is_false_v ss_false_v
  451. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  452. /* /////////////////////////////////////////////////////////////////////////
  453. * Code modification macros
  454. */
  455. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  456. /* Exception signatures. */
  457. # define inetstl_throw_0() stlsoft_throw_0()
  458. # define inetstl_throw_1(x1) stlsoft_throw_1(x1)
  459. # define inetstl_throw_2(x1, x2) stlsoft_throw_2(x1, x2)
  460. # define inetstl_throw_3(x1, x2, x3) stlsoft_throw_3(x1, x2, x3)
  461. # define inetstl_throw_4(x1, x2, x3, x4) stlsoft_throw_4(x1, x2, x3, x4)
  462. # define inetstl_throw_5(x1, x2, x3, x4, x5) stlsoft_throw_5(x1, x2, x3, x4, x5)
  463. # define inetstl_throw_6(x1, x2, x3, x4, x5, x6) stlsoft_throw_6(x1, x2, x3, x4, x5, x6)
  464. # define inetstl_throw_7(x1, x2, x3, x4, x5, x6, x7) stlsoft_throw_7(x1, x2, x3, x4, x5, x6, x7)
  465. # define inetstl_throw_8(x1, x2, x3, x4, x5, x6, x7, x8) stlsoft_throw_8(x1, x2, x3, x4, x5, x6, x7, x8)
  466. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  467. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  468. # define INETSTL_NUM_ELEMENTS(ar) STLSOFT_NUM_ELEMENTS(ar)
  469. # define inetstl_num_elements(ar) INETSTL_NUM_ELEMENTS(ar)
  470. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  471. /** \brief [DEPRECATED] Destroys the given instance \c p of the given type (\c t and \c _type)
  472. *
  473. * \deprecated This is <b>heavily</b> deprecated in favour of \ref STLSOFT_DESTROY_INSTANCE().
  474. */
  475. #define inetstl_destroy_instance(t, _type, p) STLSOFT_DESTROY_INSTANCE(t, _type, p)
  476. /** \brief [DEPRECATED] Generates an opaque type with the name \c _htype
  477. *
  478. * \deprecated This is <b>heavily</b> deprecated in favour of \ref STLSOFT_GEN_OPAQUE().
  479. */
  480. #define inetstl_gen_opaque(_htype) STLSOFT_GEN_OPAQUE(_htype)
  481. /* ////////////////////////////////////////////////////////////////////// */
  482. #ifndef _INETSTL_NO_NAMESPACE
  483. # if defined(_STLSOFT_NO_NAMESPACE) || \
  484. defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  485. } /* namespace inetstl */
  486. # else
  487. } /* namespace inetstl_project */
  488. } /* namespace stlsoft */
  489. namespace inetstl = ::stlsoft::inetstl_project;
  490. # endif /* _STLSOFT_NO_NAMESPACE */
  491. #endif /* !_INETSTL_NO_NAMESPACE */
  492. /* /////////////////////////////////////////////////////////////////////////
  493. * Inclusion
  494. */
  495. #ifdef STLSOFT_CF_PRAGMA_ONCE_SUPPORT
  496. # pragma once
  497. #endif /* STLSOFT_CF_PRAGMA_ONCE_SUPPORT */
  498. /* ////////////////////////////////////////////////////////////////////// */
  499. #endif /* INETSTL_INCL_INETSTL_H_INETSTL */
  500. /* ///////////////////////////// end of file //////////////////////////// */