📄 cwindow.hpp
字号:
return (NULL == m_buffer) ? "" : m_buffer;
}
// Members
private:
LPTSTR m_buffer;
// Not to be implemented
private:
void operator =(class_type const& rhs);
};
/* /////////////////////////////////////////////////////////////////////////
* Equivalence testing
*/
inline as_bool_t operator ==(LPCTSTR lhs, c_str_ptr_null_CWindow_proxy const& rhs)
{
return lhs == static_cast<LPCTSTR>(rhs);
}
inline as_bool_t operator ==(c_str_ptr_null_CWindow_proxy const& lhs, LPCTSTR rhs)
{
return static_cast<LPCTSTR>(lhs) == rhs;
}
inline as_bool_t operator !=(LPCTSTR lhs, c_str_ptr_null_CWindow_proxy const& rhs)
{
return lhs != static_cast<LPCTSTR>(rhs);
}
inline as_bool_t operator !=(c_str_ptr_null_CWindow_proxy const& lhs, LPCTSTR rhs)
{
return static_cast<LPCTSTR>(lhs) != rhs;
}
/* /////////////////////////////////////////////////////////////////////////
* IOStream compatibility
*/
template<ss_typename_param_k S>
inline S& operator <<(S& s, c_str_ptr_null_CWindow_proxy const& shim)
{
s << static_cast<LPCTSTR>(shim);
return s;
}
template <ss_typename_param_k S>
inline S& operator <<(S& s, c_str_ptr_CWindow_proxy const& shim)
{
s << static_cast<LPCTSTR>(shim);
return s;
}
/* /////////////////////////////////////////////////////////////////////////
* c_str_data
*
* This can be applied to an expression, and the return value is either a
* pointer to the character string or to an empty string.
*/
/* CWindow */
/** \brief \ref group__concept__shim__string_access__c_str_data for CWindow
*
* \ingroup group__concept__shim__string_access
*
*/
inline c_str_ptr_CWindow_proxy c_str_data(atlstl_ns_qual_atl(CWindow) const& w)
{
return c_str_ptr_CWindow_proxy(w);
}
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# ifdef UNICODE
inline c_str_ptr_CWindow_proxy c_str_data_w(atlstl_ns_qual_atl(CWindow) const& w)
# else /* ? UNICODE */
inline c_str_ptr_CWindow_proxy c_str_data_a(atlstl_ns_qual_atl(CWindow) const& w)
# endif /* UNICODE */
{
return c_str_data(w);
}
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
* c_str_len
*
* This can be applied to an expression, and the return value is the number
* of characters in the character string in the expression.
*/
/* CWindow */
/** \brief \ref group__concept__shim__string_access__c_str_len for CWindow
*
* \ingroup group__concept__shim__string_access
*
*/
inline as_size_t c_str_len(atlstl_ns_qual_atl(CWindow) const& w)
{
return static_cast<as_size_t>(w.GetWindowTextLength());
}
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# ifdef UNICODE
inline as_size_t c_str_len_w(atlstl_ns_qual_atl(CWindow) const& w)
# else /* ? UNICODE */
inline as_size_t c_str_len_a(atlstl_ns_qual_atl(CWindow) const& w)
# endif /* UNICODE */
{
return c_str_len(w);
}
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
* c_str_ptr
*
* This can be applied to an expression, and the return value is either a
* pointer to the character string or to an empty string.
*/
/* CWindow */
/** \brief \ref group__concept__shim__string_access__c_str_ptr for CWindow
*
* \ingroup group__concept__shim__string_access
*
*/
inline c_str_ptr_CWindow_proxy c_str_ptr(atlstl_ns_qual_atl(CWindow) const& w)
{
return c_str_ptr_CWindow_proxy(w);
}
# ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# ifdef UNICODE
inline c_str_ptr_CWindow_proxy c_str_ptr_w(atlstl_ns_qual_atl(CWindow) const& w)
# else /* ? UNICODE */
inline c_str_ptr_CWindow_proxy c_str_ptr_a(atlstl_ns_qual_atl(CWindow) const& w)
# endif /* UNICODE */
{
return c_str_ptr(w);
}
# endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
* c_str_ptr_null
*
* This can be applied to an expression, and the return value is either a
* pointer to the character string or NULL.
*/
/* CWindow */
/** \brief \ref group__concept__shim__string_access__c_str_ptr_null for CWindow
*
* \ingroup group__concept__shim__string_access
*
*/
inline c_str_ptr_null_CWindow_proxy c_str_ptr_null(atlstl_ns_qual_atl(CWindow) const& w)
{
return c_str_ptr_null_CWindow_proxy(w);
}
# ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# ifdef UNICODE
inline c_str_ptr_null_CWindow_proxy c_str_ptr_null_w(atlstl_ns_qual_atl(CWindow) const& w)
# else /* ? UNICODE */
inline c_str_ptr_null_CWindow_proxy c_str_ptr_null_a(atlstl_ns_qual_atl(CWindow) const& w)
# endif /* UNICODE */
{
return c_str_ptr_null(w);
}
# endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
////////////////////////////////////////////////////////////////////////////
// Unit-testing
#ifdef STLSOFT_UNITTEST
# include "./unittest/cwindow_unittest_.h"
#endif /* STLSOFT_UNITTEST */
/* ////////////////////////////////////////////////////////////////////// */
#ifndef _ATLSTL_NO_NAMESPACE
# if defined(_STLSOFT_NO_NAMESPACE) || \
defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
} // namespace atlstl
# else
} // namespace stlsoft::atlstl_project
} // namespace stlsoft
# endif /* _STLSOFT_NO_NAMESPACE */
#endif /* !_ATLSTL_NO_NAMESPACE */
/* /////////////////////////////////////////////////////////////////////////
* Namespace
*
* The string access shims exist either in the stlsoft namespace, or in the
* global namespace. This is required by the lookup rules.
*
*/
#ifndef _ATLSTL_NO_NAMESPACE
# if !defined(_STLSOFT_NO_NAMESPACE) && \
!defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
namespace stlsoft
{
# else /* ? _STLSOFT_NO_NAMESPACE */
/* There is no stlsoft namespace, so must define in the global namespace */
# endif /* !_STLSOFT_NO_NAMESPACE */
using ::atlstl::c_str_data;
#if defined(UNICODE)
using ::atlstl::c_str_data_w;
#else /* ? UNICODE*/
using ::atlstl::c_str_data_a;
#endif /* UNICODE*/
using ::atlstl::c_str_len;
#if defined(UNICODE)
using ::atlstl::c_str_len_w;
#else /* ? UNICODE*/
using ::atlstl::c_str_len_a;
#endif /* UNICODE*/
using ::atlstl::c_str_ptr;
#if defined(UNICODE)
using ::atlstl::c_str_ptr_w;
#else /* ? UNICODE*/
using ::atlstl::c_str_ptr_a;
#endif /* UNICODE*/
using ::atlstl::c_str_ptr_null;
#if defined(UNICODE)
using ::atlstl::c_str_ptr_null_w;
#else /* ? UNICODE*/
using ::atlstl::c_str_ptr_null_a;
#endif /* UNICODE*/
# if !defined(_STLSOFT_NO_NAMESPACE) && \
!defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
} // namespace stlsoft
# else /* ? _STLSOFT_NO_NAMESPACE */
/* There is no stlsoft namespace, so must define in the global namespace */
# endif /* !_STLSOFT_NO_NAMESPACE */
#endif /* !_ATLSTL_NO_NAMESPACE */
/* ////////////////////////////////////////////////////////////////////// */
#endif /* !ATLSTL_INCL_ATLSTL_SHIMS_ACCESS_STRING_HPP_CWINDOW */
/* ////////////////////////////////////////////////////////////////////// */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -