28 #ifndef RTTR_INSTANCE_H_
29 #define RTTR_INSTANCE_H_
31 #include "rttr/detail/base/core_prerequisites.h"
32 #include "rttr/detail/misc/misc_type_traits.h"
33 #include "rttr/detail/misc/data_address_container.h"
47 class RTTR_API instance
49 template<
typename T,
typename Tp = detail::decay_t<T>>
59 RTTR_INLINE instance() RTTR_NOEXCEPT;
64 RTTR_INLINE instance(const variant& var) RTTR_NOEXCEPT;
69 RTTR_INLINE instance(const instance& other) RTTR_NOEXCEPT;
76 template<typename T, typename Tp = decay_instance_t<T>>
77 RTTR_INLINE instance(T& data) RTTR_NOEXCEPT;
85 template<typename Target_Type>
86 RTTR_INLINE Target_Type* try_convert() const RTTR_NOEXCEPT;
93 RTTR_INLINE
bool is_valid() const RTTR_NOEXCEPT;
100 explicit operator
bool() const RTTR_NOEXCEPT;
109 RTTR_INLINE
type get_type() const RTTR_NOEXCEPT;
128 RTTR_INLINE
instance get_wrapped_instance() const RTTR_NOEXCEPT;
147 RTTR_INLINE
type get_derived_type() const RTTR_NOEXCEPT;
152 detail::data_address_container m_data_container;
157 #include "rttr/detail/impl/instance_impl.h"
159 #endif // RTTR_INSTANCE_H_