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.

515 lines
21 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: mfcstl/mfcstl.hpp
  3. *
  4. * Purpose: Root header for the MFCSTL libraries. Performs various
  5. * compiler and platform discriminations, and definitions of
  6. * types.
  7. *
  8. * Created: 15th January 2002
  9. * Updated: 2nd March 2012
  10. *
  11. * Thanks: To Cludio Albuquerque for suggesting the inclusion of
  12. * atlstr.h.
  13. *
  14. * Home: http://stlsoft.org/
  15. *
  16. * Copyright (c) 2002-2012, Matthew Wilson and Synesis Software
  17. * All rights reserved.
  18. *
  19. * Redistribution and use in source and binary forms, with or without
  20. * modification, are permitted provided that the following conditions are met:
  21. *
  22. * - Redistributions of source code must retain the above copyright notice, this
  23. * list of conditions and the following disclaimer.
  24. * - Redistributions in binary form must reproduce the above copyright notice,
  25. * this list of conditions and the following disclaimer in the documentation
  26. * and/or other materials provided with the distribution.
  27. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
  28. * any contributors may be used to endorse or promote products derived from
  29. * this software without specific prior written permission.
  30. *
  31. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  32. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  33. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  34. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  35. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  36. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  37. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  38. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  39. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  40. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  41. * POSSIBILITY OF SUCH DAMAGE.
  42. *
  43. * ////////////////////////////////////////////////////////////////////// */
  44. #ifndef MFCSTL_INCL_MFCSTL_HPP_MFCSTL
  45. #define MFCSTL_INCL_MFCSTL_HPP_MFCSTL
  46. #define MFCSTL_INCL_H_MFCSTL /* Define the old header include guard */
  47. /* File version */
  48. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  49. # define MFCSTL_VER_MFCSTL_HPP_MFCSTL_MAJOR 3
  50. # define MFCSTL_VER_MFCSTL_HPP_MFCSTL_MINOR 5
  51. # define MFCSTL_VER_MFCSTL_HPP_MFCSTL_REVISION 1
  52. # define MFCSTL_VER_MFCSTL_HPP_MFCSTL_EDIT 93
  53. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  54. /** \file mfcstl/mfcstl.hpp
  55. *
  56. * \brief [C++ only; requires MFC library] The root header for the \ref group__project__mfcstl "MFCSTL" project.
  57. */
  58. /* /////////////////////////////////////////////////////////////////////////
  59. * MFCSTL version
  60. *
  61. * The libraries version information is comprised of major, minor and revision
  62. * components.
  63. *
  64. * The major version is denoted by the _MFCSTL_VER_MAJOR preprocessor symbol.
  65. * A changes to the major version component implies that a dramatic change has
  66. * occurred in the libraries, such that considerable changes to source dependent
  67. * on previous versions would need to be effected.
  68. *
  69. * The minor version is denoted by the _MFCSTL_VER_MINOR preprocessor symbol.
  70. * Changes to the minor version component imply that a significant change has
  71. * occurred to the libraries, either in the addition of new functionality or in
  72. * the destructive change to one or more components such that recomplilation and
  73. * code change may be necessitated.
  74. *
  75. * The revision version is denoted by the _MFCSTL_VER_REVISION preprocessor
  76. * symbol. Changes to the revision version component imply that a bug has been
  77. * fixed. Dependent code should be recompiled in order to pick up the changes.
  78. *
  79. * In addition to the individual version symbols - _MFCSTL_VER_MAJOR,
  80. * _MFCSTL_VER_MINOR and _MFCSTL_VER_REVISION - a composite symbol _MFCSTL_VER
  81. * is defined, where the upper 8 bits are 0, bits 16-23 represent the major
  82. * component, bits 8-15 represent the minor component, and bits 0-7 represent
  83. * the revision component.
  84. *
  85. * Each release of the libraries will bear a different version, and that version
  86. * will also have its own symbol: Version 1.0.1 specifies _MFCSTL_VER_1_0_1.
  87. *
  88. * Thus the symbol _MFCSTL_VER may be compared meaningfully with a specific
  89. * version symbol, e.g. #if _MFCSTL_VER >= _MFCSTL_VER_1_0_1
  90. */
  91. /** \def _MFCSTL_VER_MAJOR
  92. * The major version number of MFCSTL
  93. */
  94. /** \def _MFCSTL_VER_MINOR
  95. * The minor version number of MFCSTL
  96. */
  97. /** \def _MFCSTL_VER_REVISION
  98. * The revision version number of MFCSTL
  99. */
  100. /** \def _MFCSTL_VER
  101. * The current composite version number of MFCSTL
  102. */
  103. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  104. # define _MFCSTL_VER_1_0_1 0x00010001 /*!< Version 1.0.1 */
  105. # define _MFCSTL_VER_1_1_1 0x00010101 /*!< Version 1.1.1 */
  106. # define _MFCSTL_VER_1_2_1 0x00010201 /*!< Version 1.2.1 */
  107. # define _MFCSTL_VER_1_2_2 0x00010202 /*!< Version 1.2.2 */
  108. # define _MFCSTL_VER_1_2_3 0x00010203 /*!< Version 1.2.3 */
  109. # define _MFCSTL_VER_1_3_1 0x00010301 /*!< Version 1.3.1 */
  110. # define _MFCSTL_VER_1_3_2 0x00010302 /*!< Version 1.3.2 */
  111. # define _MFCSTL_VER_1_3_3 0x00010303 /*!< Version 1.3.3 */
  112. # define _MFCSTL_VER_1_3_4 0x00010304 /*!< Version 1.3.4 */
  113. # define _MFCSTL_VER_1_3_5 0x00010305 /*!< Version 1.3.5 */
  114. # define _MFCSTL_VER_1_4_1 0x00010401 /*!< Version 1.4.1 */
  115. # define _MFCSTL_VER_1_4_2 0x00010402 /*!< Version 1.4.2 */
  116. # define _MFCSTL_VER_1_4_3 0x00010403 /*!< Version 1.4.3 */
  117. # define _MFCSTL_VER_1_5_1 0x00010501 /*!< Version 1.5.1 (with STLSoft 1.9.1) */
  118. # define _MFCSTL_VER_1_5_2 0x00010502 /*!< Version 1.5.2 (with STLSoft 1.9.10) */
  119. # define _MFCSTL_VER_1_5_3 0x00010503 /*!< Version 1.5.3 (with STLSoft 1.9.25) */
  120. # define _MFCSTL_VER_1_5_4 0x010504ff /*!< Version 1.5.4 (with STLSoft 1.9.113) */
  121. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  122. #define _MFCSTL_VER_MAJOR 1
  123. #define _MFCSTL_VER_MINOR 5
  124. #define _MFCSTL_VER_REVISION 4
  125. #define _MFCSTL_VER _MFCSTL_VER_1_5_4
  126. /* /////////////////////////////////////////////////////////////////////////
  127. * Includes
  128. */
  129. #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
  130. # include <stlsoft/stlsoft.h>
  131. #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */
  132. #if defined(STLSOFT_COMPILER_IS_BORLAND)
  133. # pragma warn -8022 /* Suppresses "'f()' hides virtual function 'g()'" */
  134. # pragma warn -8084 /* Suppresses "Suggest parentheses to clarify precedence in function 'f()'" */
  135. #endif /* compiler */
  136. #ifndef STLSOFT_INCL_H_AFX
  137. # define STLSOFT_INCL_H_AFX
  138. # include <afx.h> // MFC base header
  139. #endif /* !STLSOFT_INCL_H_AFX */
  140. #if _MFC_VER >= 0x0700
  141. # include <atlstr.h>
  142. #endif /* _MFC_VER */
  143. #if defined(STLSOFT_COMPILER_IS_BORLAND)
  144. # pragma warn .8022 /* Suppresses "'f()' hides virtual function 'g()'" */
  145. # pragma warn .8084 /* Suppresses "Suggest parentheses to clarify precedence in function 'f()'" */
  146. #endif /* compiler */
  147. /* /////////////////////////////////////////////////////////////////////////
  148. * STLSoft version compatibility
  149. */
  150. #if !defined(_STLSOFT_VER) || \
  151. _STLSOFT_VER < 0x010971ff
  152. # error This version of the MFCSTL libraries requires STLSoft version 1.9.113, or later
  153. #endif /* _STLSOFT_VER */
  154. /* /////////////////////////////////////////////////////////////////////////
  155. * Compiler compatibility
  156. *
  157. * Currently the only compilers supported by the MFCSTL libraries are
  158. *
  159. * Borland C++ 5.5, 5.51, 5.6
  160. * Digital Mars C/C++ 8.26 - 8.32
  161. * Metrowerks 2.4 & 3.0 (CodeWarrior 7.0 & 8.0)
  162. * Intel C/C++ 6.0
  163. * Visual C++ 4.2, 5.0, 6.0, 7.0
  164. */
  165. #if defined(STLSOFT_COMPILER_IS_BORLAND)
  166. /* Borland C++ */
  167. # if __BORLANDC__ < 0x0550
  168. # error Versions of Borland C++ prior to 5.5 are not supported by the MFCSTL libraries
  169. # endif /* __BORLANDC__ */
  170. #elif defined(STLSOFT_COMPILER_IS_DMC)
  171. /* Digital Mars C/C++ */
  172. # if __DMC__ < 0x0826
  173. # error Versions of Digital Mars C/C++ prior to 8.26 are not supported by the MFCSTL libraries
  174. # endif /* __DMC__ */
  175. #elif defined(STLSOFT_COMPILER_IS_INTEL)
  176. /* Intel C++ */
  177. # if (__INTEL_COMPILER < 600)
  178. # error Versions of Intel C++ prior to 6.0 are not supported by the MFCSTL libraries
  179. # endif /* __INTEL_COMPILER */
  180. #elif defined(STLSOFT_COMPILER_IS_MWERKS)
  181. /* Metrowerks C++ */
  182. # if (__MWERKS__ & 0xFF00) < 0x2400
  183. # error Versions of Metrowerks CodeWarrior C++ prior to 7.0 are not supported by the MFCSTL libraries
  184. # endif /* __MWERKS__ */
  185. #elif defined(STLSOFT_COMPILER_IS_MSVC)
  186. /* Visual C++ */
  187. # if _MSC_VER < 1020
  188. # error Versions of Visual C++ prior to 4.2 are not supported by the MFCSTL libraries
  189. # endif /* _MSC_VER */
  190. #else /* ? compiler */
  191. /* No recognised compiler */
  192. # ifdef _STLSOFT_FORCE_ANY_COMPILER
  193. # define _MFCSTL_COMPILER_IS_UNKNOWN
  194. # ifdef STLSOFT_COMPILE_VERBOSE
  195. # pragma message("Compiler is unknown to MFCSTL")
  196. # endif /* STLSOFT_COMPILE_VERBOSE */
  197. # else /* ? _STLSOFT_FORCE_ANY_COMPILER */
  198. # error Currently only Borland C++, Digital Mars C/C++, Intel C/C++, Metrowerks CodeWarrior and Visual C++ compilers are supported by the MFCSTL libraries
  199. # endif /* _STLSOFT_FORCE_ANY_COMPILER */
  200. #endif /* compiler */
  201. /* /////////////////////////////////////////////////////////////////////////
  202. * Contract Enforcement
  203. *
  204. * The macro mfcstl_assert provides standard debug-mode assert functionality.
  205. */
  206. /** \brief Defines a runtime assertion
  207. *
  208. * \ingroup group__library__macros__assertion
  209. *
  210. * \param expr Must be non-zero, or an assertion will be fired
  211. */
  212. #define MFCSTL_ASSERT(expr) STLSOFT_ASSERT(expr)
  213. /** \brief Defines a runtime assertion, with message
  214. *
  215. * \ingroup group__library__macros__assertion
  216. *
  217. * \param expr Must be non-zero, or an assertion will be fired
  218. * \param msg The literal character string message to be included in the assertion
  219. */
  220. #define MFCSTL_MESSAGE_ASSERT(msg, expr) STLSOFT_MESSAGE_ASSERT(msg, expr)
  221. /** \brief Defines a compile-time assertion
  222. *
  223. * \ingroup group__library__macros__assertion
  224. *
  225. * \param expr Must be non-zero, or compilation will fail
  226. */
  227. #define MFCSTL_STATIC_ASSERT(expr) STLSOFT_STATIC_ASSERT(expr)
  228. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  229. # define mfcstl_assert(expr) MFCSTL_ASSERT(expr)
  230. # define mfcstl_message_assert(msg, expr) MFCSTL_MESSAGE_ASSERT(msg, expr)
  231. # define mfcstl_static_assert(expr) MFCSTL_STATIC_ASSERT(expr)
  232. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  233. /* /////////////////////////////////////////////////////////////////////////
  234. * Namespace
  235. *
  236. * The MFCSTL components are contained within the mfcstl namespace. This is
  237. * usually an alias for stlsoft::mfcstl_project,
  238. *
  239. * When compilers support namespaces they are defined by default. They can be
  240. * undefined using a cascasing system, as follows:
  241. *
  242. * If _STLSOFT_NO_NAMESPACES is defined, then _MFCSTL_NO_NAMESPACES is defined.
  243. *
  244. * If _MFCSTL_NO_NAMESPACES is defined, then _MFCSTL_NO_NAMESPACE is defined.
  245. *
  246. * If _MFCSTL_NO_NAMESPACE is defined, then the MFCSTL constructs are defined
  247. * in the global scope.
  248. *
  249. * If _STLSOFT_NO_NAMESPACES, _MFCSTL_NO_NAMESPACES and _MFCSTL_NO_NAMESPACE are
  250. * all undefined but the symbol _STLSOFT_NO_NAMESPACE is defined (whence the
  251. * namespace stlsoft does not exist), then the MFCSTL constructs are defined
  252. * within the mfcstl namespace. The definition matrix is as follows:
  253. *
  254. * _STLSOFT_NO_NAMESPACE _MFCSTL_NO_NAMESPACE mfcstl definition
  255. * --------------------- -------------------- -----------------
  256. * not defined not defined = stlsoft::mfcstl_project
  257. * not defined defined not defined
  258. * defined not defined mfcstl
  259. * defined defined not defined
  260. *
  261. *
  262. *
  263. * The macro mfcstl_ns_qual() macro can be used to refer to elements in the
  264. * MFCSTL libraries irrespective of whether they are in the
  265. * stlsoft::mfcstl_project (or mfcstl) namespace or in the global namespace.
  266. *
  267. * Furthermore, some compilers do not support the standard library in the std
  268. * namespace, so the mfcstl_ns_qual_std() macro can be used to refer to elements
  269. * in the MFCSTL libraries irrespective of whether they are in the std namespace
  270. * or in the global namespace.
  271. *
  272. *
  273. * The MFC libraries themselves may or may not be defined within the MFC
  274. * namespace, so the mfcstl_ns_qual_stl() macro can be used to refer to
  275. * elements in the MFCSTL libraries irrespective of whether they are in the std
  276. * namespace or in the global namespace.
  277. */
  278. /* No STLSoft namespaces means no MFCSTL namespaces */
  279. #ifdef _STLSOFT_NO_NAMESPACES
  280. # define _MFCSTL_NO_NAMESPACES
  281. #endif /* _STLSOFT_NO_NAMESPACES */
  282. /* No MFCSTL namespaces means no mfcstl namespace */
  283. #ifdef _MFCSTL_NO_NAMESPACES
  284. # define _MFCSTL_NO_NAMESPACE
  285. #endif /* _MFCSTL_NO_NAMESPACES */
  286. #ifndef _MFCSTL_NO_NAMESPACE
  287. # if defined(_STLSOFT_NO_NAMESPACE) || \
  288. defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  289. /* There is no stlsoft namespace, so must define ::mfcstl */
  290. /** \brief The <code class="namespace">mfcstl</code> namespace contains all components
  291. * in the \ref group__project__mfcstl "MFCSTL" project.
  292. *
  293. * By default, the <code>mfcstl</code> namespace is actually an alias for
  294. * the namespace <code>stlsoft::mfcstl_project</code>, which is where all
  295. * the \ref group__project__mfcstl "MFCSTL" components actually reside. This
  296. * measure allows all components within the main the
  297. * \ref group__project__stlsoft "STLSoft" project (which are defined within
  298. * the <code>stlsoft</code> namespace) to be visible to all components
  299. * "within" the <code>mfcstl</code> namespace. (Otherwise, there would be a
  300. * whole lot of onerous qualification throughout the code of all
  301. * \ref group__projects "sub-projects".)
  302. *
  303. * \note If either/both of the symbols <code>_STLSOFT_NO_NAMESPACES</code>
  304. * and <code>_MFCSTL_NO_NAMESPACE</code> are defined, all
  305. * \ref group__project__mfcstl "MFCSTL" components will be defined in the
  306. * global namespace. Conversely, if the <code>_STLSOFT_NO_NAMESPACE</code>
  307. * symbol (not to be confused with the
  308. * <code>_STLSOFT_NO_NAMESPACES</code> symbol!) is defined - meaning that
  309. * all \ref group__project__stlsoft "main project" components are to be
  310. * defined in the global namespace, and <code>_MFCSTL_NO_NAMESPACE</code>
  311. * is <b>not</b> defined, then all \ref group__project__mfcstl "MFCSTL"
  312. * components will be defined within a bona fide <code>mfcstl</code>
  313. * namespace.
  314. *
  315. * \note This is a vestige of compatibility with compilers with
  316. * no (or no sensible) namespace support that is maintained for reasons of
  317. * backwards compatiblity and because it is, in <i>rare circumstances</i>, a
  318. * useful facility.
  319. */
  320. namespace mfcstl
  321. {
  322. # else
  323. /* Define stlsoft::mfcstl_project */
  324. namespace stlsoft
  325. {
  326. namespace mfcstl_project
  327. {
  328. # endif /* _STLSOFT_NO_NAMESPACE */
  329. #else
  330. stlsoft_ns_using(move_lhs_from_rhs)
  331. #endif /* !_MFCSTL_NO_NAMESPACE */
  332. /** \def mfcstl_ns_qual(x)
  333. * Qualifies with <b>mfcstl::</b> if MFCSTL is using namespaces or, if not, does not qualify
  334. */
  335. /** \def mfcstl_ns_using(x)
  336. * Declares a using directive (with respect to <b>mfcstl</b>) if MFCSTL is using namespaces or, if not, does nothing
  337. */
  338. #ifndef _MFCSTL_NO_NAMESPACE
  339. # define mfcstl_ns_qual(x) ::mfcstl::x
  340. # define mfcstl_ns_using(x) using ::mfcstl::x;
  341. #else /* ? _MFCSTL_NO_NAMESPACE */
  342. # define mfcstl_ns_qual(x) x
  343. # define mfcstl_ns_using(x)
  344. #endif /* !_MFCSTL_NO_NAMESPACE */
  345. /** \def mfcstl_ns_qual_std(x)
  346. * Qualifies with <b>std::</b> if MFCSTL is being translated in the context of the standard library being within the <b>std</b> namespace or, if not, does not qualify
  347. */
  348. /** \def mfcstl_ns_using_std(x)
  349. * Declares a using directive (with respect to <b>std</b>) if MFCSTL is being translated in the context of the standard library being within the <b>std</b> namespace or, if not, does nothing
  350. */
  351. #ifdef STLSOFT_CF_std_NAMESPACE
  352. # define mfcstl_ns_qual_std(x) ::std::x
  353. # define mfcstl_ns_using_std(x) using ::std::x;
  354. #else /* ? STLSOFT_CF_std_NAMESPACE */
  355. # define mfcstl_ns_qual_std(x) x
  356. # define mfcstl_ns_using_std(x)
  357. #endif /* !STLSOFT_CF_std_NAMESPACE */
  358. /* /////////////////////////////////////////////////////////////////////////
  359. * Typedefs
  360. *
  361. * The MFCSTL uses a number of typedefs to aid in compiler-independence in the
  362. * libraries' main code.
  363. */
  364. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  365. typedef stlsoft_ns_qual(ss_char_a_t) ms_char_a_t; //!< Ansi char type
  366. typedef stlsoft_ns_qual(ss_char_w_t) ms_char_w_t; //!< Unicode char type
  367. typedef stlsoft_ns_qual(ss_sint8_t) ms_sint8_t; //!< 8-bit signed integer
  368. typedef stlsoft_ns_qual(ss_uint8_t) ms_uint8_t; //!< 8-bit unsigned integer
  369. typedef stlsoft_ns_qual(ss_int16_t) ms_int16_t; //!< 16-bit integer
  370. typedef stlsoft_ns_qual(ss_sint16_t) ms_sint16_t; //!< 16-bit signed integer
  371. typedef stlsoft_ns_qual(ss_uint16_t) ms_uint16_t; //!< 16-bit unsigned integer
  372. typedef stlsoft_ns_qual(ss_int32_t) ms_int32_t; //!< 32-bit integer
  373. typedef stlsoft_ns_qual(ss_sint32_t) ms_sint32_t; //!< 32-bit signed integer
  374. typedef stlsoft_ns_qual(ss_uint32_t) ms_uint32_t; //!< 32-bit unsigned integer
  375. #ifdef STLSOFT_CF_64BIT_INT_SUPPORT
  376. typedef stlsoft_ns_qual(ss_int64_t) ms_int64_t; //!< 64-bit integer
  377. typedef stlsoft_ns_qual(ss_sint64_t) ms_sint64_t; //!< 64-bit signed integer
  378. typedef stlsoft_ns_qual(ss_uint64_t) ms_uint64_t; //!< 64-bit unsigned integer
  379. #endif /* STLSOFT_CF_64BIT_INT_SUPPORT */
  380. typedef stlsoft_ns_qual(ss_int_t) ms_int_t; //!< integer
  381. typedef stlsoft_ns_qual(ss_sint_t) ms_sint_t; //!< signed integer
  382. typedef stlsoft_ns_qual(ss_uint_t) ms_uint_t; //!< unsigned integer
  383. typedef stlsoft_ns_qual(ss_long_t) ms_long_t; //!< long
  384. typedef stlsoft_ns_qual(ss_bool_t) ms_bool_t; //!< bool
  385. typedef DWORD ms_dword_t; //!< dword
  386. typedef stlsoft_ns_qual(ss_size_t) ms_size_t; //!< size
  387. typedef stlsoft_ns_qual(ss_ptrdiff_t) ms_ptrdiff_t; //!< ptr diff
  388. typedef stlsoft_ns_qual(ss_streampos_t) ms_streampos_t; //!< streampos
  389. typedef stlsoft_ns_qual(ss_streamoff_t) ms_streamoff_t; //!< streamoff
  390. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  391. /* /////////////////////////////////////////////////////////////////////////
  392. * Values
  393. *
  394. * Since the boolean type may not be supported natively on all compilers, the
  395. * values of true and false may also not be provided. Hence the values of
  396. * ms_true_v and ms_false_v are defined, and are used in all code.
  397. */
  398. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  399. #define ms_true_v ss_true_v
  400. #define ms_false_v ss_false_v
  401. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  402. /* /////////////////////////////////////////////////////////////////////////
  403. * Code modification macros
  404. */
  405. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  406. /* Exception signatures. */
  407. #define mfcstl_throw_0() stlsoft_throw_0()
  408. #define mfcstl_throw_1(x1) stlsoft_throw_1(x1)
  409. #define mfcstl_throw_2(x1, x2) stlsoft_throw_2(x1, x2)
  410. #define mfcstl_throw_3(x1, x2, x3) stlsoft_throw_3(x1, x2, x3)
  411. #define mfcstl_throw_4(x1, x2, x3, x4) stlsoft_throw_4(x1, x2, x3, x4)
  412. #define mfcstl_throw_5(x1, x2, x3, x4, x5) stlsoft_throw_5(x1, x2, x3, x4, x5)
  413. #define mfcstl_throw_6(x1, x2, x3, x4, x5, x6) stlsoft_throw_6(x1, x2, x3, x4, x5, x6)
  414. #define mfcstl_throw_7(x1, x2, x3, x4, x5, x6, x7) stlsoft_throw_7(x1, x2, x3, x4, x5, x6, x7)
  415. #define mfcstl_throw_8(x1, x2, x3, x4, x5, x6, x7, x8) stlsoft_throw_8(x1, x2, x3, x4, x5, x6, x7, x8)
  416. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  417. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  418. # define MFCSTL_NUM_ELEMENTS(ar) STLSOFT_NUM_ELEMENTS(ar)
  419. # define mfcstl_num_elements(ar) MFCSTL_NUM_ELEMENTS(ar)
  420. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  421. /** \brief [DEPRECATED] Destroys the given instance \c p of the given type (\c t and \c _type)
  422. *
  423. * \deprecated This is <b>heavily</b> deprecated in favour of \ref STLSOFT_DESTROY_INSTANCE().
  424. */
  425. #define mfcstl_destroy_instance(t, _type, p) STLSOFT_DESTROY_INSTANCE(t, _type, p)
  426. /** \brief [DEPRECATED] Generates an opaque type with the name \c _htype
  427. *
  428. * \deprecated This is <b>heavily</b> deprecated in favour of \ref STLSOFT_GEN_OPAQUE().
  429. */
  430. #define mfcstl_gen_opaque(_htype) STLSOFT_GEN_OPAQUE(_htype)
  431. /* ////////////////////////////////////////////////////////////////////// */
  432. #ifndef _MFCSTL_NO_NAMESPACE
  433. # if defined(_STLSOFT_NO_NAMESPACE) || \
  434. defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  435. } // namespace mfcstl
  436. # else
  437. } // namespace mfcstl_project
  438. } // namespace stlsoft
  439. namespace mfcstl = ::stlsoft::mfcstl_project;
  440. # endif /* _STLSOFT_NO_NAMESPACE */
  441. #endif /* !_MFCSTL_NO_NAMESPACE */
  442. /* /////////////////////////////////////////////////////////////////////////
  443. * Inclusion
  444. */
  445. #ifdef STLSOFT_CF_PRAGMA_ONCE_SUPPORT
  446. # pragma once
  447. #endif /* STLSOFT_CF_PRAGMA_ONCE_SUPPORT */
  448. /* ////////////////////////////////////////////////////////////////////// */
  449. #endif /* MFCSTL_INCL_MFCSTL_HPP_MFCSTL */
  450. /* ///////////////////////////// end of file //////////////////////////// */