31 #include "rttr/detail/base/core_prerequisites.h"
33 #include <type_traits>
51 template<
typename Target_Type,
typename Source_Type>
52 Target_Type
rttr_cast(Source_Type
object);
57 struct base_class_info;
58 struct type_converter_base;
62 template<
typename T,
typename Enable =
void>
65 static type get_invalid_type();
162 RTTR_INLINE
type(
const type& other);
169 RTTR_INLINE
type& operator=(
const type& other);
176 RTTR_INLINE
bool operator<(
const type& other)
const;
183 RTTR_INLINE
bool operator>(
const type& other)
const;
190 RTTR_INLINE
bool operator>=(
const type& other)
const;
197 RTTR_INLINE
bool operator<=(
const type& other)
const;
205 RTTR_INLINE
bool operator==(
const type& other)
const;
213 RTTR_INLINE
bool operator!=(
const type& other)
const;
223 RTTR_INLINE type_id get_id()
const;
232 std::string get_name()
const;
239 RTTR_INLINE
bool is_valid()
const;
246 RTTR_INLINE
explicit operator bool()
const;
256 type get_raw_type()
const;
278 type get_wrapped_type()
const;
299 static type get(T&& object);
311 static type get_by_name(
const char* name);
320 static std::vector<type> get_types();
327 std::size_t get_sizeof()
const;
334 bool is_class()
const;
341 bool is_enumeration()
const;
370 bool is_wrapper()
const;
379 bool is_array()
const;
387 bool is_pointer()
const;
396 bool is_arithmetic()
const;
404 bool is_function_pointer()
const;
412 bool is_member_object_pointer()
const;
420 bool is_member_function_pointer()
const;
431 bool is_derived_from(
const type& other)
const;
443 bool is_derived_from()
const;
456 std::vector<type> get_base_classes()
const;
468 std::vector<type> get_derived_classes()
const;
492 constructor get_constructor(
const std::vector<type>& params = std::vector<type>() )
const;
499 std::vector<constructor> get_constructors()
const;
509 variant create(std::vector<argument> args = std::vector<argument>())
const;
527 void destroy(
variant& obj)
const;
537 property get_property(
const char* name)
const;
547 std::vector<property> get_properties()
const;
556 static property get_global_property(
const char* name);
567 static std::vector<property> get_global_properties();
584 static variant get_property_value(
const char* name);
593 bool set_property_value(
const char* name,
instance obj,
argument arg)
const;
600 static bool set_property_value(
const char* name,
argument arg);
610 method get_method(
const char* name)
const;
620 method get_method(
const char* name,
const std::vector<type>& params)
const;
630 std::vector<method> get_methods()
const;
639 static method get_global_method(
const char* name);
649 static method get_global_method(
const char* name,
const std::vector<type>& params);
660 static std::vector<method> get_global_methods();
674 variant invoke(
const char* name,
instance obj, std::vector<argument> args)
const;
683 static variant invoke(
const char* name, std::vector<argument> args);
707 static void register_converter_func(F func);
732 static void register_comparators();
746 RTTR_INLINE
type(type_id
id);
756 static void* apply_offset(
void* ptr,
const type& source_type,
const type& target_type);
764 const detail::type_converter_base* get_type_converter(
const type& target_type)
const;
772 std::size_t get_pointer_dimension()
const;
781 type get_raw_array_type()
const;
788 std::string get_full_name()
const;
795 static std::string normalize_orig_name(
const char* name);
801 static void init_globals();
812 template<
typename Target_Type,
typename Source_Type>
813 friend Target_Type
rttr_cast(Source_Type
object);
815 template<
typename T,
typename Enable>
816 friend struct detail::type_getter;
818 friend class detail::type_register;
819 friend type detail::get_invalid_type();
820 friend class detail::type_database;
824 static const type_id m_invalid_id = 0;
829 #include "rttr/detail/type/type_impl.h"
831 #endif // RTTR_TYPE_H_
Definition: access_levels.h:33
The type class holds the type information for any arbitrary object.
Definition: type.h:153
Target_Type rttr_cast(Source_Type object)
Casts the given object of type Source_Type to an object of type Target_Type.
The destructor class provides a destructor for registered types.
Definition: destructor.h:71
The instance class is used for forwarding the instance of an object to invoke a property or method...
Definition: instance.h:46
The enumeration class provides several meta information about an enum.
Definition: enumeration.h:101
The method class provides several meta information about a method and can be invoked.
Definition: method.h:116
uint16_t type_id
Definition: type.h:156
The argument class is used for forwarding arguments to properties or methods.
Definition: argument.h:51
The variant class allows to store data of any type and convert between these types transparently...
Definition: variant.h:192
The constructor class provides several meta information about a constructor and can be invoked...
Definition: constructor.h:85