📄 platformstl.h
字号:
# if defined(_STLSOFT_NO_NAMESPACES)
# error PlatformSTL may not be compiled when _STLSOFT_NO_NAMESPACES is defined. Note: it _can_ be compiled in the presence of _STLSOFT_NO_NAMESPACE, or _UNIXSTL_NO_NAMESPACE, or _WINSTL_NO_NAMESPACE
# endif /* _STLSOFT_NO_NAMESPACES */
# if defined(_PLATFORMSTL_NO_NAMESPACES)
# error Use of namespaces in PlatformSTL may not be suspended; _PLATFORMSTL_NO_NAMESPACES was detected
# endif /* _PLATFORMSTL_NO_NAMESPACES */
# if defined(_PLATFORMSTL_NO_NAMESPACE)
# error Use of namespaces in PlatformSTL may not be suspended; _PLATFORMSTL_NO_NAMESPACE was detected
# endif /* _PLATFORMSTL_NO_NAMESPACE */
#endif /* __cplusplus */
#if !defined(__cplusplus)
/* Nothing defined in C */
#elif defined(_STLSOFT_NO_NAMESPACE) || \
defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
/* There is no stlsoft namespace, so must define ::platformstl */
/** \brief The <code class="namespace">platformstl</code> namespace contains all components
* in the \ref group__project__platformstl "PlatformSTL" project.
*
* By default, the <code>platformstl</code> namespace is actually an alias for
* the namespace <code>stlsoft::platformstl_project</code>, which is where all
* the \ref group__project__platformstl "PlatformSTL" 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>platformstl</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>_PLATFORMSTL_NO_NAMESPACE</code> are defined, all
* \ref group__project__platformstl "PlatformSTL" 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>_PLATFORMSTL_NO_NAMESPACE</code>
* is <b>not</b> defined, then all \ref group__project__platformstl "PlatformSTL"
* components will be defined within a bona fide <code>platformstl</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 platformstl
{
#else
/* Define stlsoft::platformstl_project */
namespace stlsoft
{
namespace platformstl_project
{
#endif /* _STLSOFT_NO_NAMESPACE */
/** \def platformstl_ns_qual(x)
* Qualifies with <b>platformstl::</b> if PlatformSTL is using namespaces or, if not, does not qualify
*/
/** \def platformstl_ns_using(x)
* Declares a using directive (with respect to <b>platformstl</b>) if PlatformSTL is using namespaces or, if not, does nothing
*/
#ifndef _STLSOFT_NO_NAMESPACE
# define platformstl_ns_qual(x) ::platformstl::x
# define platformstl_ns_using(x) using ::platformstl::x;
#else /* ? _STLSOFT_NO_NAMESPACE */
# define platformstl_ns_qual(x) x
# define platformstl_ns_using(x)
#endif /* !_STLSOFT_NO_NAMESPACE */
/** \def platformstl_ns_qual_std(x)
* Qualifies with <b>std::</b> if PlatformSTL is being translated in the context of the standard library being within the <b>std</b> namespace or, if not, does not qualify
*/
/** \def platformstl_ns_using_std(x)
* Declares a using directive (with respect to <b>std</b>) if PlatformSTL 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 platformstl_ns_qual_std(x) ::std::x
# define platformstl_ns_using_std(x) using ::std::x;
#else /* ? STLSOFT_CF_std_NAMESPACE */
# define platformstl_ns_qual_std(x) x
# define platformstl_ns_using_std(x)
#endif /* !STLSOFT_CF_std_NAMESPACE */
/* ////////////////////////////////////////////////////////////////////// */
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# if defined(PLATFORMSTL_OS_IS_UNIX)
typedef unixstl_ns_qual(us_char_a_t) char_a_t; //!< Ansi char type
typedef unixstl_ns_qual(us_char_w_t) char_w_t; //!< Unicode char type
typedef unixstl_ns_qual(us_sint8_t) sint8_t; //!< 8-bit signed integer
typedef unixstl_ns_qual(us_uint8_t) uint8_t; //!< 8-bit unsigned integer
typedef unixstl_ns_qual(us_int16_t) int16_t; //!< 16-bit integer
typedef unixstl_ns_qual(us_sint16_t) sint16_t; //!< 16-bit signed integer
typedef unixstl_ns_qual(us_uint16_t) uint16_t; //!< 16-bit unsigned integer
typedef unixstl_ns_qual(us_int32_t) int32_t; //!< 32-bit integer
typedef unixstl_ns_qual(us_sint32_t) sint32_t; //!< 32-bit signed integer
typedef unixstl_ns_qual(us_uint32_t) uint32_t; //!< 32-bit unsigned integer
# ifdef STLSOFT_CF_64BIT_INT_SUPPORT
typedef unixstl_ns_qual(us_int64_t) int64_t; //!< 64-bit integer
typedef unixstl_ns_qual(us_sint64_t) sint64_t; //!< 64-bit signed integer
typedef unixstl_ns_qual(us_uint64_t) uint64_t; //!< 64-bit unsigned integer
# endif /* STLSOFT_CF_64BIT_INT_SUPPORT */
typedef unixstl_ns_qual(us_int_t) int_t; //!< integer
typedef unixstl_ns_qual(us_sint_t) sint_t; //!< signed integer
typedef unixstl_ns_qual(us_uint_t) uint_t; //!< unsigned integer
typedef unixstl_ns_qual(us_long_t) long_t; //!< long
typedef unixstl_ns_qual(us_bool_t) bool_t; //!< bool
typedef unixstl_ns_qual(us_size_t) size_t; //!< size
typedef unixstl_ns_qual(us_ptrdiff_t) ptrdiff_t; //!< ptr diff
typedef unixstl_ns_qual(us_streampos_t) streampos_t; //!< streampos
typedef unixstl_ns_qual(us_streamoff_t) streamoff_t; //!< streamoff
# elif defined(PLATFORMSTL_OS_IS_WIN32)
typedef winstl_ns_qual(ws_char_a_t) char_a_t; //!< Ansi char type
typedef winstl_ns_qual(ws_char_w_t) char_w_t; //!< Unicode char type
typedef winstl_ns_qual(ws_sint8_t) sint8_t; //!< 8-bit signed integer
typedef winstl_ns_qual(ws_uint8_t) uint8_t; //!< 8-bit unsigned integer
typedef winstl_ns_qual(ws_int16_t) int16_t; //!< 16-bit integer
typedef winstl_ns_qual(ws_sint16_t) sint16_t; //!< 16-bit signed integer
typedef winstl_ns_qual(ws_uint16_t) uint16_t; //!< 16-bit unsigned integer
typedef winstl_ns_qual(ws_int32_t) int32_t; //!< 32-bit integer
typedef winstl_ns_qual(ws_sint32_t) sint32_t; //!< 32-bit signed integer
typedef winstl_ns_qual(ws_uint32_t) uint32_t; //!< 32-bit unsigned integer
# ifdef STLSOFT_CF_64BIT_INT_SUPPORT
typedef winstl_ns_qual(ws_int64_t) int64_t; //!< 64-bit integer
typedef winstl_ns_qual(ws_sint64_t) sint64_t; //!< 64-bit signed integer
typedef winstl_ns_qual(ws_uint64_t) uint64_t; //!< 64-bit unsigned integer
# endif /* STLSOFT_CF_64BIT_INT_SUPPORT */
typedef winstl_ns_qual(ws_int_t) int_t; //!< integer
typedef winstl_ns_qual(ws_sint_t) sint_t; //!< signed integer
typedef winstl_ns_qual(ws_uint_t) uint_t; //!< unsigned integer
typedef winstl_ns_qual(ws_long_t) long_t; //!< long
#ifdef __cplusplus
typedef winstl_ns_qual(ws_bool_t) bool_t; //!< bool
#endif /* __cplusplus */
typedef winstl_ns_qual(ws_size_t) size_t; //!< size
typedef winstl_ns_qual(ws_ptrdiff_t) ptrdiff_t; //!< ptr diff
typedef winstl_ns_qual(ws_streampos_t) streampos_t; //!< streampos
typedef winstl_ns_qual(ws_streamoff_t) streamoff_t; //!< streamoff
# else /* ? operating system */
# error Operating system not discriminated. Only UNIX and Win32 are currently recognised by PlatformSTL
# endif /* operating system */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* ////////////////////////////////////////////////////////////////////// */
#if !defined(__cplusplus)
/* Nothing defined in C */
#elif defined(_STLSOFT_NO_NAMESPACE) || \
defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
} /* namespace platformstl */
#else
} /* namespace platformstl_project */
} /* namespace stlsoft */
namespace platformstl = ::stlsoft::platformstl_project;
#endif /* _STLSOFT_NO_NAMESPACE */
/* /////////////////////////////////////////////////////////////////////////
* Inclusion
*/
#ifdef STLSOFT_CF_PRAGMA_ONCE_SUPPORT
# pragma once
#endif /* STLSOFT_CF_PRAGMA_ONCE_SUPPORT */
/* ////////////////////////////////////////////////////////////////////// */
#endif /* !PLATFORMSTL_INCL_PLATFORMSTL_H_PLATFORMSTL */
/* ////////////////////////////////////////////////////////////////////// */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -