📄 platformstl.h
字号:
/* /////////////////////////////////////////////////////////////////////////
* File: platformstl/platformstl.h
*
* Purpose: Root header for the PlatformSTL C/C++ libraries. Performs
* platform discriminations, and definitions of types.
*
* Created: 20th March 2005
* Updated: 18th June 2006
*
* Home: http://stlsoft.org/
*
* Copyright (c) 2005-2006, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
* any contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* ////////////////////////////////////////////////////////////////////// */
#ifndef PLATFORMSTL_INCL_PLATFORMSTL_H_PLATFORMSTL
#define PLATFORMSTL_INCL_PLATFORMSTL_H_PLATFORMSTL
/* File version */
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_MAJOR 1
# define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_MINOR 9
# define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_REVISION 2
# define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_EDIT 21
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/** \file platformstl/platformstl.h
*
* \brief [C, C++] Root header for the
* \ref group__project__platformstl "PlatformSTL" project for C
* compilation.
*/
/* /////////////////////////////////////////////////////////////////////////
* PlatformSTL version
*
* The libraries version information is comprised of major, minor and revision
* components.
*
* The major version is denoted by the _PLATFORMSTL_VER_MAJOR preprocessor symbol.
* A changes to the major version component implies that a dramatic change has
* occurred in the libraries, such that considerable changes to source dependent
* on previous versions would need to be effected.
*
* The minor version is denoted by the _PLATFORMSTL_VER_MINOR preprocessor symbol.
* Changes to the minor version component imply that a significant change has
* occurred to the libraries, either in the addition of new functionality or in
* the destructive change to one or more components such that recomplilation and
* code change may be necessitated.
*
* The revision version is denoted by the _PLATFORMSTL_VER_REVISIO preprocessor
* symbol. Changes to the revision version component imply that a bug has been
* fixed. Dependent code should be recompiled in order to pick up the changes.
*
* In addition to the individual version symbols - _PLATFORMSTL_VER_MAJOR,
* _PLATFORMSTL_VER_MINOR and _PLATFORMSTL_VER_REVISION - a composite symbol _PLATFORMSTL_VER
* is defined, where the upper 8 bits are 0, bits 16-23 represent the major
* component, bits 8-15 represent the minor component, and bits 0-7 represent
* the revision component.
*
* Each release of the libraries will bear a different version, and that version
* will also have its own symbol: Version 1.0.1 specifies _PLATFORMSTL_VER_1_0_1.
*
* Thus the symbol _PLATFORMSTL_VER may be compared meaningfully with a specific
* version symbol, e.g.# if _PLATFORMSTL_VER >= _PLATFORMSTL_VER_1_0_1
*/
/** \def _PLATFORMSTL_VER_MAJOR
* The major version number of PlatformSTL
*/
/** \def _PLATFORMSTL_VER_MINOR
* The minor version number of PlatformSTL
*/
/** \def _PLATFORMSTL_VER_REVISION
* The revision version number of PlatformSTL
*/
/** \def _PLATFORMSTL_VER
* The current composite version number of PlatformSTL
*/
#define _PLATFORMSTL_VER_MAJOR 1
#define _PLATFORMSTL_VER_MINOR 4
#define _PLATFORMSTL_VER_REVISION 1
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define _PLATFORMSTL_VER_1_0_1 0x00010001 /*!< Version 1.0.1 */
# define _PLATFORMSTL_VER_1_1_1 0x00010101 /*!< Version 1.1.1 */
# define _PLATFORMSTL_VER_1_1_2 0x00010102 /*!< Version 1.1.2 */
# define _PLATFORMSTL_VER_1_2_1 0x00010201 /*!< Version 1.2.1 */
# define _PLATFORMSTL_VER_1_3_1 0x00010301 /*!< Version 1.3.1 */
# define _PLATFORMSTL_VER_1_4_1 0x00010401 /*!< Version 1.4.1 (12th December 2005) */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
#define _PLATFORMSTL_VER _PLATFORMSTL_VER_1_4_1
/* /////////////////////////////////////////////////////////////////////////
* Includes
*/
#ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
# include <stlsoft/stlsoft.h>
#endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */
/* /////////////////////////////////////////////////////////////////////////
* STLSoft version compatibility
*/
#if !defined(_STLSOFT_VER_1_8_9) || \
_STLSOFT_VER < _STLSOFT_VER_1_8_9
# error This version of the PlatformSTL libraries requires STLSoft version 1.8.9 or later
#endif /* _STLSOFT_VER < _STLSOFT_VER_1_8_9 */
/* /////////////////////////////////////////////////////////////////////////
* Operating system identification
*/
#if defined(unix) || \
defined(UNIX) || \
defined(__unix__) || \
defined(__unix)
# define PLATFORMSTL_OS_IS_UNIX
#elif defined(WIN32) || \
defined(_WIN32) || \
defined(__WIN32__)
# define PLATFORMSTL_OS_IS_WIN32
#else /* ? operating system */
# error Operating system not discriminated. Only UNIX and Win32 are currently recognised by PlatformSTL
#endif /* operating system */
/* /////////////////////////////////////////////////////////////////////////
* Platform-specific includes
*/
#if defined(PLATFORMSTL_OS_IS_UNIX)
# include <unixstl/unixstl.h>
#elif defined(PLATFORMSTL_OS_IS_WIN32)
# include <winstl/winstl.h>
#else /* ? operating system */
# error Operating system not discriminated. Only UNIX and Win32 are currently recognised by PlatformSTL
#endif /* operating system */
/* /////////////////////////////////////////////////////////////////////////
* Namespace
*
* The PLATFORMSTL components are contained within the platformstl namespace. This is
* usually an alias for stlsoft::platformstl_project,
*
* Since STLSoft supports the suspension of namespaces for its main and sub-projects
* (except PlatformSTL) PlatformSTL must be able to work when STLSoft and/or
* UNIXSTL and/or WinSTL constructs are defined in the global namespace.
*/
#if defined(__cplusplus)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -