00001 /* ///////////////////////////////////////////////////////////////////////// 00002 * File: rangelib/rangelib.hpp 00003 * 00004 * Purpose: Root header for the STLSoft implementation of RangeLib. 00005 * 00006 * Created: 12th October 2004 00007 * Updated: 10th August 2009 00008 * 00009 * Home: http://stlsoft.org/ 00010 * 00011 * Copyright (c) 2004-2009, 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 provided that the following conditions are met: 00016 * 00017 * - Redistributions of source code must retain the above copyright notice, this 00018 * list of conditions and the following disclaimer. 00019 * - Redistributions in binary form must reproduce the above copyright notice, 00020 * this list of conditions and the following disclaimer in the documentation 00021 * and/or other materials provided with the distribution. 00022 * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of 00023 * any contributors may be used to endorse or promote products derived from 00024 * this software without specific prior written permission. 00025 * 00026 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00027 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00028 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00029 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00030 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00031 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00032 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00033 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00034 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00035 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00036 * POSSIBILITY OF SUCH DAMAGE. 00037 * 00038 * ////////////////////////////////////////////////////////////////////// */ 00039 00040 00041 #ifndef RANGELIB_INCL_RANGELIB_HPP_RANGELIB 00042 #define RANGELIB_INCL_RANGELIB_HPP_RANGELIB 00043 00044 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION 00045 # define RANGELIB_VER_RANGELIB_HPP_RANGELIB_MAJOR 1 00046 # define RANGELIB_VER_RANGELIB_HPP_RANGELIB_MINOR 3 00047 # define RANGELIB_VER_RANGELIB_HPP_RANGELIB_REVISION 3 00048 # define RANGELIB_VER_RANGELIB_HPP_RANGELIB_EDIT 28 00049 #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */ 00050 00056 /* ///////////////////////////////////////////////////////////////////////// 00057 * RangeLib version 00058 * 00059 * The libraries version information is comprised of major, minor and revision 00060 * components. 00061 * 00062 * The major version is denoted by the _RANGELIB_VER_MAJOR preprocessor symbol. 00063 * A changes to the major version component implies that a dramatic change has 00064 * occurred in the libraries, such that considerable changes to source dependent 00065 * on previous versions would need to be effected. 00066 * 00067 * The minor version is denoted by the _RANGELIB_VER_MINOR preprocessor symbol. 00068 * Changes to the minor version component imply that a significant change has 00069 * occurred to the libraries, either in the addition of new functionality or in 00070 * the destructive change to one or more components such that recomplilation and 00071 * code change may be necessitated. 00072 * 00073 * The revision version is denoted by the _RANGELIB_VER_REVISION preprocessor 00074 * symbol. Changes to the revision version component imply that a bug has been 00075 * fixed. Dependent code should be recompiled in order to pick up the changes. 00076 * 00077 * In addition to the individual version symbols - _RANGELIB_VER_MAJOR, 00078 * _RANGELIB_VER_MINOR and _RANGELIB_VER_REVISION - a composite symbol _RANGELIB_VER 00079 * is defined, where the upper 8 bits are 0, bits 16-23 represent the major 00080 * component, bits 8-15 represent the minor component, and bits 0-7 represent 00081 * the revision component. 00082 * 00083 * Each release of the libraries will bear a different version, and that version 00084 * will also have its own symbol: Version 1.0.1 specifies _RANGELIB_VER_1_0_1. 00085 * 00086 * Thus the symbol _RANGELIB_VER may be compared meaningfully with a specific 00087 * version symbol, e.g. #if _RANGELIB_VER >= _RANGELIB_VER_1_0_1 00088 */ 00089 00114 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION 00115 # define _RANGELIB_VER_1_0_1 0x00010001 00116 # define _RANGELIB_VER_1_0_2 0x00010002 00117 # define _RANGELIB_VER_1_0_3 0x00010003 00118 # define _RANGELIB_VER_1_0_4 0x00010004 00119 # define _RANGELIB_VER_1_1_1 0x00010101 00120 # define _RANGELIB_VER_1_1_2 0x00010102 00121 #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */ 00122 00123 #define _RANGELIB_VER_MAJOR 1 00124 #define _RANGELIB_VER_MINOR 1 00125 #define _RANGELIB_VER_REVISION 2 00126 #define _RANGELIB_VER _RANGELIB_VER_1_1_2 00127 00128 /* ///////////////////////////////////////////////////////////////////////// 00129 * Auto-generation and compatibility 00130 */ 00131 00132 /* 00133 [Incompatibilies-start] 00134 STLSOFT_COMPILER_IS_MSVC: _MSC_VER < 1200 00135 [Incompatibilies-end] 00136 */ 00137 00138 /* ///////////////////////////////////////////////////////////////////////// 00139 * Includes 00140 */ 00141 00142 #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT 00143 # include <stlsoft/stlsoft.h> 00144 #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */ 00145 00146 /* ///////////////////////////////////////////////////////////////////////// 00147 * STLSoft version compatibility 00148 */ 00149 00150 #if !defined(_STLSOFT_VER_1_9_1_B41) || \ 00151 _STLSOFT_VER < _STLSOFT_VER_1_9_1_B41 00152 # error RangeLib is only compatible with STLSoft version 1.9.1 beta 41, or later 00153 #endif /* _STLSOFT_VER */ 00154 00155 /* ///////////////////////////////////////////////////////////////////////// 00156 * Compiler compatibility 00157 * 00158 * Currently the only compilers supported by the RangeLib libraries are 00159 * 00160 * Borland C++ 5.6+ 00161 * Comeau 4.3.3+ 00162 * Digital Mars C/C++ 8.42+ 00163 * Metrowerks 3.0+ (CodeWarrior 8.0+) 00164 * Intel C/C++ 8.0+ 00165 * Visual C++ 6.0+ 00166 */ 00167 00168 #if defined(STLSOFT_COMPILER_IS_BORLAND) 00169 /* Borland C++ */ 00170 # if __BORLANDC__ < 0x0560 00171 # error Versions of Borland C++ prior to 5.6 are not supported by the RangeLib libraries 00172 # elif __BORLANDC__ <= 0x0564 00173 # if defined(_STLSOFT_COMPILE_VERBOSE) 00174 # pragma message("RangeLib is only partially supported on Borland C/C++ versions 5.6 and 5.6.4") 00175 # endif /* _STLSOFT_COMPILE_VERBOSE */ 00176 # endif /* __BORLANDC__ */ 00177 00178 #elif defined(STLSOFT_COMPILER_IS_COMO) 00179 /* Comeau C++ */ 00180 # if __COMO_VERSION__ < 4303 00181 # error Versions of Comeau C++ prior to 4.3.3 are not supported by the RangeLib libraries 00182 # endif /* __DMC__ */ 00183 00184 #elif defined(STLSOFT_COMPILER_IS_DMC) 00185 /* Digital Mars C/C++ */ 00186 # if __DMC__ < 0x0842 00187 # error Versions of Digital Mars C/C++ prior to 8.42 are not supported by the RangeLib libraries 00188 # endif /* __DMC__ */ 00189 00190 #elif defined(STLSOFT_COMPILER_IS_GCC) 00191 /* Digital Mars C/C++ */ 00192 # if __GNUC__ < 3 || \ 00193 ( __GNUC__ == 3 && \ 00194 __GNUC_MINOR__ < 2) 00195 # error Versions of GCC prior to 3.2 are not supported by the RangeLib libraries 00196 # endif /* __DMC__ */ 00197 00198 #elif defined(STLSOFT_COMPILER_IS_INTEL) 00199 /* Intel C++ */ 00200 # if (__INTEL_COMPILER < 700) 00201 # error Versions of Intel C++ prior to 7.0 are not supported by the RangeLib libraries 00202 # endif /* __INTEL_COMPILER */ 00203 00204 #elif defined(STLSOFT_COMPILER_IS_MWERKS) 00205 /* Metrowerks C++ */ 00206 # if (__MWERKS__ & 0xFF00) < 0x3000 00207 # error Versions of Metrowerks CodeWarrior C++ prior to 8.x are not supported by the RangeLib libraries 00208 # endif /* __MWERKS__ */ 00209 00210 #elif defined(STLSOFT_COMPILER_IS_MSVC) 00211 /* Visual C++ */ 00212 # if _MSC_VER < 1200 00213 # error Versions of Visual C++ prior to 5.0 are not supported by the RangeLib libraries 00214 # elif _MSC_VER < 1310 00215 # if defined(_STLSOFT_COMPILE_VERBOSE) 00216 # pragma message("RangeLib is only partially supported on Visual C++ versions 6.0 and 7.0") 00217 # endif /* _STLSOFT_COMPILE_VERBOSE */ 00218 # endif /* _MSC_VER */ 00219 00220 #else /* ? compiler */ 00221 /* No recognised compiler */ 00222 # ifdef _STLSOFT_FORCE_ANY_COMPILER 00223 # define _RANGELIB_COMPILER_IS_UNKNOWN 00224 # ifdef _STLSOFT_COMPILE_VERBOSE 00225 # pragma message("Compiler is unknown to RangeLib") 00226 # endif /* _STLSOFT_COMPILE_VERBOSE */ 00227 # else /* ? _STLSOFT_FORCE_ANY_COMPILER */ 00228 # error Currently only Borland C++, Digital Mars C/C++, Intel C/C++, Metrowerks CodeWarrior and Visual C++ compilers are supported by the RangeLib libraries 00229 # endif /* _STLSOFT_FORCE_ANY_COMPILER */ 00230 #endif /* compiler */ 00231 00232 /* ///////////////////////////////////////////////////////////////////////// 00233 * Namespace 00234 */ 00235 00236 #ifndef RANGELIB_NO_NAMESPACE 00237 # if defined(_STLSOFT_NO_NAMESPACE) || \ 00238 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION) 00239 /* There is no stlsoft namespace, so must define ::rangelib */ 00240 namespace rangelib 00241 { 00242 # else 00243 /* Define stlsoft::rangelib_project */ 00244 00245 namespace stlsoft 00246 { 00247 00248 namespace rangelib_project 00249 { 00250 00251 # endif /* _STLSOFT_NO_NAMESPACE */ 00252 #endif /* !RANGELIB_NO_NAMESPACE */ 00253 00254 /* ////////////////////////////////////////////////////////////////////// */ 00255 00256 #ifndef RANGELIB_NO_NAMESPACE 00257 # if defined(_STLSOFT_NO_NAMESPACE) || \ 00258 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION) 00259 } // namespace rangelib 00260 # else 00261 } // namespace rangelib_project 00262 } // namespace stlsoft 00263 namespace rangelib = ::stlsoft::rangelib_project; 00264 # endif /* _STLSOFT_NO_NAMESPACE */ 00265 #endif /* !RANGELIB_NO_NAMESPACE */ 00266 00267 /* ////////////////////////////////////////////////////////////////////// */ 00268 00269 #endif /* !RANGELIB_INCL_RANGELIB_HPP_RANGELIB */ 00270 00271 /* ///////////////////////////// end of file //////////////////////////// */