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

📄 acestl.hpp

📁 用STL的方式封装了WindowsAPI、COM调用、ACE、ATL、MFC、WTL等多种组件
💻 HPP
📖 第 1 页 / 共 2 页
字号:
#endif /* _STLSOFT_NO_NAMESPACES */

/* No ACESTL namespaces means no acestl namespace */
#ifdef _ACESTL_NO_NAMESPACES
# define _ACESTL_NO_NAMESPACE
#endif /* _ACESTL_NO_NAMESPACES */

#ifndef _ACESTL_NO_NAMESPACE
# if defined(_STLSOFT_NO_NAMESPACE) || \
     defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
/* There is no stlsoft namespace, so must define ::acestl */
/** \brief The <code class="namespace">acestl</code> namespace contains all components
 *   in the \ref group__project__acestl "ACESTL" project.
 *
 * By default, the <code>acestl</code> namespace is actually an alias for
 * the namespace <code>stlsoft::acestl_project</code>, which is where all
 * the \ref group__project__acestl "ACESTL" components actually reside. This
 * measure allows all components within the main the
 * \ref group__project__stlsoft "STLSoft" project (which are defined within
 * the <code>stlsoft</code> namespace) to be visible to all components
 * "within" the <code>acestl</code> namespace. (Otherwise, there would be a
 * whole lot of onerous qualification throughout the code of all
 * \ref group__projects "sub-projects".)
 *
 * \note If either/both of the symbols <code>_STLSOFT_NO_NAMESPACES</code>
 * and <code>_ACESTL_NO_NAMESPACE</code> are defined, all 
 * \ref group__project__acestl "ACESTL" components will be defined in the
 * global namespace. Conversely, if the <code>_STLSOFT_NO_NAMESPACE</code>
 * symbol (not to be confused with the 
 * <code>_STLSOFT_NO_NAMESPACES</code> symbol!) is defined - meaning that
 * all \ref group__project__stlsoft "main project" components are to be
 * defined in the global namespace, and <code>_ACESTL_NO_NAMESPACE</code>
 * is <b>not</b> defined, then all \ref group__project__acestl "ACESTL"
 * components will be defined within a bona fide <code>acestl</code>
 * namespace.
 *
 * \note This is a vestige of compatibility with compilers with
 * no (or no sensible) namespace support that is maintained for reasons of
 * backwards compatiblity and because it is, in <i>rare circumstances</i>, a
 * useful facility.
 */
namespace acestl
{
# else
/* Define stlsoft::acestl_project */

namespace stlsoft
{

namespace acestl_project
{

# endif /* _STLSOFT_NO_NAMESPACE */
#else
stlsoft_ns_using(move_lhs_from_rhs)
#endif /* !_ACESTL_NO_NAMESPACE */

/** \def acestl_ns_qual(x)
 * Qualifies with <b>acestl::</b> if ACESTL is using namespaces or, if not, does not qualify
 */

/** \def acestl_ns_using(x)
 * Declares a using directive (with respect to <b>acestl</b>) if ACESTL is using namespaces or, if not, does nothing
 */

#ifndef _ACESTL_NO_NAMESPACE
# define acestl_ns_qual(x)             ::acestl::x
# define acestl_ns_using(x)            using ::acestl::x;
#else /* ? _ACESTL_NO_NAMESPACE */
# define acestl_ns_qual(x)             x
# define acestl_ns_using(x)
#endif /* !_ACESTL_NO_NAMESPACE */

/** \def acestl_ns_qual_std(x)
 * Qualifies with <b>std::</b> if ACESTL is being translated in the context of the standard library being within the <b>std</b> namespace or, if not, does not qualify
 */

/** \def acestl_ns_using_std(x)
 * Declares a using directive (with respect to <b>std</b>) if ACESTL is being translated in the context of the standard library being within the <b>std</b> namespace or, if not, does nothing
 */

#ifdef STLSOFT_CF_std_NAMESPACE
# define acestl_ns_qual_std(x)         ::std::x
# define acestl_ns_using_std(x)        using ::std::x;
#else /* ? STLSOFT_CF_std_NAMESPACE */
# define acestl_ns_qual_std(x)         x
# define acestl_ns_using_std(x)
#endif /* !STLSOFT_CF_std_NAMESPACE */

/* /////////////////////////////////////////////////////////////////////////
 * Typedefs
 *
 * The ACESTL uses a number of typedefs to aid in compiler-independence in the
 * libraries' main code.
 */

#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION

typedef stlsoft_ns_qual(ss_char_a_t)        as_char_a_t;    //!< Ansi char type
typedef stlsoft_ns_qual(ss_char_w_t)        as_char_w_t;    //!< Unicode char type
typedef stlsoft_ns_qual(ss_sint8_t)         as_sint8_t;     //!< 8-bit signed integer
typedef stlsoft_ns_qual(ss_uint8_t)         as_uint8_t;     //!< 8-bit unsigned integer
typedef stlsoft_ns_qual(ss_int16_t)         as_int16_t;     //!< 16-bit integer
typedef stlsoft_ns_qual(ss_sint16_t)        as_sint16_t;    //!< 16-bit signed integer
typedef stlsoft_ns_qual(ss_uint16_t)        as_uint16_t;    //!< 16-bit unsigned integer
typedef stlsoft_ns_qual(ss_int32_t)         as_int32_t;     //!< 32-bit integer
typedef stlsoft_ns_qual(ss_sint32_t)        as_sint32_t;    //!< 32-bit signed integer
typedef stlsoft_ns_qual(ss_uint32_t)        as_uint32_t;    //!< 32-bit unsigned integer
#ifdef STLSOFT_CF_64BIT_INT_SUPPORT
typedef stlsoft_ns_qual(ss_int64_t)         as_int64_t;     //!< 64-bit integer
typedef stlsoft_ns_qual(ss_sint64_t)        as_sint64_t;    //!< 64-bit signed integer
typedef stlsoft_ns_qual(ss_uint64_t)        as_uint64_t;    //!< 64-bit unsigned integer
#endif /* STLSOFT_CF_64BIT_INT_SUPPORT */
typedef stlsoft_ns_qual(ss_int_t)           as_int_t;       //!< integer
typedef stlsoft_ns_qual(ss_sint_t)          as_sint_t;      //!< signed integer
typedef stlsoft_ns_qual(ss_uint_t)          as_uint_t;      //!< unsigned integer
typedef stlsoft_ns_qual(ss_long_t)          as_long_t;      //!< long
typedef stlsoft_ns_qual(ss_bool_t)          as_bool_t;      //!< bool
typedef stlsoft_ns_qual(ss_size_t)          as_size_t;      //!< size
typedef stlsoft_ns_qual(ss_ptrdiff_t)       as_ptrdiff_t;   //!< ptr diff
typedef stlsoft_ns_qual(ss_streampos_t)     as_streampos_t; //!< streampos
typedef stlsoft_ns_qual(ss_streamoff_t)     as_streamoff_t; //!< streamoff

#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

#ifndef _ACESTL_NO_NAMESPACE
typedef as_char_a_t         char_a_t;           //!< Ansi char type
typedef as_char_w_t         char_w_t;           //!< Unicode char type
//typedef as_int8_t           int8_t;             //!< 8-bit integer
typedef as_sint8_t          sint8_t;            //!< 8-bit signed integer
typedef as_uint8_t          uint8_t;            //!< 8-bit unsigned integer
typedef as_int16_t          int16_t;            //!< 16-bit integer
typedef as_sint16_t         sint16_t;           //!< 16-bit signed integer
typedef as_uint16_t         uint16_t;           //!< 16-bit unsigned integer
typedef as_int32_t          int32_t;            //!< 32-bit integer
typedef as_sint32_t         sint32_t;           //!< 32-bit signed integer
typedef as_uint32_t         uint32_t;           //!< 32-bit unsigned integer
# ifdef STLSOFT_CF_64BIT_INT_SUPPORT
 typedef as_int64_t         int64_t;            //!< 64-bit integer
 typedef as_sint64_t        sint64_t;           //!< 64-bit signed integer
 typedef as_uint64_t        uint64_t;           //!< 64-bit unsigned integer
# endif /* STLSOFT_CF_64BIT_INT_SUPPORT */
//typedef as_short_t          short_t;            //!< short integer
typedef as_int_t            int_t;              //!< integer
typedef as_sint_t           sint_t;             //!< signed integer
typedef as_uint_t           uint_t;             //!< unsigned integer
typedef as_long_t           long_t;             //!< long integer
//typedef as_byte_t           byte_t;             //!< Byte
typedef as_bool_t           bool_t;             //!< bool
# if !defined(STLSOFT_COMPILER_IS_DMC)
typedef as_size_t           size_t;             //!< size
typedef as_ptrdiff_t        ptrdiff_t;          //!< ptr diff
typedef as_streampos_t      streampos_t;        //!< streampos
typedef as_streamoff_t      streamoff_t;        //!< streamoff
# endif /* compiler */
#endif /* !_ACESTL_NO_NAMESPACE */

/* /////////////////////////////////////////////////////////////////////////
 * Values
 *
 * Since the boolean type may not be supported natively on all compilers, the
 * values of true and false may also not be provided. Hence the values of
 * as_true_v and as_false_v are defined, and are used in all code.
 */

#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION

#define as_true_v       ss_true_v
#define as_false_v      ss_false_v

#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
 * Code modification macros
 */

#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
/* Exception signatures. */
# define acestl_throw_0()                               stlsoft_throw_0()
# define acestl_throw_1(x1)                             stlsoft_throw_1(x1)
# define acestl_throw_2(x1, x2)                         stlsoft_throw_2(x1, x2)
# define acestl_throw_3(x1, x2, x3)                     stlsoft_throw_3(x1, x2, x3)
# define acestl_throw_4(x1, x2, x3, x4)                 stlsoft_throw_4(x1, x2, x3, x4)
# define acestl_throw_5(x1, x2, x3, x4, x5)             stlsoft_throw_5(x1, x2, x3, x4, x5)
# define acestl_throw_6(x1, x2, x3, x4, x5, x6)         stlsoft_throw_6(x1, x2, x3, x4, x5, x6)
# define acestl_throw_7(x1, x2, x3, x4, x5, x6, x7)     stlsoft_throw_7(x1, x2, x3, x4, x5, x6, x7)
# define acestl_throw_8(x1, x2, x3, x4, x5, x6, x7, x8) stlsoft_throw_8(x1, x2, x3, x4, x5, x6, x7, x8)
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/// Evaluates, at compile time, to the number of elements within the given vector entity
///
/// \param ar An array whose dimension is to be evaluated
#define ACESTL_NUM_ELEMENTS(ar)                         STLSOFT_NUM_ELEMENTS(ar)
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define acestl_num_elements(ar)                        ACESTL_NUM_ELEMENTS(ar)
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/** \brief [DEPRECATED] Destroys the given instance \c p of the given type (\c t and \c _type)
 *
 * \deprecated This is <b>heavily</b> deprecated in favour of \ref STLSOFT_DESTROY_INSTANCE().
 */
#define acestl_destroy_instance(t, _type, p)           STLSOFT_DESTROY_INSTANCE(t, _type, p)

/** \brief [DEPRECATED] Generates an opaque type with the name \c _htype
 *
 * \deprecated This is <b>heavily</b> deprecated in favour of \ref STLSOFT_GEN_OPAQUE().
 */
#define acestl_gen_opaque(_htype)                      STLSOFT_GEN_OPAQUE(_htype)

/* ////////////////////////////////////////////////////////////////////// */

#ifndef _ACESTL_NO_NAMESPACE
# if defined(_STLSOFT_NO_NAMESPACE) || \
     defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
} // namespace acestl
# else
} // namespace acestl_project
} // namespace stlsoft
namespace acestl = ::stlsoft::acestl_project;
# endif /* _STLSOFT_NO_NAMESPACE */
#endif /* !_ACESTL_NO_NAMESPACE */

/* /////////////////////////////////////////////////////////////////////////
 * Inclusion
 */

#ifdef STLSOFT_CF_PRAGMA_ONCE_SUPPORT
# pragma once
#endif /* STLSOFT_CF_PRAGMA_ONCE_SUPPORT */

/* ////////////////////////////////////////////////////////////////////// */

#endif /* !ACESTL_INCL_ACESTL_HPP_ACESTL */

/* ////////////////////////////////////////////////////////////////////// */

⌨️ 快捷键说明

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