SimpleWindow
载入中...
搜索中...
未找到
sw::PropertyBase< T, TDerived > 模板类 参考

属性基类模板 更多...

#include <Property.h>

类 sw::PropertyBase< T, TDerived > 继承关系图:
sw::Property< int > sw::Property< bool > sw::Property< std::wstring > sw::Property< AppQuitMode > sw::Property< BmpBoxSizeMode > sw::Property< sw::Thickness > sw::Property< sw::CheckState > sw::Property< ColorDialogFlags > sw::Property< sw::Color > sw::Property< COLORREF * > sw::Property< DateTimePickerFormat > sw::Property< SYSTEMTIME > sw::Property< FileDialogFlags > sw::Property< FolderDialogFlags > sw::Property< FontDialogFlags > sw::Property< sw::Font > sw::Property< double > sw::Property< sw::FontWeight > sw::Property< sw::HotKey > sw::Property< uint32_t > sw::Property< sw::HorizontalAlignment > sw::Property< sw::VerticalAlignment > sw::Property< sw::TextTrimming > sw::Property< sw::LayoutHost * > sw::Property< HICON > sw::Property< sw::ContextMenu * > sw::Property< sw::BorderStyle > sw::Property< wchar_t > sw::Property< uint16_t > sw::Property< ProgressBarState > sw::Property< Orientation > sw::Property< sw::Orientation > sw::Property< TabAlignment > sw::Property< ToolTipIcon > sw::Property< HorizontalAlignment > sw::Property< VerticalAlignment > sw::Property< uint64_t > sw::Property< sw::LayoutUpdateCondition > sw::Property< sw::DynamicObject * > sw::Property< WindowStartupLocation > sw::Property< WindowState > sw::Property< sw::Menu * > sw::Property< sw::Window * > sw::Property< sw::Rect > sw::ReadOnlyProperty< int > sw::ReadOnlyProperty< StrList > sw::ReadOnlyProperty< TreeViewNode > sw::ReadOnlyProperty< bool > sw::ReadOnlyProperty< HINSTANCE > sw::ReadOnlyProperty< std::wstring > sw::ReadOnlyProperty< HBITMAP > sw::ReadOnlyProperty< double > sw::ReadOnlyProperty< sw::FileFilter * > sw::ReadOnlyProperty< sw::List< std::wstring > > sw::ReadOnlyProperty< HICON > sw::ReadOnlyProperty< TItem > sw::ReadOnlyProperty< sw::Rect > sw::ReadOnlyProperty< sw::Size > sw::ReadOnlyProperty< sw::Point > sw::ReadOnlyProperty< sw::TreeViewNode > sw::ReadOnlyProperty< sw::UIElement * > sw::ReadOnlyProperty< sw::DynamicObject * > sw::ReadOnlyProperty< sw::Window * > sw::ReadOnlyProperty< HWND > sw::ReadOnlyProperty< sw::WndBase * >

Public 类型

using TValue = T
 
using TSetterParam = _PropertySetterParamType< T >
 

Public 成员函数

FieldsAccessor< T > AccessFields () const
 访问属性字段,可由子类重写
 
Get () const
 获取属性值
 
void Set (TSetterParam value) const
 设置属性值
 
auto operator-> () const
 取属性字段
 
 operator T () const
 隐式转换
 
template<typename U = T, typename = typename std::enable_if<!std::is_arithmetic<T>::value && std::is_convertible<T, U>::value, U>::type>
 operator U () const
 隐式转换
 
template<typename U = T, typename = typename std::enable_if<!std::is_arithmetic<T>::value && !std::is_convertible<T, U>::value, U>::type, typename = typename std::enable_if<!std::is_arithmetic<T>::value && _IsExplicitlyConvertable<T, U>::value, U>::type>
 operator U () const
 显式转换
 
TDerived & operator= (TSetterParam value)
 设置属性值
 
const TDerived & operator= (TSetterParam value) const
 设置属性值
 
TDerived & operator= (const PropertyBase &prop)
 设置属性值
 
const TDerived & operator= (const PropertyBase &prop) const
 设置属性值
 
template<typename U >
auto operator+= (U &&value) -> typename std::enable_if< _AddOperationHelper< T, U >::value, TDerived & >::type
 加赋值运算
 
template<typename U >
auto operator+= (U &&value) const -> typename std::enable_if< _AddOperationHelper< T, U >::value, const TDerived & >::type
 加赋值运算
 
template<typename D , typename U >
auto operator+= (const PropertyBase< U, D > &prop) -> typename std::enable_if< _AddOperationHelper< T, U >::value, TDerived & >::type
 加赋值运算
 
template<typename D , typename U >
auto operator+= (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _AddOperationHelper< T, U >::value, const TDerived & >::type
 加赋值运算
 
template<typename U >
auto operator-= (U &&value) -> typename std::enable_if< _SubOperationHelper< T, U >::value, TDerived & >::type
 减赋值运算
 
template<typename U >
auto operator-= (U &&value) const -> typename std::enable_if< _SubOperationHelper< T, U >::value, const TDerived & >::type
 减赋值运算
 
template<typename D , typename U >
auto operator-= (const PropertyBase< U, D > &prop) -> typename std::enable_if< _SubOperationHelper< T, U >::value, TDerived & >::type
 减赋值运算
 
template<typename D , typename U >
auto operator-= (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _SubOperationHelper< T, U >::value, const TDerived & >::type
 减赋值运算
 
template<typename U >
auto operator*= (U &&value) -> typename std::enable_if< _MulOperationHelper< T, U >::value, TDerived & >::type
 乘赋值运算
 
template<typename U >
auto operator*= (U &&value) const -> typename std::enable_if< _MulOperationHelper< T, U >::value, const TDerived & >::type
 乘赋值运算
 
template<typename D , typename U >
auto operator*= (const PropertyBase< U, D > &prop) -> typename std::enable_if< _MulOperationHelper< T, U >::value, TDerived & >::type
 乘赋值运算
 
template<typename D , typename U >
auto operator*= (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _MulOperationHelper< T, U >::value, const TDerived & >::type
 乘赋值运算
 
template<typename U >
auto operator/= (U &&value) -> typename std::enable_if< _DivOperationHelper< T, U >::value, TDerived & >::type
 除赋值运算
 
template<typename U >
auto operator/= (U &&value) const -> typename std::enable_if< _DivOperationHelper< T, U >::value, const TDerived & >::type
 除赋值运算
 
template<typename D , typename U >
auto operator/= (const PropertyBase< U, D > &prop) -> typename std::enable_if< _DivOperationHelper< T, U >::value, TDerived & >::type
 除赋值运算
 
template<typename D , typename U >
auto operator/= (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _DivOperationHelper< T, U >::value, const TDerived & >::type
 除赋值运算
 
template<typename U = T>
auto operator++ () -> typename std::enable_if< _AddOperationHelper< U, int >::value, TDerived & >::type
 前置自增运算
 
template<typename U = T>
auto operator++ () const -> typename std::enable_if< _AddOperationHelper< U, int >::value, const TDerived & >::type
 前置自增运算
 
template<typename U = T>
auto operator-- () -> typename std::enable_if< _SubOperationHelper< U, int >::value, TDerived & >::type
 前置自减运算
 
template<typename U = T>
auto operator-- () const -> typename std::enable_if< _SubOperationHelper< U, int >::value, const TDerived & >::type
 前置自减运算
 
template<typename U = T>
auto operator++ (int) const -> typename std::enable_if< _AddOperationHelper< U, int >::value, T >::type
 后置自增运算
 
template<typename U = T>
auto operator-- (int) const -> typename std::enable_if< _SubOperationHelper< U, int >::value, T >::type
 后置自减运算
 
template<typename U >
auto operator&= (U &&value) -> typename std::enable_if< _BitAndOperationHelper< T, U >::value, TDerived & >::type
 按位与赋值运算
 
template<typename U >
auto operator&= (U &&value) const -> typename std::enable_if< _BitAndOperationHelper< T, U >::value, const TDerived & >::type
 按位与赋值运算
 
template<typename D , typename U >
auto operator&= (const PropertyBase< U, D > &prop) -> typename std::enable_if< _BitAndOperationHelper< T, U >::value, TDerived & >::type
 按位与赋值运算
 
template<typename D , typename U >
auto operator&= (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _BitAndOperationHelper< T, U >::value, const TDerived & >::type
 按位与赋值运算
 
template<typename U >
auto operator|= (U &&value) -> typename std::enable_if< _BitOrOperationHelper< T, U >::value, TDerived & >::type
 按位或赋值运算
 
template<typename U >
auto operator|= (U &&value) const -> typename std::enable_if< _BitOrOperationHelper< T, U >::value, const TDerived & >::type
 按位或赋值运算
 
template<typename D , typename U >
auto operator|= (const PropertyBase< U, D > &prop) -> typename std::enable_if< _BitOrOperationHelper< T, U >::value, TDerived & >::type
 按位或赋值运算
 
template<typename D , typename U >
auto operator|= (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _BitOrOperationHelper< T, U >::value, const TDerived & >::type
 按位或赋值运算
 
template<typename U >
auto operator^= (U &&value) -> typename std::enable_if< _BitXorOperationHelper< T, U >::value, TDerived & >::type
 按位异或赋值运算
 
template<typename U >
auto operator^= (U &&value) const -> typename std::enable_if< _BitXorOperationHelper< T, U >::value, const TDerived & >::type
 按位异或赋值运算
 
template<typename D , typename U >
auto operator^= (const PropertyBase< U, D > &prop) -> typename std::enable_if< _BitXorOperationHelper< T, U >::value, TDerived & >::type
 按位异或赋值运算
 
template<typename D , typename U >
auto operator^= (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _BitXorOperationHelper< T, U >::value, const TDerived & >::type
 按位异或赋值运算
 
template<typename U >
auto operator<<= (U &&value) -> typename std::enable_if< _ShlOperationHelper< T, U >::value, TDerived & >::type
 左移赋值运算
 
template<typename U >
auto operator<<= (U &&value) const -> typename std::enable_if< _ShlOperationHelper< T, U >::value, const TDerived & >::type
 左移赋值运算
 
template<typename D , typename U >
auto operator<<= (const PropertyBase< U, D > &prop) -> typename std::enable_if< _ShlOperationHelper< T, U >::value, TDerived & >::type
 左移赋值运算
 
template<typename D , typename U >
auto operator<<= (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _ShlOperationHelper< T, U >::value, const TDerived & >::type
 左移赋值运算
 
template<typename U >
auto operator>>= (U &&value) -> typename std::enable_if< _ShrOperationHelper< T, U >::value, TDerived & >::type
 右移赋值运算
 
template<typename U >
auto operator>>= (U &&value) const -> typename std::enable_if< _ShrOperationHelper< T, U >::value, const TDerived & >::type
 右移赋值运算
 
template<typename D , typename U >
auto operator>>= (const PropertyBase< U, D > &prop) -> typename std::enable_if< _ShrOperationHelper< T, U >::value, TDerived & >::type
 右移赋值运算
 
template<typename D , typename U >
auto operator>>= (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _ShrOperationHelper< T, U >::value, const TDerived & >::type
 右移赋值运算
 
template<typename U = T>
auto operator! () const -> typename std::enable_if< _LogicNotOperationHelper< U >::value, typename _LogicNotOperationHelper< U >::type >::type
 逻辑非运算
 
template<typename U = T>
auto operator~ () const -> typename std::enable_if< _BitNotOperationHelper< U >::value, typename _BitNotOperationHelper< U >::type >::type
 按位非运算
 
template<typename U = T>
auto operator* () const -> typename std::enable_if< _DerefOperationHelper< U >::value, typename _DerefOperationHelper< U >::type >::type
 解引用运算
 
template<typename U = T>
auto operator& () const -> typename std::enable_if< _AddrOperationHelper< U >::value, typename _AddrOperationHelper< U >::type >::type
 地址运算
 
template<typename U = T>
auto operator+ () const -> typename std::enable_if< _UnaryPlusOperationHelper< U >::value, typename _UnaryPlusOperationHelper< U >::type >::type
 正号运算
 
template<typename U = T>
auto operator- () const -> typename std::enable_if< _UnaryMinusOperationHelper< U >::value, typename _UnaryMinusOperationHelper< U >::type >::type
 负号运算
 
template<typename U >
auto operator+ (U &&value) const -> typename std::enable_if< _AddOperationHelper< T, U >::value, typename _AddOperationHelper< T, U >::type >::type
 加法运算
 
template<typename D , typename U >
auto operator+ (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _AddOperationHelper< T, U >::value, typename _AddOperationHelper< T, U >::type >::type
 加法运算
 
template<typename U >
auto operator- (U &&value) const -> typename std::enable_if< _SubOperationHelper< T, U >::value, typename _SubOperationHelper< T, U >::type >::type
 减法运算
 
template<typename D , typename U >
auto operator- (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _SubOperationHelper< T, U >::value, typename _SubOperationHelper< T, U >::type >::type
 减法运算
 
template<typename U >
auto operator* (U &&value) const -> typename std::enable_if< _MulOperationHelper< T, U >::value, typename _MulOperationHelper< T, U >::type >::type
 乘法运算
 
template<typename D , typename U >
auto operator* (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _MulOperationHelper< T, U >::value, typename _MulOperationHelper< T, U >::type >::type
 乘法运算
 
template<typename U >
auto operator/ (U &&value) const -> typename std::enable_if< _DivOperationHelper< T, U >::value, typename _DivOperationHelper< T, U >::type >::type
 除法运算
 
template<typename D , typename U >
auto operator/ (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _DivOperationHelper< T, U >::value, typename _DivOperationHelper< T, U >::type >::type
 除法运算
 
template<typename U >
auto operator% (U &&value) const -> typename std::enable_if< _ModOperationHelper< T, U >::value, typename _ModOperationHelper< T, U >::type >::type
 取模运算
 
template<typename D , typename U >
auto operator% (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _ModOperationHelper< T, U >::value, typename _ModOperationHelper< T, U >::type >::type
 取模运算
 
template<typename U >
auto operator== (U &&value) const -> typename std::enable_if< _EqOperationHelper< T, U >::value, typename _EqOperationHelper< T, U >::type >::type
 等于运算
 
template<typename D , typename U >
auto operator== (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _EqOperationHelper< T, U >::value, typename _EqOperationHelper< T, U >::type >::type
 等于运算
 
template<typename U >
auto operator!= (U &&value) const -> typename std::enable_if< _EqOperationHelper< T, U >::value, typename _EqOperationHelper< T, U >::type >::type
 不等于运算
 
template<typename D , typename U >
auto operator!= (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _EqOperationHelper< T, U >::value, typename _EqOperationHelper< T, U >::type >::type
 不等于运算
 
template<typename U >
auto operator< (U &&value) const -> typename std::enable_if< _LtOperationHelper< T, U >::value, typename _LtOperationHelper< T, U >::type >::type
 小于运算
 
template<typename D , typename U >
auto operator< (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _LtOperationHelper< T, U >::value, typename _LtOperationHelper< T, U >::type >::type
 小于运算
 
template<typename U >
auto operator<= (U &&value) const -> typename std::enable_if< _LeOperationHelper< T, U >::value, typename _LeOperationHelper< T, U >::type >::type
 小于等于运算
 
template<typename D , typename U >
auto operator<= (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _LeOperationHelper< T, U >::value, typename _LeOperationHelper< T, U >::type >::type
 小于等于运算
 
template<typename U >
auto operator> (U &&value) const -> typename std::enable_if< _GtOperationHelper< T, U >::value, typename _GtOperationHelper< T, U >::type >::type
 大于运算
 
template<typename D , typename U >
auto operator> (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _GtOperationHelper< T, U >::value, typename _GtOperationHelper< T, U >::type >::type
 大于运算
 
template<typename U >
auto operator>= (U &&value) const -> typename std::enable_if< _GeOperationHelper< T, U >::value, typename _GeOperationHelper< T, U >::type >::type
 大于等于运算
 
template<typename D , typename U >
auto operator>= (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _GeOperationHelper< T, U >::value, typename _GeOperationHelper< T, U >::type >::type
 大于等于运算
 
template<typename U >
auto operator& (U &&value) const -> typename std::enable_if< _BitAndOperationHelper< T, U >::value, typename _BitAndOperationHelper< T, U >::type >::type
 按位与运算
 
template<typename D , typename U >
auto operator& (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _BitAndOperationHelper< T, U >::value, typename _BitAndOperationHelper< T, U >::type >::type
 按位与运算
 
template<typename U >
auto operator| (U &&value) const -> typename std::enable_if< _BitOrOperationHelper< T, U >::value, typename _BitOrOperationHelper< T, U >::type >::type
 按位或运算
 
template<typename D , typename U >
auto operator| (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _BitOrOperationHelper< T, U >::value, typename _BitOrOperationHelper< T, U >::type >::type
 按位或运算
 
template<typename U >
auto operator^ (U &&value) const -> typename std::enable_if< _BitXorOperationHelper< T, U >::value, typename _BitXorOperationHelper< T, U >::type >::type
 按位异或运算
 
template<typename D , typename U >
auto operator^ (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _BitXorOperationHelper< T, U >::value, typename _BitXorOperationHelper< T, U >::type >::type
 按位异或运算
 
template<typename U >
auto operator<< (U &&value) const -> typename std::enable_if< _ShlOperationHelper< T, U >::value, typename _ShlOperationHelper< T, U >::type >::type
 左移运算
 
template<typename D , typename U >
auto operator<< (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _ShlOperationHelper< T, U >::value, typename _ShlOperationHelper< T, U >::type >::type
 左移运算
 
template<typename U >
auto operator>> (U &&value) const -> typename std::enable_if< _ShrOperationHelper< T, U >::value, typename _ShrOperationHelper< T, U >::type >::type
 右移运算
 
template<typename D , typename U >
auto operator>> (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _ShrOperationHelper< T, U >::value, typename _ShrOperationHelper< T, U >::type >::type
 右移运算
 
template<typename U >
auto operator&& (U &&value) const -> typename std::enable_if< _LogicAndOperationHelper< T, U >::value, typename _LogicAndOperationHelper< T, U >::type >::type
 逻辑与运算
 
template<typename D , typename U >
auto operator&& (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _LogicAndOperationHelper< T, U >::value, typename _LogicAndOperationHelper< T, U >::type >::type
 逻辑与运算
 
template<typename U >
auto operator|| (U &&value) const -> typename std::enable_if< _LogicOrOperationHelper< T, U >::value, typename _LogicOrOperationHelper< T, U >::type >::type
 逻辑或运算
 
template<typename D , typename U >
auto operator|| (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _LogicOrOperationHelper< T, U >::value, typename _LogicOrOperationHelper< T, U >::type >::type
 逻辑或运算
 
template<typename U >
auto operator[] (U &&value) const -> typename std::enable_if< _BracketOperationHelper< T, U >::value &&!std::is_reference< typename _BracketOperationHelper< T, U >::type >::value, typename _BracketOperationHelper< T, U >::type >::type
 下标运算
 
template<typename D , typename U >
auto operator[] (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _BracketOperationHelper< T, U >::value &&!std::is_reference< typename _BracketOperationHelper< T, U >::type >::value, typename _BracketOperationHelper< T, U >::type >::type
 下标运算
 
template<typename U >
auto operator[] (U &&value) const -> typename std::enable_if< _BracketOperationHelper< T, U >::value &&std::is_pointer< T >::value, typename _BracketOperationHelper< T, U >::type >::type
 指针下标运算
 
template<typename D , typename U >
auto operator[] (const PropertyBase< U, D > &prop) const -> typename std::enable_if< _BracketOperationHelper< T, U >::value &&std::is_pointer< T >::value, typename _BracketOperationHelper< T, U >::type >::type
 指针下标运算
 

静态 Public 成员函数

template<typename TOwner >
static MemberPropertyInitializer< TOwner, T > Init (TOwner *owner)
 获取成员属性初始化器
 
static StaticPropertyInitializer< T > Init ()
 获取静态属性初始化器
 

Protected 成员函数

bool IsStatic () const noexcept
 判断属性是否为静态属性
 
void SetOwner (void *owner) noexcept
 设置属性所有者对象,nullptr表示静态属性
 
void * GetOwner () const noexcept
 获取属性所有者对象,当属性为静态属性时返回nullptr
 

Protected 属性

std::ptrdiff_t _offset {_STATICOFFSET}
 所有者对象相对于当前属性对象的偏移量
 

静态 Protected 属性

static constexpr std::ptrdiff_t _STATICOFFSET
 静态属性偏移量标记
 

详细描述

template<typename T, typename TDerived>
class sw::PropertyBase< T, TDerived >

属性基类模板

向前声明

成员函数说明

◆ operator!=() [1/2]

template<typename T , typename TDerived >
template<typename D , typename U >
auto sw::PropertyBase< T, TDerived >::operator!= ( const PropertyBase< U, D > &  prop) const -> typename std::enable_if<_EqOperationHelper<T, U>::value, typename _EqOperationHelper<T, U>::type>::type
inline

不等于运算

注解
避免与c++20自动生成的!=冲突,通过==取反实现

◆ operator!=() [2/2]

template<typename T , typename TDerived >
template<typename U >
auto sw::PropertyBase< T, TDerived >::operator!= ( U &&  value) const -> typename std::enable_if<_EqOperationHelper<T, U>::value, typename _EqOperationHelper<T, U>::type>::type
inline

不等于运算

注解
避免与c++20自动生成的!=冲突,通过==取反实现

类成员变量说明

◆ _STATICOFFSET

template<typename T , typename TDerived >
constexpr std::ptrdiff_t sw::PropertyBase< T, TDerived >::_STATICOFFSET
staticconstexprprotected
初始值:
=
(std::numeric_limits<std::ptrdiff_t>::max)()

静态属性偏移量标记


该类的文档由以下文件生成: