31#include "rttr/detail/base/core_prerequisites.h"
56template<
typename Target_Type,
typename Source_Type>
57Target_Type
rttr_cast(Source_Type
object) RTTR_NOEXCEPT;
62struct base_class_info;
63struct type_converter_base;
65class type_register_private;
67static type get_invalid_type() RTTR_NOEXCEPT;
71class destructor_wrapper_base;
72class property_wrapper_base;
73RTTR_LOCAL RTTR_INLINE type create_type(type_data*) RTTR_NOEXCEPT;
76RTTR_LOCAL std::unique_ptr<type_data> make_type_data();
78template<
typename T,
typename Tp,
typename Converter>
79struct variant_data_base_policy;
81struct type_comparator_base;
83enum class type_of_visit : bool;
85RTTR_API
bool compare_types_less_than(
const void*,
const void*,
const type&,
int&);
86RTTR_API
bool compare_types_equal(
const void*,
const void*,
const type&,
bool&);
89RTTR_LOCAL RTTR_INLINE type get_type_from_instance(
const T*) RTTR_NOEXCEPT;
263 RTTR_INLINE
bool is_valid() const RTTR_NOEXCEPT;
270 RTTR_INLINE explicit operator
bool() const RTTR_NOEXCEPT;
280 RTTR_INLINE
type get_raw_type() const RTTR_NOEXCEPT;
302 RTTR_INLINE
type get_wrapped_type() const RTTR_NOEXCEPT;
310 RTTR_LOCAL static
type get() RTTR_NOEXCEPT;
323 RTTR_LOCAL static
type get(T&&
object) RTTR_NOEXCEPT;
351 RTTR_INLINE std::
size_t get_sizeof() const RTTR_NOEXCEPT;
358 RTTR_INLINE
bool is_class() const RTTR_NOEXCEPT;
378 RTTR_INLINE
bool is_template_instantiation() const RTTR_NOEXCEPT;
408 RTTR_INLINE
bool is_enumeration() const RTTR_NOEXCEPT;
437 RTTR_INLINE
bool is_wrapper() const RTTR_NOEXCEPT;
454 RTTR_INLINE
bool is_array() const RTTR_NOEXCEPT;
464 RTTR_INLINE
bool is_associative_container() const RTTR_NOEXCEPT;
474 RTTR_INLINE
bool is_sequential_container() const RTTR_NOEXCEPT;
482 RTTR_INLINE
bool is_pointer() const RTTR_NOEXCEPT;
491 RTTR_INLINE
bool is_arithmetic() const RTTR_NOEXCEPT;
499 RTTR_INLINE
bool is_function_pointer() const RTTR_NOEXCEPT;
507 RTTR_INLINE
bool is_member_object_pointer() const RTTR_NOEXCEPT;
515 RTTR_INLINE
bool is_member_function_pointer() const RTTR_NOEXCEPT;
526 bool is_derived_from(const
type& other) const RTTR_NOEXCEPT;
538 bool is_derived_from() const RTTR_NOEXCEPT;
549 bool is_base_of(const
type& other) const RTTR_NOEXCEPT;
561 bool is_base_of() const RTTR_NOEXCEPT;
702 bool destroy(
variant& obj) const RTTR_NOEXCEPT;
996 static
void register_converter_func(F func);
1022 template<typename T>
1023 static
void register_wrapper_converter_for_base_classes();
1047 template<typename T>
1048 static
void register_comparators();
1072 template<typename T>
1073 static
void register_equal_comparator();
1104 template<typename T>
1105 static
void register_less_than_comparator();
1112 type() RTTR_NOEXCEPT;
1119 RTTR_INLINE explicit
type(detail::type_data* data) RTTR_NOEXCEPT;
1129 static
void* apply_offset(
void* ptr, const
type& source_type, const
type& target_type) RTTR_NOEXCEPT;
1136 static
type get_derived_type(
void* ptr, const
type& source_type) RTTR_NOEXCEPT;
1145 const detail::type_converter_base* get_type_converter(const
type& target_type) const RTTR_NOEXCEPT;
1154 const detail::type_comparator_base* get_equal_comparator() const RTTR_NOEXCEPT;
1163 const detail::type_comparator_base* get_less_than_comparator() const RTTR_NOEXCEPT;
1171 RTTR_INLINE std::
size_t get_pointer_dimension() const RTTR_NOEXCEPT;
1180 RTTR_INLINE
type get_raw_array_type() const RTTR_NOEXCEPT;
1187 RTTR_INLINE
string_view get_full_name() const RTTR_NOEXCEPT;
1198 void visit(
visitor&
visitor, detail::type_of_visit visit_type) const RTTR_NOEXCEPT;
1208 template<typename Target_Type, typename Source_Type>
1209 friend Target_Type rttr_cast(Source_Type
object) RTTR_NOEXCEPT;
1212 friend class detail::type_register;
1213 friend class detail::type_register_private;
1215 friend struct detail::class_data;
1217 friend
type detail::create_type(detail::type_data*) RTTR_NOEXCEPT;
1219 template<typename T>
1220 friend std::unique_ptr<detail::type_data> detail::make_type_data();
1222 template<typename T, typename Tp, typename Converter>
1223 friend struct detail::variant_data_base_policy;
1225 friend RTTR_API
bool detail::compare_types_less_than(const
void*, const
void*, const
type&,
int&);
1226 friend RTTR_API
bool detail::compare_types_equal(const
void*, const
void*, const
type&,
bool&);
1229 detail::type_data* m_type_data;
1234#include "rttr/detail/type/type_impl.h"
The argument class is used for forwarding arguments to properties or methods.
Definition: argument.h:52
The array_range class provides a view into an underlying data structure with lower and upper limits.
Definition: array_range.h:64
The class template basic_string_view describes an non-owning reference to a constant contiguous seque...
Definition: string_view.h:49
The constructor class provides several meta information about a constructor and can be invoked.
Definition: constructor.h:90
The destructor class provides a destructor for registered types.
Definition: destructor.h:73
The enumeration class provides several meta information about an enum.
Definition: enumeration.h:113
The instance class is used for forwarding the instance of an object to invoke a property or method.
Definition: instance.h:48
The method class provides several meta information about a method and can be invoked.
Definition: method.h:122
The property class provides several meta information about a property and gives read/write access to ...
Definition: property.h:118
The type class holds the type information for any arbitrary object.
Definition: type.h:178
type & operator=(const type &other) noexcept
Assigns a type to another one.
bool operator==(const type &other) const noexcept
Compares this type with the other type and returns true if both describe the same type,...
uintptr_t type_id
Definition: type.h:180
bool operator!=(const type &other) const noexcept
Compares this type with the other type and returns true if both describe different types,...
bool operator>(const type &other) const noexcept
Comparison operator for sorting the type data according to some internal criterion.
bool operator<=(const type &other) const noexcept
Comparison operator for sorting the type data according to some internal criterion.
bool operator<(const type &other) const noexcept
Comparison operator for sorting the type data according to some internal criterion.
type_id get_id() const noexcept
Returns the id of this type.
bool operator>=(const type &other) const noexcept
Comparison operator for sorting the type data according to some internal criterion.
type(const type &other) noexcept
Assigns a type to another one.
The variant class allows to store data of any type and convert between these types transparently.
Definition: variant.h:199
The class visitor, is used for visiting your registered accessors of a type at compile time.
Definition: visitor.h:99
Definition: access_levels.h:34
Target_Type rttr_cast(Source_Type object) noexcept
Casts the given object of type Source_Type to an object of type Target_Type.
Contains a list of template parameters.
Definition: type_list.h:41