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.

549 lines
21 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: wtlstl/wtlstl.hpp
  3. *
  4. * Purpose: Root header for the WTLSTL libraries. Performs various compiler
  5. * and platform discriminations, and definitions of types.
  6. *
  7. * Created: 12th May 2003
  8. * Updated: 2nd March 2012
  9. *
  10. * Home: http://stlsoft.org/
  11. *
  12. * Copyright (c) 2003-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 WTLSTL_INCL_WTLSTL_HPP_WTLSTL
  41. #define WTLSTL_INCL_WTLSTL_HPP_WTLSTL
  42. #define WTLSTL_INCL_H_WTLSTL
  43. /* File version */
  44. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  45. # define _WTLSTL_VER_WTLSTL_HPP_WTLSTL_MAJOR 2
  46. # define _WTLSTL_VER_WTLSTL_HPP_WTLSTL_MINOR 3
  47. # define _WTLSTL_VER_WTLSTL_HPP_WTLSTL_REVISION 5
  48. # define _WTLSTL_VER_WTLSTL_HPP_WTLSTL_EDIT 43
  49. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  50. /** \file wtlstl/wtlstl.hpp
  51. *
  52. * \brief [C++ only; requires WTL library] The root header for the \ref group__project__wtlstl "WTLSTL" project.
  53. */
  54. /* /////////////////////////////////////////////////////////////////////////
  55. * WTLSTL version
  56. *
  57. * The libraries version information is comprised of major, minor and revision
  58. * components.
  59. *
  60. * The major version is denoted by the _WTLSTL_VER_MAJOR preprocessor symbol.
  61. * A changes to the major version component implies that a dramatic change has
  62. * occurred in the libraries, such that considerable changes to source dependent
  63. * on previous versions would need to be effected.
  64. *
  65. * The minor version is denoted by the _WTLSTL_VER_MINOR preprocessor symbol.
  66. * Changes to the minor version component imply that a significant change has
  67. * occurred to the libraries, either in the addition of new functionality or in
  68. * the destructive change to one or more components such that recomplilation and
  69. * code change may be necessitated.
  70. *
  71. * The revision version is denoted by the _WTLSTL_VER_REVISION preprocessor
  72. * symbol. Changes to the revision version component imply that a bug has been
  73. * fixed. Dependent code should be recompiled in order to pick up the changes.
  74. *
  75. * In addition to the individual version symbols - _WTLSTL_VER_MAJOR,
  76. * _WTLSTL_VER_MINOR and _WTLSTL_VER_REVISION - a composite symbol _WTLSTL_VER
  77. * is defined, where the upper 8 bits are 0, bits 16-23 represent the major
  78. * component, bits 8-15 represent the minor component, and bits 0-7 represent
  79. * the revision component.
  80. *
  81. * Each release of the libraries will bear a different version, and that version
  82. * will also have its own symbol: Version 1.0.1 specifies _WTLSTL_VER_1_0_1.
  83. *
  84. * Thus the symbol _WTLSTL_VER may be compared meaningfully with a specific
  85. * version symbol, e.g. #if _WTLSTL_VER >= _WTLSTL_VER_1_0_1
  86. */
  87. /** \def _WTLSTL_VER_MAJOR
  88. * The major version number of WTLSTL
  89. */
  90. /** \def _WTLSTL_VER_MINOR
  91. * The minor version number of WTLSTL
  92. */
  93. /** \def _WTLSTL_VER_REVISION
  94. * The revision version number of WTLSTL
  95. */
  96. /** \def _WTLSTL_VER
  97. * The current composite version number of WTLSTL
  98. */
  99. #define _WTLSTL_VER_1_0_1 0x00010001 /*!< Version 1.0.1 */
  100. #define _WTLSTL_VER_1_1_1 0x00010101 /*!< Version 1.1.1 */
  101. #define _WTLSTL_VER_1_1_2 0x00010102 /*!< Version 1.1.2 */
  102. #define _WTLSTL_VER_1_2_1 0x00010201 /*!< Version 1.2.1 */
  103. #define _WTLSTL_VER_1_2_2 0x00010202 /*!< Version 1.2.2 (with STLSoft 1.9.25) */
  104. #define _WTLSTL_VER_MAJOR 1
  105. #define _WTLSTL_VER_MINOR 2
  106. #define _WTLSTL_VER_REVISION 2
  107. #define _WTLSTL_VER _WTLSTL_VER_1_2_2
  108. /* /////////////////////////////////////////////////////////////////////////
  109. * Includes
  110. */
  111. #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
  112. # include <stlsoft/stlsoft.h>
  113. #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */
  114. /* In order to be compatible with Visual C++ 5.0, we need to define a few
  115. * things before we include the WTL headers to convince WTL 3.1 that we are
  116. * valid.
  117. */
  118. #if defined(STLSOFT_COMPILER_IS_MSVC) && \
  119. _MSC_VER < 1200
  120. # ifndef MIDL_INTERFACE
  121. # define MIDL_INTERFACE(x) struct
  122. # endif /* !MIDL_INTERFACE */
  123. # ifndef LONG_PTR
  124. # define LONG_PTR LONG
  125. # endif /* !LONG_PTR */
  126. # ifndef UINT_PTR
  127. # define UINT_PTR unsigned int
  128. # endif /* !UINT_PTR */
  129. # ifndef _ATL_NO_MSIMG
  130. # define _ATL_NO_MSIMG
  131. # endif /* !_ATL_NO_MSIMG */
  132. # ifndef ATLASSERT
  133. # define ATLASSERT _ASSERTE
  134. # endif /* !ATLASSERT */
  135. # ifndef _WIN32_IE
  136. # define _WIN32_IE 0x0300
  137. # endif /* !_WIN32_IE */
  138. #endif /* _MSC_VER < 1200 */
  139. /* Now we include AtlApp.h here */
  140. #ifdef STLSOFT_UNITTEST
  141. # include <atlbase.h>
  142. #endif /* STLSOFT_UNITTEST */
  143. #ifndef STLSOFT_INCL_H_ATLAPP
  144. # define STLSOFT_INCL_H_ATLAPP
  145. # include <atlapp.h> // WTL base header
  146. #endif /* !STLSOFT_INCL_H_ATLAPP */
  147. #if !defined(_WTL_VER) || \
  148. _WTL_VER < 0x0310
  149. # error WTLSTL supports WTL version 3.1 and above only
  150. #endif /* _WTL_VER < 0x0310 */
  151. /* /////////////////////////////////////////////////////////////////////////
  152. * STLSoft version compatibility
  153. */
  154. #if !defined(_STLSOFT_VER) || \
  155. _STLSOFT_VER < 0x010971ff
  156. # error This version of the WTLSTL libraries requires STLSoft version 1.9.113, or later
  157. #endif /* _STLSOFT_VER */
  158. /* /////////////////////////////////////////////////////////////////////////
  159. * Compiler compatibility
  160. *
  161. * Currently the only compilers supported by the WTLSTL libraries are
  162. *
  163. * Borland C++ 5.5, 5.51, 5.6
  164. * Digital Mars C/C++ 8.26 - 8.32
  165. * Metrowerks 2.4 & 3.0 (CodeWarrior 7.0 & 8.0)
  166. * Intel C/C++ 6.0
  167. * Visual C++ 5.0, 6.0, 7.0
  168. */
  169. #if defined(STLSOFT_COMPILER_IS_BORLAND)
  170. /* Borland C++ */
  171. # if __BORLANDC__ < 0x0550
  172. # error Versions of Borland C++ prior to 5.5 are not supported by the WTLSTL libraries
  173. # endif /* __BORLANDC__ */
  174. #elif defined(STLSOFT_COMPILER_IS_DMC)
  175. /* Digital Mars C/C++ */
  176. # if __DMC__ < 0x0826
  177. # error Versions of Digital Mars C/C++ prior to 8.26 are not supported by the WTLSTL libraries
  178. # endif /* __DMC__ */
  179. #elif defined(STLSOFT_COMPILER_IS_INTEL)
  180. /* Intel C++ */
  181. # if (__INTEL_COMPILER < 600)
  182. # error Versions of Intel C++ prior to 6.0 are not supported by the WTLSTL libraries
  183. # endif /* __INTEL_COMPILER */
  184. #elif defined(STLSOFT_COMPILER_IS_MWERKS)
  185. /* Metrowerks C++ */
  186. # if (__MWERKS__ & 0xFF00) < 0x2400
  187. # error Versions of Metrowerks CodeWarrior C++ prior to 7.0 are not supported by the WTLSTL libraries
  188. # endif /* __MWERKS__ */
  189. #elif defined(STLSOFT_COMPILER_IS_MSVC)
  190. /* Visual C++ */
  191. # if _MSC_VER < 1100
  192. # error Versions of Visual C++ prior to 5.0 are not supported by the WTLSTL libraries
  193. # endif /* _MSC_VER */
  194. #else /* ? compiler */
  195. /* No recognised compiler */
  196. # ifdef _STLSOFT_FORCE_ANY_COMPILER
  197. # define _WTLSTL_COMPILER_IS_UNKNOWN
  198. # ifdef STLSOFT_COMPILE_VERBOSE
  199. # pragma message("Compiler is unknown to WTLSTL")
  200. # endif /* STLSOFT_COMPILE_VERBOSE */
  201. # else /* ? _STLSOFT_FORCE_ANY_COMPILER */
  202. # error Currently only Borland C++, Digital Mars C/C++, Intel C/C++, Metrowerks CodeWarrior and Visual C++ compilers are supported by the WTLSTL libraries
  203. # endif /* _STLSOFT_FORCE_ANY_COMPILER */
  204. #endif /* compiler */
  205. /* /////////////////////////////////////////////////////////////////////////
  206. * Contract Enforcement
  207. *
  208. * The macro wtlstl_assert provides standard debug-mode assert functionality.
  209. */
  210. /** \brief Defines a runtime assertion
  211. *
  212. * \ingroup group__library__macros__assertion
  213. *
  214. * \param _x Must be non-zero, or an assertion will be fired
  215. */
  216. #define WTLSTL_ASSERT(_x) STLSOFT_ASSERT(_x)
  217. /** \brief Defines a runtime assertion, with message
  218. *
  219. * \ingroup group__library__macros__assertion
  220. *
  221. * \param _x Must be non-zero, or an assertion will be fired
  222. * \param _m The literal character string message to be included in the assertion
  223. */
  224. #define WTLSTL_MESSAGE_ASSERT(_m, _x) STLSOFT_MESSAGE_ASSERT(_m, _x)
  225. /** \brief Defines a compile-time assertion
  226. *
  227. * \ingroup group__library__macros__assertion
  228. *
  229. * \param _x Must be non-zero, or compilation will fail
  230. */
  231. #define WTLSTL_STATIC_ASSERT(_x) STLSOFT_STATIC_ASSERT(_x)
  232. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  233. # define wtlstl_assert(expr) WTLSTL_ASSERT(expr)
  234. # define wtlstl_message_assert(msg, expr) WTLSTL_MESSAGE_ASSERT(msg, expr)
  235. # define wtlstl_static_assert(expr) WTLSTL_STATIC_ASSERT(expr)
  236. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  237. /* /////////////////////////////////////////////////////////////////////////
  238. * Namespace
  239. *
  240. * The WTLSTL components are contained within the wtlstl namespace. This is
  241. * usually an alias for stlsoft::wtlstl_project,
  242. *
  243. * When compilers support namespaces they are defined by default. They can be
  244. * undefined using a cascasing system, as follows:
  245. *
  246. * If _STLSOFT_NO_NAMESPACES is defined, then _WTLSTL_NO_NAMESPACES is defined.
  247. *
  248. * If _WTLSTL_NO_NAMESPACES is defined, then _WTLSTL_NO_NAMESPACE is defined.
  249. *
  250. * If _WTLSTL_NO_NAMESPACE is defined, then the WTLSTL constructs are defined
  251. * in the global scope.
  252. *
  253. * If _STLSOFT_NO_NAMESPACES, _WTLSTL_NO_NAMESPACES and _WTLSTL_NO_NAMESPACE are
  254. * all undefined but the symbol _STLSOFT_NO_NAMESPACE is defined (whence the
  255. * namespace stlsoft does not exist), then the WTLSTL constructs are defined
  256. * within the wtlstl namespace. The definition matrix is as follows:
  257. *
  258. * _STLSOFT_NO_NAMESPACE _WTLSTL_NO_NAMESPACE wtlstl definition
  259. * --------------------- -------------------- -----------------
  260. * not defined not defined = stlsoft::wtlstl_project
  261. * not defined defined not defined
  262. * defined not defined wtlstl
  263. * defined defined not defined
  264. *
  265. *
  266. *
  267. * The macro wtlstl_ns_qual() macro can be used to refer to elements in the
  268. * WTLSTL libraries irrespective of whether they are in the
  269. * stlsoft::wtlstl_project (or wtlstl) namespace or in the global namespace.
  270. *
  271. * Furthermore, some compilers do not support the standard library in the std
  272. * namespace, so the wtlstl_ns_qual_std() macro can be used to refer to elements
  273. * in the WTLSTL libraries irrespective of whether they are in the std namespace
  274. * or in the global namespace.
  275. *
  276. *
  277. * The ATL libraries themselves may or may not be defined within the ATL
  278. * namespace, so the wtlstl_ns_qual_stl() macro can be used to refer to
  279. * elements in the WTLSTL libraries irrespective of whether they are in the std
  280. * namespace or in the global namespace.
  281. */
  282. /* No STLSoft namespaces means no WTLSTL namespaces */
  283. #ifdef _STLSOFT_NO_NAMESPACES
  284. # define _WTLSTL_NO_NAMESPACES
  285. #endif /* _STLSOFT_NO_NAMESPACES */
  286. /* No WTLSTL namespaces means no wtlstl namespace */
  287. #ifdef _WTLSTL_NO_NAMESPACES
  288. # define _WTLSTL_NO_NAMESPACE
  289. #endif /* _WTLSTL_NO_NAMESPACES */
  290. #ifndef _WTLSTL_NO_NAMESPACE
  291. # if defined(_STLSOFT_NO_NAMESPACE) || \
  292. defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  293. /* There is no stlsoft namespace, so must define ::wtlstl */
  294. /** \brief The <code class="namespace">wtlstl</code> namespace contains all components
  295. * in the \ref group__project__wtlstl "WTLSTL" project.
  296. *
  297. * By default, the <code>wtlstl</code> namespace is actually an alias for
  298. * the namespace <code>stlsoft::wtlstl_project</code>, which is where all
  299. * the \ref group__project__wtlstl "WTLSTL" components actually reside. This
  300. * measure allows all components within the main the
  301. * \ref group__project__stlsoft "STLSoft" project (which are defined within
  302. * the <code>stlsoft</code> namespace) to be visible to all components
  303. * "within" the <code>wtlstl</code> namespace. (Otherwise, there would be a
  304. * whole lot of onerous qualification throughout the code of all
  305. * \ref group__projects "sub-projects".)
  306. *
  307. * \note If either/both of the symbols <code>_STLSOFT_NO_NAMESPACES</code>
  308. * and <code>_WTLSTL_NO_NAMESPACE</code> are defined, all
  309. * \ref group__project__wtlstl "WTLSTL" components will be defined in the
  310. * global namespace. Conversely, if the <code>_STLSOFT_NO_NAMESPACE</code>
  311. * symbol (not to be confused with the
  312. * <code>_STLSOFT_NO_NAMESPACES</code> symbol!) is defined - meaning that
  313. * all \ref group__project__stlsoft "main project" components are to be
  314. * defined in the global namespace, and <code>_WTLSTL_NO_NAMESPACE</code>
  315. * is <b>not</b> defined, then all \ref group__project__wtlstl "WTLSTL"
  316. * components will be defined within a bona fide <code>wtlstl</code>
  317. * namespace.
  318. *
  319. * \note This is a vestige of compatibility with compilers with
  320. * no (or no sensible) namespace support that is maintained for reasons of
  321. * backwards compatiblity and because it is, in <i>rare circumstances</i>, a
  322. * useful facility.
  323. */
  324. namespace wtlstl
  325. {
  326. # else
  327. /* Define stlsoft::wtlstl_project */
  328. namespace stlsoft
  329. {
  330. /** \brief The WTLSTL namespace - \c wtlstl (aliased to \c stlsoft::wtlstl_project) - is
  331. * the namespace for the WTLSTL project.
  332. *
  333. */
  334. namespace wtlstl_project
  335. {
  336. # endif /* _STLSOFT_NO_NAMESPACE */
  337. #else
  338. stlsoft_ns_using(move_lhs_from_rhs)
  339. #endif /* !_WTLSTL_NO_NAMESPACE */
  340. /** \def wtlstl_ns_qual(x)
  341. * Qualifies with <b>wtlstl::</b> if WTLSTL is using namespaces or, if not, does not qualify
  342. */
  343. /** \def wtlstl_ns_using(x)
  344. * Declares a using directive (with respect to <b>wtlstl</b>) if WTLSTL is using namespaces or, if not, does nothing
  345. */
  346. #ifndef _WTLSTL_NO_NAMESPACE
  347. # define wtlstl_ns_qual(x) ::wtlstl::x
  348. # define wtlstl_ns_using(x) using ::wtlstl::x;
  349. #else
  350. # define wtlstl_ns_qual(x) x
  351. # define wtlstl_ns_using(x)
  352. #endif /* !_WTLSTL_NO_NAMESPACE */
  353. /** \def wtlstl_ns_qual_std(x)
  354. * Qualifies with <b>std::</b> if WTLSTL is being translated in the context of the standard library being within the <b>std</b> namespace or, if not, does not qualify
  355. */
  356. /** \def wtlstl_ns_using_std(x)
  357. * Declares a using directive (with respect to <b>std</b>) if WTLSTL is being translated in the context of the standard library being within the <b>std</b> namespace or, if not, does nothing
  358. */
  359. #ifdef STLSOFT_CF_std_NAMESPACE
  360. # define wtlstl_ns_qual_std(x) ::std::x
  361. # define wtlstl_ns_using_std(x) using ::std::x;
  362. #else /* ? STLSOFT_CF_std_NAMESPACE */
  363. # define wtlstl_ns_qual_std(x) x
  364. # define wtlstl_ns_using_std(x)
  365. #endif /* !STLSOFT_CF_std_NAMESPACE */
  366. /** \def wtlstl_ns_qual_atl(x)
  367. * Qualifies with <b>ATL::</b> if WTLSTL is being translated in the context of ATL being within the <b>ATL</b> namespace or, if not, does not qualify
  368. */
  369. /** \def wtlstl_ns_using_atl(x)
  370. * Declares a using directive (with respect to <b>ATL</b>) if WTLSTL is being translated in the context of ATL being within the <b>ATL</b> namespace or, if not, does nothing
  371. */
  372. #ifndef ATL_NO_NAMESPACE
  373. # define wtlstl_ns_qual_atl(x) ::ATL::x
  374. # define wtlstl_ns_using_atl(x) using ::ATL::x;
  375. #else
  376. # define wtlstl_ns_qual_atl(x) x
  377. # define wtlstl_ns_using_atl(x)
  378. #endif /* !ATL_NO_NAMESPACE */
  379. /* /////////////////////////////////////////////////////////////////////////
  380. * Typedefs
  381. *
  382. * The WTLSTL uses a number of typedefs to aid in compiler-independence in the
  383. * libraries' main code.
  384. */
  385. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  386. typedef stlsoft_ns_qual(ss_char_a_t) ws_char_a_t; //!< Ansi char type
  387. typedef stlsoft_ns_qual(ss_char_w_t) ws_char_w_t; //!< Unicode char type
  388. typedef stlsoft_ns_qual(ss_sint8_t) ws_sint8_t; //!< 8-bit signed integer
  389. typedef stlsoft_ns_qual(ss_uint8_t) ws_uint8_t; //!< 8-bit unsigned integer
  390. typedef stlsoft_ns_qual(ss_int16_t) ws_int16_t; //!< 16-bit integer
  391. typedef stlsoft_ns_qual(ss_sint16_t) ws_sint16_t; //!< 16-bit signed integer
  392. typedef stlsoft_ns_qual(ss_uint16_t) ws_uint16_t; //!< 16-bit unsigned integer
  393. typedef stlsoft_ns_qual(ss_int32_t) ws_int32_t; //!< 32-bit integer
  394. typedef stlsoft_ns_qual(ss_sint32_t) ws_sint32_t; //!< 32-bit signed integer
  395. typedef stlsoft_ns_qual(ss_uint32_t) ws_uint32_t; //!< 32-bit unsigned integer
  396. #ifdef STLSOFT_CF_64BIT_INT_SUPPORT
  397. typedef stlsoft_ns_qual(ss_int64_t) ws_int64_t; //!< 64-bit integer
  398. typedef stlsoft_ns_qual(ss_sint64_t) ws_sint64_t; //!< 64-bit signed integer
  399. typedef stlsoft_ns_qual(ss_uint64_t) ws_uint64_t; //!< 64-bit unsigned integer
  400. #endif /* STLSOFT_CF_64BIT_INT_SUPPORT */
  401. typedef stlsoft_ns_qual(ss_int_t) ws_int_t; //!< integer
  402. typedef stlsoft_ns_qual(ss_sint_t) ws_sint_t; //!< signed integer
  403. typedef stlsoft_ns_qual(ss_uint_t) ws_uint_t; //!< unsigned integer
  404. typedef stlsoft_ns_qual(ss_long_t) ws_long_t; //!< long
  405. typedef stlsoft_ns_qual(ss_bool_t) ws_bool_t; //!< bool
  406. typedef DWORD ws_dword_t; //!< dword
  407. typedef stlsoft_ns_qual(ss_size_t) ws_size_t; //!< size
  408. typedef stlsoft_ns_qual(ss_ptrdiff_t) ws_ptrdiff_t; //!< ptr diff
  409. typedef stlsoft_ns_qual(ss_streampos_t) ws_streampos_t; //!< streampos
  410. typedef stlsoft_ns_qual(ss_streamoff_t) ws_streamoff_t; //!< streamoff
  411. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  412. /* /////////////////////////////////////////////////////////////////////////
  413. * Values
  414. *
  415. * Since the boolean type may not be supported natively on all compilers, the
  416. * values of true and false may also not be provided. Hence the values of
  417. * ws_true_v and ws_false_v are defined, and are used in all code.
  418. */
  419. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  420. #define ws_true_v ss_true_v
  421. #define ws_false_v ss_false_v
  422. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  423. /* /////////////////////////////////////////////////////////////////////////
  424. * Code modification macros
  425. */
  426. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  427. /* Exception signatures. */
  428. # define wtlstl_throw_0() stlsoft_throw_0()
  429. # define wtlstl_throw_1(x1) stlsoft_throw_1(x1)
  430. # define wtlstl_throw_2(x1, x2) stlsoft_throw_2(x1, x2)
  431. # define wtlstl_throw_3(x1, x2, x3) stlsoft_throw_3(x1, x2, x3)
  432. # define wtlstl_throw_4(x1, x2, x3, x4) stlsoft_throw_4(x1, x2, x3, x4)
  433. # define wtlstl_throw_5(x1, x2, x3, x4, x5) stlsoft_throw_5(x1, x2, x3, x4, x5)
  434. # define wtlstl_throw_6(x1, x2, x3, x4, x5, x6) stlsoft_throw_6(x1, x2, x3, x4, x5, x6)
  435. # define wtlstl_throw_7(x1, x2, x3, x4, x5, x6, x7) stlsoft_throw_7(x1, x2, x3, x4, x5, x6, x7)
  436. # define wtlstl_throw_8(x1, x2, x3, x4, x5, x6, x7, x8) stlsoft_throw_8(x1, x2, x3, x4, x5, x6, x7, x8)
  437. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  438. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  439. # define WTLSTL_NUM_ELEMENTS(ar) STLSOFT_NUM_ELEMENTS(ar)
  440. # define wtlstl_num_elements(ar) WTLSTL_NUM_ELEMENTS(ar)
  441. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  442. /** \brief [DEPRECATED] Destroys the given instance \c p of the given type (\c t and \c _type)
  443. *
  444. * \deprecated This is <b>heavily</b> deprecated in favour of \ref STLSOFT_DESTROY_INSTANCE().
  445. */
  446. #define wtlstl_destroy_instance(t, _type, p) STLSOFT_DESTROY_INSTANCE(t, _type, p)
  447. /** \brief [DEPRECATED] Generates an opaque type with the name \c _htype
  448. *
  449. * \deprecated This is <b>heavily</b> deprecated in favour of \ref STLSOFT_GEN_OPAQUE().
  450. */
  451. #define wtlstl_gen_opaque(_htype) STLSOFT_GEN_OPAQUE(_htype)
  452. /* ////////////////////////////////////////////////////////////////////// */
  453. #ifndef _WTLSTL_NO_NAMESPACE
  454. # if defined(_STLSOFT_NO_NAMESPACE) || \
  455. defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  456. } // namespace wtlstl
  457. # else
  458. } // namespace wtlstl_project
  459. } // namespace stlsoft
  460. namespace wtlstl = ::stlsoft::wtlstl_project;
  461. # endif /* _STLSOFT_NO_NAMESPACE */
  462. #endif /* !_WTLSTL_NO_NAMESPACE */
  463. /* /////////////////////////////////////////////////////////////////////////
  464. * Inclusion
  465. */
  466. #ifdef STLSOFT_CF_PRAGMA_ONCE_SUPPORT
  467. # pragma once
  468. #endif /* STLSOFT_CF_PRAGMA_ONCE_SUPPORT */
  469. /* ////////////////////////////////////////////////////////////////////// */
  470. #endif /* WTLSTL_INCL_WTLSTL_HPP_WTLSTL */
  471. /* ///////////////////////////// end of file //////////////////////////// */