3 #include "swCommonLib/Common/RTTR.h"
14 const rttr::property m_metaInfo;
20 : m_metaInfo( metaInfo )
21 , m_ownerObj(
object )
26 : m_ownerObj( object )
29 std::string GetPropertyName() {
return m_metaInfo.get_name(); }
30 rttr::type GetPropertyType() {
return m_metaInfo.get_type(); }
32 bool IsValid() {
return m_metaInfo.is_valid() && m_ownerObj; }
37 template<
typename ClassType,
typename ParamType >
38 ParamType ClassType::* GetMemberPointer()
40 return static_cast< const rttr::detail::property_wrapper_member_base< ClassType, ParamType >*
>( m_metaInfo.m_wrapper )->GetPtr();
46 template<
typename PropertyType >
63 inline PropertyType& operator()(
void )
67 auto memberPtr = GetMemberPointer< IEnableProperty, PropertyType >();
68 return m_ownerObj->*memberPtr;
71 inline operator PropertyType&()
75 auto memberPtr = GetMemberPointer< IEnableProperty, PropertyType >();
76 return m_ownerObj->*memberPtr;
Definition: IEnableProperty.h:7
IProperty(IEnableProperty *object)
Tworzy niepoprawny obiekt IProperty.
Definition: Property.h:25
Definition: Property.h:47
Definition: Property.h:10
Property(IEnableProperty *object)
Tworzy niepoprawny obiekt Property.
Definition: Property.h:59