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

📄 acestl.hpp

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

/* File version */
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define ACESTL_VER_ACESTL_HPP_ACESTL_MAJOR     1
# define ACESTL_VER_ACESTL_HPP_ACESTL_MINOR     6
# define ACESTL_VER_ACESTL_HPP_ACESTL_REVISION  3
# define ACESTL_VER_ACESTL_HPP_ACESTL_EDIT      26
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/** \file acestl/acestl.hpp \brief [C++ only] The root header for the \ref group__project__acestl "ACESTL" project. */

/* /////////////////////////////////////////////////////////////////////////
 * ACESTL version
 *
 * The libraries version information is comprised of major, minor and revision
 * components.
 *
 * The major version is denoted by the _ACESTL_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 _ACESTL_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 _ACESTL_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 - _ACESTL_VER_MAJOR,
 * _ACESTL_VER_MINOR and _ACESTL_VER_REVISION - a composite symbol _ACESTL_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 _ACESTL_VER_1_0_1.
 *
 * Thus the symbol _ACESTL_VER may be compared meaningfully with a specific
 * version symbol, e.g.# if _ACESTL_VER >= _ACESTL_VER_1_0_1
 */

/** \def _ACESTL_VER_MAJOR
 * The major version number of ACESTL
 */

/** \def _ACESTL_VER_MINOR
 * The minor version number of ACESTL
 */

/** \def _ACESTL_VER_REVISION
 * The revision version number of ACESTL
 */

/** \def _ACESTL_VER
 * The current composite version number of ACESTL
 */

#define _ACESTL_VER_MAJOR      1
#define _ACESTL_VER_MINOR      0
#define _ACESTL_VER_REVISION   3
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define _ACESTL_VER_0_9_1     0x00000901  /*!< Version 0.9.1 */
# define _ACESTL_VER_1_0_1     0x00010001  /*!< Version 1.0.1 */
# define _ACESTL_VER_1_0_2     0x00010002  /*!< Version 1.0.2 */
# define _ACESTL_VER_1_0_3     0x00010003  /*!< Version 1.0.3 */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

#define _ACESTL_VER            _ACESTL_VER_1_0_3

/* /////////////////////////////////////////////////////////////////////////
 * Includes
 */

#ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
# include <stlsoft/stlsoft.h>
#endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */
#include <ace/Log_Msg.h>

/* Intel is super pernickety about conversions, so we need to bring out the union_cast. */
#if defined(STLSOFT_COMPILER_IS_INTEL)
# ifndef STLSOFT_INCL_STLSOFT_CONVERSION_HPP_UNION_CAST
#  include <stlsoft/conversion/union_cast.hpp>
# endif /* !STLSOFT_INCL_STLSOFT_CONVERSION_HPP_UNION_CAST */
#endif /* compiler */

/* /////////////////////////////////////////////////////////////////////////
 * STLSoft version compatibility
 */

#if !defined(_STLSOFT_VER_1_8_3) || \
    _STLSOFT_VER < _STLSOFT_VER_1_8_3
# error This version of the ACESTL libraries requires STLSoft version 1.8.3 or later
#endif /* _STLSOFT_VER < _STLSOFT_VER_1_8_3 */

/* /////////////////////////////////////////////////////////////////////////
 * Proper C++ casting
 */

#ifdef __cplusplus
# ifdef ACE_WIN32
#  undef     ACE_INVALID_HANDLE
#  if defined(STLSOFT_COMPILER_IS_INTEL)
#   define    ACE_INVALID_HANDLE            stlsoft_ns_qual(union_cast)<HANDLE>(-1)
#  else /* ? compiler */
#   define    ACE_INVALID_HANDLE            reinterpret_cast<HANDLE>(-1)
#  endif /* compiler */
# endif /* ACE_WIN32 */
#endif /* __cplusplus */

/* /////////////////////////////////////////////////////////////////////////
 * Compiler compatibility
 *
 * Currently the only compilers supported by the ACESTL libraries are
 *
 */

/* /////////////////////////////////////////////////////////////////////////
 * Debugging
 *
 * The macro acestl_assert provides standard debug-mode assert functionality.
 */

/// Defines a runtime assertion
///
/// \param expr Must be non-zero, or an assertion will be fired
#define ACESTL_ASSERT(expr)                STLSOFT_ASSERT(expr)

/// Defines a runtime assertion, with message
///
/// \param expr Must be non-zero, or an assertion will be fired
/// \param msg The literal character string message to be included in the assertion
#define ACESTL_MESSAGE_ASSERT(msg, expr)   STLSOFT_MESSAGE_ASSERT(msg, expr)

/// Defines a compile-time assertion
///
/// \param expr Must be non-zero, or compilation will fail
#define ACESTL_STATIC_ASSERT(expr)         STLSOFT_STATIC_ASSERT(expr)



#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define acestl_assert(expr)                ACESTL_ASSERT(expr)
# define acestl_message_assert(msg, expr)   ACESTL_MESSAGE_ASSERT(msg, expr)
# define acestl_static_assert(expr)         ACESTL_STATIC_ASSERT(expr)
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/* /////////////////////////////////////////////////////////////////////////
 * Namespace
 *
 * The ACESTL components are contained within the acestl namespace. This is
 * usually an alias for stlsoft::acestl_project,
 *
 * When compilers support namespaces they are defined by default. They can be
 * undefined using a cascasing system, as follows:
 *
 * If _STLSOFT_NO_NAMESPACES is defined, then _ACESTL_NO_NAMESPACES is defined.
 *
 * If _ACESTL_NO_NAMESPACES is defined, then _ACESTL_NO_NAMESPACE is defined.
 *
 * If _ACESTL_NO_NAMESPACE is defined, then the ACESTL constructs are defined
 * in the global scope.
 *
 * If _STLSOFT_NO_NAMESPACES, _ACESTL_NO_NAMESPACES and _ACESTL_NO_NAMESPACE are
 * all undefined but the symbol _STLSOFT_NO_NAMESPACE is defined (whence the
 * namespace stlsoft does not exist), then the ACESTL constructs are defined
 * within the acestl namespace. The definition matrix is as follows:
 *
 * _STLSOFT_NO_NAMESPACE    _ACESTL_NO_NAMESPACE   acestl definition
 * ---------------------    --------------------    -----------------
 *  not defined              not defined             = stlsoft::acestl_project
 *  not defined              defined                 not defined
 *  defined                  not defined             acestl
 *  defined                  defined                 not defined
 *
 *
 *
 * The macro acestl_ns_qual() macro can be used to refer to elements in the
 * ACESTL libraries irrespective of whether they are in the
 * stlsoft::acestl_project (or acestl) namespace or in the global namespace.
 *
 * Furthermore, some compilers do not support the standard library in the std
 * namespace, so the acestl_ns_qual_std() macro can be used to refer to elements
 * in the ACESTL libraries irrespective of whether they are in the std namespace
 * or in the global namespace.
 */

/* No STLSoft namespaces means no ACESTL namespaces */
#ifdef _STLSOFT_NO_NAMESPACES
# define _ACESTL_NO_NAMESPACES

⌨️ 快捷键说明

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