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.

659 lines
32 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: pantheios/quality/contract.h (formerly pantheios/contract/assert.h)
  3. *
  4. * Purpose: Defines the contract enforcement constructs used in the
  5. * Pantheios core and APIs.
  6. *
  7. * Created: 26th June 2005
  8. * Updated: 2nd August 2010
  9. *
  10. * Home: http://www.pantheios.org/
  11. *
  12. * Copyright (c) 2005-2010, Matthew Wilson and Synesis Software
  13. * Copyright (c) 1999-2005, Synesis Software and Matthew Wilson
  14. * All rights reserved.
  15. *
  16. * Redistribution and use in source and binary forms, with or without
  17. * modification, are permitted provided that the following conditions are
  18. * met:
  19. *
  20. * - Redistributions of source code must retain the above copyright notice,
  21. * this list of conditions and the following disclaimer.
  22. * - Redistributions in binary form must reproduce the above copyright
  23. * notice, this list of conditions and the following disclaimer in the
  24. * documentation and/or other materials provided with the distribution.
  25. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the
  26. * names of any contributors may be used to endorse or promote products
  27. * derived from this software without specific prior written permission.
  28. *
  29. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  30. * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  31. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  32. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  33. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  34. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  35. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  36. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  37. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  38. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  39. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  40. *
  41. * ////////////////////////////////////////////////////////////////////// */
  42. /** \file pantheios/quality/contract.h
  43. *
  44. * [C, C++] Defines the contract enforcement constructs used in the
  45. * Pantheios core and APIs.
  46. */
  47. #ifndef PANTHEIOS_INCL_PANTHEIOS_QUALITY_H_CONTRACT
  48. #define PANTHEIOS_INCL_PANTHEIOS_QUALITY_H_CONTRACT
  49. /* /////////////////////////////////////////////////////////////////////////
  50. * Version information
  51. */
  52. #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
  53. # define PANTHEIOS_VER_PANTHEIOS_QUALITY_H_CONTRACT_MAJOR 3
  54. # define PANTHEIOS_VER_PANTHEIOS_QUALITY_H_CONTRACT_MINOR 2
  55. # define PANTHEIOS_VER_PANTHEIOS_QUALITY_H_CONTRACT_REVISION 1
  56. # define PANTHEIOS_VER_PANTHEIOS_QUALITY_H_CONTRACT_EDIT 16
  57. #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */
  58. /* /////////////////////////////////////////////////////////////////////////
  59. * Includes
  60. */
  61. #ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS
  62. # include <pantheios/pantheios.h>
  63. #endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */
  64. #if defined(PANTHEIOS_QA_USE_CUSTOM_CONTRACT)
  65. # include PANTHEIOS_QA_CUSTOM_CONTRACT_INCLUDE
  66. #elif defined(PANTHEIOS_QA_USE_XCONTRACT)
  67. # include <xcontract/xcontract.h>
  68. #else /* ? contract */
  69. # include <stlsoft/stlsoft.h>
  70. #endif /* contract */
  71. /* /////////////////////////////////////////////////////////////////////////
  72. * Helper macros
  73. */
  74. #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
  75. # ifndef PANTHEIOS_QA_DO_MSG_TYPECHECK
  76. /* Since this typecheck is only needed to ensure a coding error has not
  77. * been made, it is not actually necessary to check it on every compiler,
  78. * only on at least one compiler used to verify the distribution before
  79. * release. Therefore, we only do the check on compilers we already know
  80. * to work; for any others we avoid the possible ambiguities (such as
  81. * those we see with GCC in C) between literals and char const*, and so
  82. * on.
  83. */
  84. # ifdef __cplusplus
  85. /* C++ */
  86. # if defined(STLSOFT_COMPILER_IS_BORLAND) || \
  87. defined(STLSOFT_COMPILER_IS_MWERKS) || \
  88. defined(STLSOFT_COMPILER_IS_DMC) || \
  89. defined(STLSOFT_COMPILER_IS_GCC) || \
  90. defined(STLSOFT_COMPILER_IS_MSVC)
  91. # define PANTHEIOS_QA_DO_MSG_TYPECHECK
  92. # endif /* compiler */
  93. # else /* ? __cplusplus */
  94. /* C */
  95. # if defined(STLSOFT_CF_C99_INLINE) || \
  96. defined(STLSOFT_CUSTOM_C_INLINE)
  97. # if defined(STLSOFT_COMPILER_IS_BORLAND) || \
  98. defined(STLSOFT_COMPILER_IS_MWERKS) || \
  99. defined(STLSOFT_COMPILER_IS_DMC) || \
  100. defined(STLSOFT_COMPILER_IS_MSVC)
  101. # define PANTHEIOS_QA_DO_MSG_TYPECHECK
  102. # endif /* compiler */
  103. # endif /* C99 or custom inline */
  104. # endif /* __cplusplus */
  105. # endif /* !PANTHEIOS_QA_DO_MSG_TYPECHECK */
  106. # if defined(PANTHEIOS_QA_DO_MSG_TYPECHECK)
  107. STLSOFT_INLINE char const* PANTHEIOS_TYPECHECK_MSG_(char const* msg)
  108. {
  109. return msg;
  110. }
  111. # if defined(__cplusplus)
  112. # ifdef STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT
  113. template <size_t N>
  114. inline char const* PANTHEIOS_TYPECHECK_MSG_(char (&ar)[N])
  115. {
  116. return &ar[0];
  117. }
  118. # endif /* STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT */
  119. inline void PANTHEIOS_TYPECHECK_MSG_(...)
  120. {}
  121. # endif /* __cplusplus */
  122. # else /* ? PANTHEIOS_QA_DO_MSG_TYPECHECK */
  123. # define PANTHEIOS_TYPECHECK_MSG_(msg) (msg)
  124. # endif /* PANTHEIOS_QA_DO_MSG_TYPECHECK */
  125. #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */
  126. /* /////////////////////////////////////////////////////////////////////////
  127. * Enforcements
  128. */
  129. #if defined(PANTHEIOS_QA_USE_CUSTOM_CONTRACT)
  130. /* If the user is supplying a custom contract library, then they must
  131. * define all the requisite symbols, so we just test their existence.
  132. */
  133. # ifndef PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_INTERNAL
  134. # define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_INTERNAL is not defined by the custom contract library
  135. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_INTERNAL */
  136. # ifndef PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_API
  137. # define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_API is not defined by the custom contract library
  138. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_API */
  139. # ifndef PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_APPL_LAYER
  140. # define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_APPL_LAYER is not defined by the custom contract library
  141. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_APPL_LAYER */
  142. # ifndef PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_INTERNAL
  143. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_INTERNAL is not defined by the custom contract library
  144. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_INTERNAL */
  145. # ifndef PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_API
  146. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_API is not defined by the custom contract library
  147. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_API */
  148. # ifndef PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_APPL_LAYER
  149. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_APPL_LAYER is not defined by the custom contract library
  150. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_APPL_LAYER */
  151. # ifndef PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_INTERNAL
  152. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_INTERNAL is not defined by the custom contract library
  153. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_INTERNAL */
  154. # ifndef PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_API
  155. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_API is not defined by the custom contract library
  156. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_API */
  157. # ifndef PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_APPL_LAYER
  158. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_APPL_LAYER is not defined by the custom contract library
  159. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_APPL_LAYER */
  160. # ifndef PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_INTERNAL
  161. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_INTERNAL is not defined by the custom contract library
  162. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_INTERNAL */
  163. # ifndef PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_API
  164. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_API is not defined by the custom contract library
  165. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_API */
  166. # ifndef PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_APPL_LAYER
  167. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_APPL_LAYER is not defined by the custom contract library
  168. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_APPL_LAYER */
  169. # ifndef PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_INTERNAL
  170. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_INTERNAL is not defined by the custom contract library
  171. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_INTERNAL */
  172. # ifndef PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_API
  173. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_API is not defined by the custom contract library
  174. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_API */
  175. # ifndef PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_APPL_LAYER
  176. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_APPL_LAYER is not defined by the custom contract library
  177. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_APPL_LAYER */
  178. # ifndef PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_INTERNAL
  179. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_INTERNAL is not defined by the custom contract library
  180. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_INTERNAL */
  181. # ifndef PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_API
  182. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_API is not defined by the custom contract library
  183. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_API */
  184. # ifndef PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_APPL_LAYER
  185. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_APPL_LAYER is not defined by the custom contract library
  186. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_APPL_LAYER */
  187. # ifndef PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_INTERNAL
  188. # define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_INTERNAL is not defined by the custom contract library
  189. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_INTERNAL */
  190. # ifndef PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_API
  191. # define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_API is not defined by the custom contract library
  192. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_API */
  193. # ifndef PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_APPL_LAYER
  194. # define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_APPL_LAYER is not defined by the custom contract library
  195. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_APPL_LAYER */
  196. # ifndef PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_INTERNAL
  197. # define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_INTERNAL is not defined by the custom contract library
  198. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_INTERNAL */
  199. # ifndef PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_API
  200. # define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_API is not defined by the custom contract library
  201. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_API */
  202. # ifndef PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_APPL_LAYER
  203. # define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_APPL_LAYER is not defined by the custom contract library
  204. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_APPL_LAYER */
  205. # ifndef PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_INTERNAL
  206. # define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_INTERNAL is not defined by the custom contract library
  207. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_INTERNAL */
  208. # ifndef PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_API
  209. # define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_API is not defined by the custom contract library
  210. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_API */
  211. # ifndef PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_LAYER
  212. # define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_LAYER is not defined by the custom contract library
  213. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_LAYER */
  214. # ifndef PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_DEF
  215. # define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_DEF is not defined by the custom contract library
  216. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_DEF */
  217. # ifndef PANTHEIOS_CONTRACT_ENFORCE_ASSUMPTION
  218. # define PANTHEIOS_CONTRACT_ENFORCE_ASSUMPTION is not defined by the custom contract library
  219. # endif /* !PANTHEIOS_CONTRACT_ENFORCE_ASSUMPTION */
  220. #elif defined(PANTHEIOS_QA_USE_XCONTRACT)
  221. # ifndef PANTHEIOS_CONTRACT_LEVEL_INTERNAL
  222. # define PANTHEIOS_CONTRACT_LEVEL_INTERNAL (41)
  223. # endif /* !PANTHEIOS_CONTRACT_LEVEL_INTERNAL */
  224. # ifndef PANTHEIOS_CONTRACT_LEVEL_API
  225. # define PANTHEIOS_CONTRACT_LEVEL_API (43)
  226. # endif /* !PANTHEIOS_CONTRACT_LEVEL_API */
  227. # ifndef PANTHEIOS_CONTRACT_LEVEL_APPL_LAYER
  228. # define PANTHEIOS_CONTRACT_LEVEL_APPL_LAYER (45)
  229. # endif /* !PANTHEIOS_CONTRACT_LEVEL_APPL_LAYER */
  230. # ifndef PANTHEIOS_CONTRACT_LEVEL_APPL_DEF
  231. # define PANTHEIOS_CONTRACT_LEVEL_APPL_DEF (47)
  232. # endif /* !PANTHEIOS_CONTRACT_LEVEL_APPL_DEF */
  233. # define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_INTERNAL(msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_unexpectedCondition), PANTHEIOS_CONTRACT_LEVEL_INTERNAL, NULL, PANTHEIOS_TYPECHECK_MSG_(msg))
  234. # define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_API(msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_unexpectedCondition), PANTHEIOS_CONTRACT_LEVEL_API, NULL, PANTHEIOS_TYPECHECK_MSG_(msg))
  235. # define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_APPL_LAYER(msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_unexpectedCondition), PANTHEIOS_CONTRACT_LEVEL_APPL_LAYER, NULL, PANTHEIOS_TYPECHECK_MSG_(msg))
  236. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_INTERNAL(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_precondition_logic), PANTHEIOS_CONTRACT_LEVEL_INTERNAL, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  237. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_API(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_precondition_logic), PANTHEIOS_CONTRACT_LEVEL_API, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  238. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_APPL_LAYER(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_precondition_logic), PANTHEIOS_CONTRACT_LEVEL_APPL_LAYER, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  239. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_INTERNAL(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_precondition_parameters), PANTHEIOS_CONTRACT_LEVEL_INTERNAL, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  240. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_API(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_precondition_parameters), PANTHEIOS_CONTRACT_LEVEL_API, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  241. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_APPL_LAYER(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_precondition_parameters), PANTHEIOS_CONTRACT_LEVEL_APPL_LAYER, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  242. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_INTERNAL(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_postcondition_returnValue), PANTHEIOS_CONTRACT_LEVEL_INTERNAL, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  243. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_API(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_postcondition_returnValue), PANTHEIOS_CONTRACT_LEVEL_API, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  244. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_APPL_LAYER(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_postcondition_returnValue), PANTHEIOS_CONTRACT_LEVEL_APPL_LAYER, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  245. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_INTERNAL(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_postcondition_logic), PANTHEIOS_CONTRACT_LEVEL_INTERNAL, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  246. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_API(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_postcondition_logic), PANTHEIOS_CONTRACT_LEVEL_API, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  247. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_APPL_LAYER(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_postcondition_logic), PANTHEIOS_CONTRACT_LEVEL_APPL_LAYER, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  248. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_INTERNAL(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_postcondition_parameters), PANTHEIOS_CONTRACT_LEVEL_INTERNAL, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  249. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_API(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_postcondition_parameters), PANTHEIOS_CONTRACT_LEVEL_API, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  250. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_APPL_LAYER(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_postcondition_parameters), PANTHEIOS_CONTRACT_LEVEL_APPL_LAYER, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  251. # define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_INTERNAL(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_invariant_class), PANTHEIOS_CONTRACT_LEVEL_INTERNAL, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  252. # define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_API(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_invariant_class), PANTHEIOS_CONTRACT_LEVEL_API, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  253. # define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_APPL_LAYER(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_invariant_class), PANTHEIOS_CONTRACT_LEVEL_APPL_LAYER, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  254. # define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_INTERNAL(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_invariant_global), PANTHEIOS_CONTRACT_LEVEL_INTERNAL, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  255. # define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_API(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_invariant_global), PANTHEIOS_CONTRACT_LEVEL_API, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  256. # define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_APPL_LAYER(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_invariant_global), PANTHEIOS_CONTRACT_LEVEL_APPL_LAYER, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  257. # define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_INTERNAL(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_staticData), PANTHEIOS_CONTRACT_LEVEL_INTERNAL, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  258. # define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_API(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_staticData), PANTHEIOS_CONTRACT_LEVEL_API, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  259. # define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_LAYER(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_staticData), PANTHEIOS_CONTRACT_LEVEL_APPL_LAYER, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  260. # define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_DEF(expr, msg) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_staticData), PANTHEIOS_CONTRACT_LEVEL_APPL_DEF, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  261. # define PANTHEIOS_CONTRACT_ENFORCE_ASSUMPTION(expr) XCONTRACT_ENFORCE_CONDITION_TYPE_LEVEL_(XCONTRACT_NS_QUAL(xContract_intermediateAssumption), PANTHEIOS_CONTRACT_LEVEL_INTERNAL, expr, PANTHEIOS_TYPECHECK_MSG_(msg))
  262. #else /* ? PANTHEIOS_QA_USE_XCONTRACT */
  263. /** \def PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_INTERNAL(msg)
  264. *
  265. * \ingroup group__quality
  266. *
  267. * Unexpected condition contract enforcement (internal)
  268. *
  269. * \param msg The literal string describing the failed condition
  270. */
  271. # define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_INTERNAL(msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), 0)
  272. /** \def PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_API(msg)
  273. *
  274. * \ingroup group__quality
  275. *
  276. * Unexpected condition contract enforcement (API)
  277. *
  278. * \param msg The literal string describing the failed condition
  279. */
  280. # define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_API(msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), 0)
  281. /** \def PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_APPL_LAYER(msg)
  282. *
  283. * \ingroup group__quality
  284. *
  285. * Unexpected condition contract enforcement (application layer)
  286. *
  287. * \param msg The literal string describing the failed condition
  288. */
  289. # define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_APPL_LAYER(msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), 0)
  290. /** \def PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_INTERNAL(expr, msg)
  291. *
  292. * \ingroup group__quality
  293. *
  294. * Precondition (state) contract enforcement (internal)
  295. *
  296. * \param expr The expression that must evaluate to \c true
  297. * \param msg The literal string describing the failed condition
  298. */
  299. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_INTERNAL(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  300. /** \def PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_API(expr, msg)
  301. *
  302. * \ingroup group__quality
  303. *
  304. * Precondition (state) contract enforcement (API)
  305. *
  306. * \param expr The expression that must evaluate to \c true
  307. * \param msg The literal string describing the failed condition
  308. */
  309. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_API(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  310. /** \def PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_APPL_LAYER(expr, msg)
  311. *
  312. * \ingroup group__quality
  313. *
  314. * Precondition (state) contract enforcement (application layer)
  315. *
  316. * \param expr The expression that must evaluate to \c true
  317. * \param msg The literal string describing the failed condition
  318. */
  319. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_APPL_LAYER(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  320. /** \def PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_INTERNAL(expr, msg)
  321. *
  322. * \ingroup group__quality
  323. *
  324. * Precondition (parameters) contract enforcement (internal)
  325. *
  326. * \param expr The expression that must evaluate to \c true
  327. * \param msg The literal string describing the failed condition
  328. */
  329. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_INTERNAL(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  330. /** \def PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_API(expr, msg)
  331. *
  332. * \ingroup group__quality
  333. *
  334. * Precondition (parameters) contract enforcement (API)
  335. *
  336. * \param expr The expression that must evaluate to \c true
  337. * \param msg The literal string describing the failed condition
  338. */
  339. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_API(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  340. /** \def PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_APPL_LAYER(expr, msg)
  341. *
  342. * \ingroup group__quality
  343. *
  344. * Precondition (parameters) contract enforcement (application layer)
  345. *
  346. * \param expr The expression that must evaluate to \c true
  347. * \param msg The literal string describing the failed condition
  348. */
  349. # define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_APPL_LAYER(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  350. /** \def PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_INTERNAL(expr, msg)
  351. *
  352. * \ingroup group__quality
  353. *
  354. * Postcondition (return-value) contract enforcement (internal)
  355. *
  356. * \param expr The expression that must evaluate to \c true
  357. * \param msg The literal string describing the failed condition
  358. */
  359. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_INTERNAL(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  360. /** \def PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_API(expr, msg)
  361. *
  362. * \ingroup group__quality
  363. *
  364. * Postcondition (return-value) contract enforcement (API)
  365. *
  366. * \param expr The expression that must evaluate to \c true
  367. * \param msg The literal string describing the failed condition
  368. */
  369. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_API(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  370. /** \def PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_APPL_LAYER(expr, msg)
  371. *
  372. * \ingroup group__quality
  373. *
  374. * Postcondition (return-value) contract enforcement (application layer)
  375. *
  376. * \param expr The expression that must evaluate to \c true
  377. * \param msg The literal string describing the failed condition
  378. */
  379. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_APPL_LAYER(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  380. /** \def PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_INTERNAL(expr, msg)
  381. *
  382. * \ingroup group__quality
  383. *
  384. * Postcondition (state) contract enforcement (internal)
  385. *
  386. * \param expr The expression that must evaluate to \c true
  387. * \param msg The literal string describing the failed condition
  388. */
  389. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_INTERNAL(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  390. /** \def PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_API(expr, msg)
  391. *
  392. * \ingroup group__quality
  393. *
  394. * Postcondition (state) contract enforcement (API)
  395. *
  396. * \param expr The expression that must evaluate to \c true
  397. * \param msg The literal string describing the failed condition
  398. */
  399. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_API(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  400. /** \def PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_APPL_LAYER(expr, msg)
  401. *
  402. * \ingroup group__quality
  403. *
  404. * Postcondition (state) contract enforcement (application layer)
  405. *
  406. * \param expr The expression that must evaluate to \c true
  407. * \param msg The literal string describing the failed condition
  408. */
  409. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_APPL_LAYER(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  410. /** \def PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_INTERNAL(expr, msg)
  411. *
  412. * \ingroup group__quality
  413. *
  414. * Postcondition (parameters) contract enforcement (internal)
  415. *
  416. * \param expr The expression that must evaluate to \c true
  417. * \param msg The literal string describing the failed condition
  418. */
  419. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_INTERNAL(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  420. /** \def PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_API(expr, msg)
  421. *
  422. * \ingroup group__quality
  423. *
  424. * Postcondition (parameters) contract enforcement (API)
  425. *
  426. * \param expr The expression that must evaluate to \c true
  427. * \param msg The literal string describing the failed condition
  428. */
  429. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_API(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  430. /** \def PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_APPL_LAYER(expr, msg)
  431. *
  432. * \ingroup group__quality
  433. *
  434. * Postcondition (parameters) contract enforcement (application layer)
  435. *
  436. * \param expr The expression that must evaluate to \c true
  437. * \param msg The literal string describing the failed condition
  438. */
  439. # define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_APPL_LAYER(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  440. /** \def PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_INTERNAL(expr, msg)
  441. *
  442. * \ingroup group__quality
  443. *
  444. * Invariant (class) contract enforcement (internal)
  445. *
  446. * \param expr The expression that must evaluate to \c true
  447. * \param msg The literal string describing the failed condition
  448. */
  449. # define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_INTERNAL(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  450. /** \def PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_API(expr, msg)
  451. *
  452. * \ingroup group__quality
  453. *
  454. * Invariant (class) contract enforcement (API)
  455. *
  456. * \param expr The expression that must evaluate to \c true
  457. * \param msg The literal string describing the failed condition
  458. */
  459. # define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_API(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  460. /** \def PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_APPL_LAYER(expr, msg)
  461. *
  462. * \ingroup group__quality
  463. *
  464. * Invariant (class) contract enforcement (application layer)
  465. *
  466. * \param expr The expression that must evaluate to \c true
  467. * \param msg The literal string describing the failed condition
  468. */
  469. # define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_APPL_LAYER(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  470. /** \def PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_INTERNAL(expr, msg)
  471. *
  472. * \ingroup group__quality
  473. *
  474. * Invariant (global) contract enforcement (internal)
  475. *
  476. * \param expr The expression that must evaluate to \c true
  477. * \param msg The literal string describing the failed condition
  478. */
  479. # define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_INTERNAL(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  480. /** \def PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_API(expr, msg)
  481. *
  482. * \ingroup group__quality
  483. *
  484. * Invariant (global) contract enforcement (API)
  485. *
  486. * \param expr The expression that must evaluate to \c true
  487. * \param msg The literal string describing the failed condition
  488. */
  489. # define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_API(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  490. /** \def PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_APPL_LAYER(expr, msg)
  491. *
  492. * \ingroup group__quality
  493. *
  494. * Invariant (global) contract enforcement (application layer)
  495. *
  496. * \param expr The expression that must evaluate to \c true
  497. * \param msg The literal string describing the failed condition
  498. */
  499. # define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_APPL_LAYER(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  500. /** \def PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_INTERNAL(expr, msg)
  501. *
  502. * \ingroup group__quality
  503. *
  504. * Static data state contract enforcement (internal)
  505. *
  506. * \param expr The expression that must evaluate to \c true
  507. * \param msg The literal string describing the failed condition
  508. */
  509. # define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_INTERNAL(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  510. /** \def PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_API(expr, msg)
  511. *
  512. * \ingroup group__quality
  513. *
  514. * Static data state contract enforcement (API)
  515. *
  516. * \param expr The expression that must evaluate to \c true
  517. * \param msg The literal string describing the failed condition
  518. */
  519. # define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_API(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  520. /** \def PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_LAYER(expr, msg)
  521. *
  522. * \ingroup group__quality
  523. *
  524. * Static data state contract enforcement (application layer)
  525. *
  526. * \param expr The expression that must evaluate to \c true
  527. * \param msg The literal string describing the failed condition
  528. */
  529. # define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_LAYER(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  530. /** \def PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_DEF(expr, msg)
  531. *
  532. * \ingroup group__quality
  533. *
  534. * Static data state contract enforcement (application defined)
  535. *
  536. * \param expr The expression that must evaluate to \c true
  537. * \param msg The literal string describing the failed condition
  538. */
  539. # define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_DEF(expr, msg) STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
  540. /** \def PANTHEIOS_CONTRACT_ENFORCE_ASSUMPTION(expr)
  541. *
  542. * \ingroup group__quality
  543. *
  544. * Intermediate assumption contract enforcement
  545. *
  546. * \param expr The expression that must evaluate to \c true
  547. */
  548. # define PANTHEIOS_CONTRACT_ENFORCE_ASSUMPTION(expr) STLSOFT_ASSERT(expr)
  549. #endif /* PANTHEIOS_QA_USE_XCONTRACT */
  550. /* ////////////////////////////////////////////////////////////////////// */
  551. #endif /* !PANTHEIOS_INCL_PANTHEIOS_QUALITY_H_CONTRACT */
  552. /* ///////////////////////////// end of file //////////////////////////// */