type.h
Go to the documentation of this file.
603 constructor get_constructor(const std::vector<type>& params = std::vector<type>() ) const RTTR_NOEXCEPT;
931 static method get_global_method(string_view name, const std::vector<type>& params) RTTR_NOEXCEPT;
1122 static void* apply_offset(void* ptr, const type& source_type, const type& target_type) RTTR_NOEXCEPT;
1138 const detail::type_converter_base* get_type_converter(const type& target_type) const RTTR_NOEXCEPT;
1212 friend RTTR_API bool detail::compare_types_less_than(const void*, const void*, const type&, int&);
1213 friend RTTR_API bool detail::compare_types_equal(const void*, const void*, const type&, bool&);
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 constructor class provides several meta information about a constructor and can be invoked.
Definition constructor.h:89
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:121
The property class provides several meta information about a property and gives read/write access to ...
Definition property.h:117
bool is_template_instantiation() const noexcept
Returns true whether the given type is an instantiation of a class template.
destructor get_destructor() const noexcept
Returns the corresponding destructor for this type.
static method get_global_method(string_view name) noexcept
Returns a global method with the name name.
string_view get_name() const noexcept
Returns the unique and human-readable name of the type.
bool is_member_function_pointer() const noexcept
Returns true whether the given type represents a pointer to a member function.
bool is_pointer() const noexcept
Returns true whether the given type represents a pointer.
static array_range< method > get_global_methods() noexcept
Returns a range of all registered global methods.
array_range< type > get_template_arguments() const noexcept
Returns a list of type objects that represents the template arguments.
variant get_property_value(string_view name, instance obj) const
Returns the property value of property named name from the instance obj.
bool destroy(variant &obj) const noexcept
Destroys the contained object in the variant obj.
bool is_class() const noexcept
Returns true whether the given type is class; that is not an atomic type or a method.
static array_range< type > get_types() noexcept
Returns a range of all registered type objects.
static void register_comparators()
Register comparison operators for template type T.
method get_method(string_view name) const noexcept
Returns a method with the name name.
array_range< type > get_derived_classes() const noexcept
Returns a range of all derived classes of this type.
type get_raw_type() const noexcept
Returns a type object which represent the raw type.
static void register_less_than_comparator()
Register the less than comparison operators for template type T.
bool is_valid() const noexcept
Returns true if this type is valid, that means the type holds valid data to a type.
bool is_enumeration() const noexcept
Returns true whether the given type represents an enumeration.
bool operator==(const type &other) const noexcept
Compares this type with the other type and returns true if both describe the same type,...
friend Target_Type rttr_cast(Source_Type object) noexcept
Casts the given object of type Source_Type to an object of type Target_Type.
array_range< property > get_properties() const noexcept
Returns a range of all registered public properties for this type and all its base classes.
bool operator!=(const type &other) const noexcept
Compares this type with the other type and returns true if both describe different types,...
static type get_by_name(string_view name) noexcept
Returns the type object with the given name name.
array_range< method > get_methods() const noexcept
Returns a range of all registered public methods for this type and all its base classes.
static void register_wrapper_converter_for_base_classes()
Register for all base classes of the giving type T wrapper converter functions.
static void register_converter_func(F func)
Register a converter func F, which will be used internally by the variant class to convert between ty...
bool is_sequential_container() const noexcept
Returns true whether the given type represents an sequence container.
bool is_array() const noexcept
Returns true whether the given type represents an array.
array_range< type > get_base_classes() const noexcept
Returns a range of all base classes of this type.
bool operator>(const type &other) const noexcept
Comparison operator for sorting the type data according to some internal criterion.
bool is_associative_container() const noexcept
Returns true whether the given type represents an associative container.
bool is_function_pointer() const noexcept
Returns true whether the given type represents a pointer to a function e.g.
bool operator<=(const type &other) const noexcept
Comparison operator for sorting the type data according to some internal criterion.
type get_wrapped_type() const noexcept
Returns a type object which represent the wrapped type.
static property get_global_property(string_view name) noexcept
Returns a global property with the name name.
array_range< constructor > get_constructors() const noexcept
Returns a range of all registered public constructors for this type.
bool operator<(const type &other) const noexcept
Comparison operator for sorting the type data according to some internal criterion.
bool is_base_of(const type &other) const noexcept
Returns true if this type is the base class from the given type other, otherwise false.
enumeration get_enumeration() const noexcept
Returns the enumerator if this type is an enum type; otherwise the returned value is not valid.
std::size_t get_sizeof() const noexcept
Returns the size in bytes of the object representation of the current type (i.e.
bool is_arithmetic() const noexcept
Returns true whether the given type represents an arithmetic type.
bool is_member_object_pointer() const noexcept
Returns true whether the given type represents a pointer to a member object.
bool is_derived_from(const type &other) const noexcept
Returns true if this type is derived from the given type other, otherwise false.
variant create(std::vector< argument > args=std::vector< argument >()) const
Creates an instance of the current type, with the given arguments args for the constructor.
bool operator>=(const type &other) const noexcept
Comparison operator for sorting the type data according to some internal criterion.
constructor get_constructor(const std::vector< type > ¶ms=std::vector< type >()) const noexcept
Returns a public constructor whose parameters match the types in the specified list.
property get_property(string_view name) const noexcept
Returns a property with the name name.
static array_range< property > get_global_properties() noexcept
Returns a range of all registered global properties.
variant get_metadata(const variant &key) const
Returns the meta data for the given key key.
bool is_wrapper() const noexcept
Returns true whether the given type represents a wrapper type.
bool set_property_value(string_view name, instance obj, argument arg) const
This function will set the given value arg to a property named name to the instance obj.
static void register_equal_comparator()
Register the equal comparison operators for template type T.
variant invoke(string_view name, instance obj, std::vector< argument > args) const
Invokes the method represented by the current instance object.
The variant class allows to store data of any type and convert between these types transparently.
Definition variant.h:198
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.
basic_string_view< char > string_view
A class to hold a reference to a continuous sequence of char objects.
Definition string_view.h:493
Generated on Fri Feb 23 2024 11:50:43 for rttr - 0.9.6 by doxygen.