C/C++ User's Journal STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - where the Standard Template Library meets the Active Template Library COMSTL - where the Standard Template Library meets the Component Object Model
Synesis Software InetSTL - where the Standard Template Library meets the Internet UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

H:/freelibs/recls/1.8/src/recls_impl.h

Go to the documentation of this file.
00001 /* /////////////////////////////////////////////////////////////////////////////
00002  * File:        recls_impl.h
00003  *
00004  * Purpose:     Implementation header.
00005  *
00006  * Created:     7th March 2005
00007  * Updated:     7th October 2007
00008  *
00009  * Home:        http://recls.org/
00010  *
00011  * Copyright (c) 2005-2007, Matthew Wilson and Synesis Software
00012  * All rights reserved.
00013  *
00014  * Redistribution and use in source and binary forms, with or without 
00015  * modification, are permitted in accordance with the license and warranty
00016  * information described in recls.h (included in this distribution, or available
00017  * from http://recls.org/)
00018  *
00019  * ////////////////////////////////////////////////////////////////////////// */
00020 
00021 
00022 #ifndef RECLS_INCL_H_RECLS_IMPL
00023 #define RECLS_INCL_H_RECLS_IMPL
00024 
00025 /* File version */
00026 #ifndef RECLS_DOCUMENTATION_SKIP_SECTION
00027 # define RECLS_VER_H_RECLS_IMPL_MAJOR       3
00028 # define RECLS_VER_H_RECLS_IMPL_MINOR       2
00029 # define RECLS_VER_H_RECLS_IMPL_REVISION    6
00030 # define RECLS_VER_H_RECLS_IMPL_EDIT        33
00031 #endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
00032 
00036 /* /////////////////////////////////////////////////////////////////////////////
00037  * Includes
00038  */
00039 
00040 #include <recls/recls.h>
00041 
00042 #ifdef RECLS_PURE_API
00043 # error Cannot define RECLS_PURE_API for the implementation of recls
00044 #endif /* RECLS_PURE_API */
00045 
00046 #ifdef RECLS_PLATFORM_IS_UNIX_EMULATED_ON_WIN32
00047 # include <windows.h>
00048 #endif /* RECLS_PLATFORM_IS_UNIX_EMULATED_ON_WIN32 */
00049 
00050 /* /////////////////////////////////////////////////////////////////////////////
00051  * C++ stuff
00052  */
00053 
00054 #ifdef __cplusplus
00055 # include <stlsoft/stlsoft.h>    /* If the compiler cannot find this, you are not using STLSoft 1.9.1 or later, as required. */
00056 # if !defined(_STLSOFT_VER_1_9_1) || \
00057     _STLSOFT_VER < _STLSOFT_VER_1_9_1
00058 #  error Requires STLSoft 1.9.1, or later. (www.stlsoft.org/downloads.html)
00059 # endif /* STLSoft version */
00060 # include <stlsoft/conversion/sap_cast.hpp>
00061 #endif /* __cplusplus */
00062 
00063 /* /////////////////////////////////////////////////////////////////////////////
00064  * Exceptions
00065  */
00066 
00067 #ifdef __cplusplus
00068 # if defined(STLSOFT_CF_EXCEPTION_SUPPORT) || \
00069      defined(STLSOFT_CF_EXCEPTION_SUPPORT)
00070 #  define _RECLS_EXCEPTION_SUPPORT
00071 #  ifdef STLSOFT_CF_THROW_BAD_ALLOC
00072 #   define RECLS_COMPILER_THROWS_ON_NEW_FAIL
00073 #  endif /* STLSOFT_CF_THROW_BAD_ALLOC */
00074 # endif /* STLSOFT_CF_EXCEPTION_SUPPORT || STLSOFT_CF_EXCEPTION_SUPPORT */
00075 #endif /* __cplusplus */
00076 
00077 /* /////////////////////////////////////////////////////////////////////////////
00078  * Debugging?
00079  */
00080 
00089 #if !defined(NDEBUG)
00090 # if defined(RECLS_PLATFORM_IS_UNIX)
00091 #  define _RECLS_DEBUG
00092 # elif defined(RECLS_PLATFORM_IS_WIN32) && \
00093        (   defined(DEBUG) || \
00094            defined(_DEBUG))
00095 #  define _RECLS_DEBUG
00096 # endif /* platform */
00097 #endif /* debug */
00098 
00107 #ifdef _RECLS_DEBUG
00108 # ifndef RECLS_DEBUG_LEVEL
00109 #  define RECLS_DEBUG_LEVEL 1
00110 # endif /* RECLS_DEBUG_LEVEL */
00111 #else /* ? _RECLS_DEBUG */
00112 # ifdef RECLS_DEBUG_LEVEL
00113 #  undef RECLS_DEBUG_LEVEL
00114 # endif /* RECLS_DEBUG_LEVEL */
00115 # define RECLS_DEBUG_LEVEL  0
00116 #endif /* _RECLS_DEBUG */
00117 
00118 /* /////////////////////////////////////////////////////////////////////////////
00119  * Contract enforcement
00120  */
00121 
00124 #if defined(_RECLS_DEBUG) || \
00125     defined(RECLS_ENFORCE_CONTRACTS)
00126 # define RECLS_ENFORCING_CONTRACTS
00127 #endif /* _RECLS_DEBUG || RECLS_ENFORCE_CONTRACTS */
00128 
00129 /* /////////////////////////////////////////////////////////////////////////////
00130  * Multithreading
00131  */
00132 
00135 #if defined(RECLS_PLATFORM_IS_UNIX)
00136 # if defined(_REENTRANT)
00137 #  define _RECLS_MT
00138 # elif defined(RECLS_PLATFORM_IS_UNIX_EMULATED_ON_WIN32) && \
00139        (    defined(_MT) || \
00140             defined(__MT__))
00141 #  define _RECLS_MT
00142 #  ifndef _REENTRANT
00143 #   define _REENTRANT
00144 #  endif /* !_REENTRANT */
00145 # endif /* threads? */
00146 #elif defined(RECLS_PLATFORM_IS_WIN32)
00147 # if defined(_MT) || \
00148      defined(__MT__)
00149 #  define _RECLS_MT
00150 # endif /* threads? */
00151 #endif /* platform */
00152 
00153 /* /////////////////////////////////////////////////////////////////////////////
00154  * RECLS_NUM_ELEMENTS
00155  */
00156 
00157 #ifndef RECLS_NUM_ELEMENTS
00158 # if defined(stlsoft_num_elements)
00159 #  define RECLS_NUM_ELEMENTS(x)             stlsoft_num_elements(x)
00160 # else /* ? stlsoft_num_elements */
00161 #  define RECLS_NUM_ELEMENTS(x)             (sizeof(x) / sizeof((x)[0]))
00162 # endif /* stlsoft_num_elements */
00163 #endif /* !RECLS_NUM_ELEMENTS */
00164 
00165 /* /////////////////////////////////////////////////////////////////////////////
00166  * Multi-part patterns
00167  */
00168 
00169 #if (   !defined(RECLS_COMPILER_IS_MSVC) || \
00170         _MSC_VER >= 1200) && \
00171     !defined(RECLS_COMPILER_IS_WATCOM)
00172 # define _RECLS_SUPPORTS_MULTIPATTERN
00173 #endif /* compiler */
00174 
00175 /* ////////////////////////////////////////////////////////////////////////// */
00176 
00177 #endif /* !RECLS_INCL_H_RECLS_IMPL */
00178 
00179 /* ////////////////////////////////////////////////////////////////////////// */

recls Library documentation © Synesis Software Pty Ltd, 2001-2006