⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unixstl.h

📁 用STL的方式封装了WindowsAPI、COM调用、ACE、ATL、MFC、WTL等多种组件
💻 H
📖 第 1 页 / 共 2 页
字号:
/* /////////////////////////////////////////////////////////////////////////
 * File:        unixstl/unixstl.h (formerly unixstl.h)
 *
 * Purpose:     Root header for the UNIXSTL libraries. Performs various compiler
 *              and platform discriminations, and definitions of types.
 *
 * Created:     15th January 2002
 * Updated:     18th June 2006
 *
 * Home:        http://stlsoft.org/
 *
 * Copyright (c) 2002-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 UNIXSTL_INCL_UNIXSTL_H_UNIXSTL
#define UNIXSTL_INCL_UNIXSTL_H_UNIXSTL
#define UNIXSTL_INCL_H_UNIXSTL

/* File version */
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define UNIXSTL_VER_UNIXSTL_H_UNIXSTL_MAJOR    3
# define UNIXSTL_VER_UNIXSTL_H_UNIXSTL_MINOR    3
# define UNIXSTL_VER_UNIXSTL_H_UNIXSTL_REVISION 2
# define UNIXSTL_VER_UNIXSTL_H_UNIXSTL_EDIT     66
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/** \file unixstl/unixstl.h \brief [C, C++] The root header for the \ref group__project__unixstl "UNIXSTL" project. */

/* /////////////////////////////////////////////////////////////////////////
 * UNIXSTL version
 *
 * The libraries version information is comprised of major, minor and revision
 * components.
 *
 * The major version is denoted by the _UNIXSTL_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 _UNIXSTL_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 _UNIXSTL_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 - _UNIXSTL_VER_MAJOR,
 * _UNIXSTL_VER_MINOR and _UNIXSTL_VER_REVISION - a composite symbol _UNIXSTL_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 _UNIXSTL_VER_1_0_1.
 *
 * Thus the symbol _UNIXSTL_VER may be compared meaningfully with a specific
 * version symbol, e.g.# if _UNIXSTL_VER >= _UNIXSTL_VER_1_0_1
 */

/** \def _UNIXSTL_VER_MAJOR
 * The major version number of UNIXSTL
 */

/** \def _UNIXSTL_VER_MINOR
 * The minor version number of UNIXSTL
 */

/** \def _UNIXSTL_VER_REVISION
 * The revision version number of UNIXSTL
 */

/** \def _UNIXSTL_VER
 * The current composite version number of UNIXSTL
 */

#define _UNIXSTL_VER_MAJOR      1
#define _UNIXSTL_VER_MINOR      6
#define _UNIXSTL_VER_REVISION   1
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define _UNIXSTL_VER_0_9_1     0x00000901  /*!< Version 0.9.1 */
# define _UNIXSTL_VER_0_9_2     0x00000902  /*!< Version 0.9.2 */
# define _UNIXSTL_VER_1_0_1     0x00010001  /*!< Version 1.0.1 */
# define _UNIXSTL_VER_1_0_2     0x00010002  /*!< Version 1.0.2 */
# define _UNIXSTL_VER_1_0_3     0x00010003  /*!< Version 1.0.3 */
# define _UNIXSTL_VER_1_1_1     0x00010101  /*!< Version 1.1.1 */
# define _UNIXSTL_VER_1_2_1     0x00010201  /*!< Version 1.2.1 */
# define _UNIXSTL_VER_1_3_1     0x00010301  /*!< Version 1.3.1 */
# define _UNIXSTL_VER_1_4_1     0x00010401  /*!< Version 1.4.1 */
# define _UNIXSTL_VER_1_5_1     0x00010501  /*!< Version 1.5.1 */
# define _UNIXSTL_VER_1_6_1     0x00010601  /*!< Version 1.6.1 */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

#define _UNIXSTL_VER            _UNIXSTL_VER_1_6_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_9_1) || \
    _STLSOFT_VER < _STLSOFT_VER_1_9_1
# error This version of the UNIXSTL libraries requires STLSoft version 1.9.1 or later
#endif /* _STLSOFT_VER < _STLSOFT_VER_1_9_1 */

/* /////////////////////////////////////////////////////////////////////////
 * Compiler compatibility
 *
 * Currently the only compilers supported by the UNIXSTL libraries are
 *
 * GCC 2.95, 2.96, 3.2
 * Intel C/C++ 6.0 & 7.0
 */

#if defined(STLSOFT_COMPILER_IS_GCC)
/* GNU C/C++ */
# if __GNUC__ < 2 || \
     (  __GNUC__ == 2 && \
        __GNUC_MINOR__ < 95)
#  error Versions of GNU C/C++ prior to 2.95 are not supported by the UNIXSTL libraries
# endif /* __GNUC__ */

#elif defined(STLSOFT_COMPILER_IS_INTEL)
/* Intel C++ */
# if (__INTEL_COMPILER < 700)
#  error Versions of Intel C++ prior to 7.0 are not supported by the UNIXSTL libraries
# endif /* __INTEL_COMPILER */

#else
/* No recognised compiler */
# ifdef _STLSOFT_FORCE_ANY_COMPILER
#  define _UNIXSTL_COMPILER_IS_UNKNOWN
#  ifdef _STLSOFT_COMPILE_VERBOSE
#   pragma message("Compiler is unknown to UNIXSTL")
#  endif /* _STLSOFT_COMPILE_VERBOSE */
# else
#  error Currently only GNU C/C++ compiler supported by the UNIXSTL libraries. To use other, possibly untested, compilers, define _STLSOFT_FORCE_ANY_COMPILER
# endif /* _STLSOFT_FORCE_ANY_COMPILER */
#endif /* compiler */

/* /////////////////////////////////////////////////////////////////////////
 * Architecture
 *
 * The UNIX architecture.
 */

#ifdef UNIXSTL_ARCH_IS_INTEL
# undef UNIXSTL_ARCH_IS_INTEL
#endif /* UNIXSTL_ARCH_IS_INTEL */
#ifdef UNIXSTL_ARCH_IS_POWERPC
# undef UNIXSTL_ARCH_IS_POWERPC
#endif /* UNIXSTL_ARCH_IS_POWERPC */
#ifdef UNIXSTL_ARCH_IS_SPARC
# undef UNIXSTL_ARCH_IS_SPARC
#endif /* UNIXSTL_ARCH_IS_SPARC */
#ifdef UNIXSTL_ARCH_IS_UNKNOWN
# undef UNIXSTL_ARCH_IS_UNKNOWN
#endif /* UNIXSTL_ARCH_IS_UNKNOWN */

#if defined(__i386__) || \
    defined(__i386) || \
    defined(_M_IX86)
# define UNIXSTL_ARCH_IS_INTEL
#elif defined(__ppc__) || \
      defined(__ppc) || \
      defined(__POWERPC__)
# define UNIXSTL_ARCH_IS_POWERPC
#elif defined(__sparc__)
# define UNIXSTL_ARCH_IS_SPARC
#else /* ? arch */
# define UNIXSTL_ARCH_IS_UNKNOWN
#endif /* ? arch */

/* /////////////////////////////////////////////////////////////////////////
 * Operating system family
 *
 * In some circumstances more than one of these may be defined.
 *
 * Some of this os-discrimination is provided by SourceForge (http://predef.sourceforge.net/preos.html)
 */

#ifdef UNIXSTL_OSFAMILY_IS_BSD
# undef UNIXSTL_OSFAMILY_IS_BSD
#endif /* UNIXSTL_OSFAMILY_IS_BSD */
#ifdef UNIXSTL_OSFAMILY_IS_SVR4
# undef UNIXSTL_OSFAMILY_IS_SVR4
#endif /* UNIXSTL_OSFAMILY_IS_SVR4 */


#if defined(__FreeBSD__) || \
    defined(__NetBSD__) || \
    defined(__OpenBSD__) || \
    defined(__bsdi__) || \
    defined(_SYSTYPE_BSD)
# define UNIXSTL_OSFAMILY_IS_BSD
#endif /* bsd */

#if defined(__sysv__) || \
    defined(__SVR4) || \
    defined(__svr4__) || \
    defined(_SYSTYPE_SVR4)
# define UNIXSTL_OSFAMILY_IS_SVR4
#endif /* bsd */

/* /////////////////////////////////////////////////////////////////////////
 * Operating system
 *
 * The UNIX operating system.
 *
 * Some of this os-discrimination is provided by SourceForge (http://predef.sourceforge.net/preos.html)
 */

#ifdef UNIXSTL_OS_IS_APPLE
# undef UNIXSTL_OS_IS_APPLE
#endif /* UNIXSTL_OS_IS_APPLE */
#ifdef UNIXSTL_OS_IS_AIX
# undef UNIXSTL_OS_IS_AIX
#endif /* UNIXSTL_OS_IS_AIX */
#ifdef UNIXSTL_OS_IS_FREEBSD
# undef UNIXSTL_OS_IS_FREEBSD
#endif /* UNIXSTL_OS_IS_FREEBSD */
#ifdef UNIXSTL_OS_IS_HPUX
# undef UNIXSTL_OS_IS_HPUX
#endif /* UNIXSTL_OS_IS_HPUX */
#ifdef UNIXSTL_OS_IS_LINUX
# undef UNIXSTL_OS_IS_LINUX
#endif /* UNIXSTL_OS_IS_LINUX */
#ifdef UNIXSTL_OS_IS_MACOSX
# undef UNIXSTL_OS_IS_MACOSX
#endif /* UNIXSTL_OS_IS_MACOSX */
#ifdef UNIXSTL_OS_IS_NETBSD
# undef UNIXSTL_OS_IS_NETBSD
#endif /* UNIXSTL_OS_IS_NETBSD */
#ifdef UNIXSTL_OS_IS_OPENBSD
# undef UNIXSTL_OS_IS_OPENBSD
#endif /* UNIXSTL_OS_IS_OPENBSD */
#ifdef UNIXSTL_OS_IS_SOLARIS
# undef UNIXSTL_OS_IS_SOLARIS
#endif /* UNIXSTL_OS_IS_SOLARIS */
#ifdef UNIXSTL_OS_IS_FREEBSD
# undef UNIXSTL_OS_IS_FREEBSD
#endif /* UNIXSTL_OS_IS_FREEBSD */
#ifdef UNIXSTL_OS_IS_UNKNOWN
# undef UNIXSTL_OS_IS_UNKNOWN
#endif /* UNIXSTL_OS_IS_UNKNOWN */

#if defined(__APPLE__) || \
    defined(__MACOSX__)
# define UNIXSTL_OS_IS_APPLE
# define UNIXSTL_OS_IS_MACOSX
#elif defined(_AIX)
# define UNIXSTL_OS_IS_AIX
#elif defined(__FreeBSD__)
# define UNIXSTL_OS_IS_FREEBSD
#elif defined(hpux) || \
      defined(_hpux)
# define UNIXSTL_OS_IS_HPUX
#elif defined(__linux__) || \
      defined(__linux) || \
      defined(linux)
# define UNIXSTL_OS_IS_LINUX
#elif defined(__NetBSD__)
# define UNIXSTL_OS_IS_NETBSD
#elif defined(__OpenBSD__)
# define UNIXSTL_OS_IS_OPENBSD
#elif defined(sun) || \
      defined(__sun)
# if defined(UNIXSTL_OSFAMILY_IS_SVR4)
#  define UNIXSTL_OS_IS_SOLARIS
# else /* ? UNIXSTL_OSFAMILY_IS_SVR4 */
#  define UNIXSTL_OS_IS_SUNOS
# endif /* UNIXSTL_OSFAMILY_IS_SVR4 */
#else /* ? operating system */
# define UNIXSTL_OS_IS_UNKNOWN
#endif /* ? operating system */

/* /////////////////////////////////////////////////////////////////////////
 * Debugging

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -