Classes | |
class | argument |
The argument class is used for forwarding arguments to properties or methods. More... | |
class | array_range |
The array_range class provides a view into an underlying data structure with lower and upper limits. More... | |
struct | associative_container_mapper |
The associative_container_mapper class is a class template to access an associative container via one common interface. More... | |
class | basic_string_view |
The class template basic_string_view describes an non-owning reference to a constant contiguous sequence of char-like objects. More... | |
class | constructor |
The constructor class provides several meta information about a constructor and can be invoked. More... | |
class | destructor |
The destructor class provides a destructor for registered types. More... | |
class | enum_flags |
The enum_flags class template is used to store OR-combinations of enum values in a type-safe way. More... | |
class | enumeration |
The enumeration class provides several meta information about an enum. More... | |
class | instance |
The instance class is used for forwarding the instance of an object to invoke a property or method. More... | |
class | library |
The library class provides a cross platform way of explicit loading shared objects (.so on Unix based system and .DLL on windows). More... | |
class | method |
The method class provides several meta information about a method and can be invoked. More... | |
class | parameter_info |
The parameter_info class provides several meta information about a parameter. More... | |
struct | policy |
The policy class contains all policies that can be used during the registration of reflection information. More... | |
class | property |
The property class provides several meta information about a property and gives read/write access to its value. More... | |
class | registration |
The registration class is the entry point for the manual registration of reflection information to the type system. More... | |
struct | sequential_container_mapper |
The sequential_container_mapper class is a class template to access an associative container via one common interface. More... | |
class | type |
The type class holds the type information for any arbitrary object. More... | |
class | variant |
The variant class allows to store data of any type and convert between these types transparently. More... | |
class | variant_associative_view |
The variant_associative_view describes a class that refers to an associative container (e.g: std::map ) inside a variant. More... | |
class | variant_sequential_view |
The variant_sequential_view describes a class that refers to an sequence container (e.g: std::vector ) inside a variant. More... | |
struct | wrapper_mapper |
The wrapper_mapper class is a class template to access different wrapper types via one common interface. More... | |
Typedefs | |
using | string_view = basic_string_view< char > |
A class to hold a reference to a continuous sequence of char objects. More... | |
Enumerations | |
enum | access_levels { access_levels::public_access, access_levels::protected_access, access_levels::private_access } |
The access_levels enum represents the three access modifiers, which can be used in classes to encapsulate members access. More... | |
enum | filter_item { filter_item::instance_item = 1, filter_item::static_item = 2, filter_item::public_access = 4, filter_item::non_public_access = 8, filter_item::declared_only = 16 } |
The filter_item enum is used to filter the search for certain members in types. More... | |
Functions | |
template<typename... TArgs> | |
detail::default_args< TArgs... > | default_arguments (TArgs &&...args) |
The default_arguments function should be used add default arguments, for constructors or a methods during the registration process of reflection information. More... | |
detail::metadata | metadata (variant key, variant value) |
The metadata function can be used to add additional meta data information during the registration process of reflection information. More... | |
template<typename CharT , typename Traits > | |
constexpr bool | operator!= (basic_string_view< CharT, Traits > lhs, basic_string_view< CharT, Traits > rhs) noexcept |
Compares the two views lhs and rhs . More... | |
template<typename CharT , typename Traits > | |
constexpr bool | operator!= (const char *lhs, basic_string_view< CharT, Traits > rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator!= (basic_string_view< CharT, Traits > lhs, const char *rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator!= (const std::basic_string< CharT, Traits > &lhs, basic_string_view< CharT, Traits > rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator!= (basic_string_view< CharT, Traits > lhs, const std::basic_string< CharT, Traits > &rhs) noexcept |
template<typename CharT , typename Traits > | |
std::basic_string< CharT, Traits > | operator+ (basic_string_view< CharT, Traits > lhs, const std::basic_string< CharT, Traits > &rhs) |
template<typename CharT , typename Traits > | |
std::basic_string< CharT, Traits > | operator+ (const std::basic_string< CharT, Traits > &lhs, basic_string_view< CharT, Traits > rhs) |
template<typename CharT , typename Traits > | |
std::basic_string< CharT, Traits > | operator+ (basic_string_view< CharT, Traits > lhs, std::basic_string< CharT, Traits > &&rhs) |
template<typename CharT , typename Traits > | |
std::basic_string< CharT, Traits > | operator+ (std::basic_string< CharT, Traits > &&lhs, basic_string_view< CharT, Traits > rhs) |
template<typename CharT , typename Traits > | |
constexpr bool | operator< (basic_string_view< CharT, Traits > lhs, basic_string_view< CharT, Traits > rhs) noexcept |
Compares the two views lhs and rhs . More... | |
template<typename CharT , typename Traits > | |
constexpr bool | operator< (const char *lhs, basic_string_view< CharT, Traits > rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator< (basic_string_view< CharT, Traits > lhs, const char *rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator< (const std::basic_string< CharT, Traits > &lhs, basic_string_view< CharT, Traits > rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator< (basic_string_view< CharT, Traits > lhs, const std::basic_string< CharT, Traits > &rhs) noexcept |
template<typename CharT , typename Traits > | |
std::basic_ostream< CharT, Traits > & | operator<< (std::basic_ostream< CharT, Traits > &os, basic_string_view< CharT, Traits > v) |
Performs a stream output on a basic_string_view . More... | |
template<typename CharT , typename Traits > | |
constexpr bool | operator<= (basic_string_view< CharT, Traits > lhs, basic_string_view< CharT, Traits > rhs) noexcept |
Compares the two views lhs and rhs . More... | |
template<typename CharT , typename Traits > | |
constexpr bool | operator<= (const char *lhs, basic_string_view< CharT, Traits > rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator<= (basic_string_view< CharT, Traits > lhs, const char *rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator<= (const std::basic_string< CharT, Traits > &lhs, basic_string_view< CharT, Traits > rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator<= (basic_string_view< CharT, Traits > lhs, const std::basic_string< CharT, Traits > &rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator== (basic_string_view< CharT, Traits > lhs, basic_string_view< CharT, Traits > rhs) noexcept |
Compares the two views lhs and rhs . More... | |
template<typename CharT , typename Traits > | |
constexpr bool | operator== (const char *lhs, basic_string_view< CharT, Traits > rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator== (basic_string_view< CharT, Traits > lhs, const char *rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator== (const std::basic_string< CharT, Traits > &lhs, basic_string_view< CharT, Traits > rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator== (basic_string_view< CharT, Traits > lhs, const std::basic_string< CharT, Traits > &rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator> (basic_string_view< CharT, Traits > lhs, basic_string_view< CharT, Traits > rhs) noexcept |
Compares the two views lhs and rhs . More... | |
template<typename CharT , typename Traits > | |
constexpr bool | operator> (const char *lhs, basic_string_view< CharT, Traits > rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator> (basic_string_view< CharT, Traits > lhs, const char *rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator> (const std::basic_string< CharT, Traits > &lhs, basic_string_view< CharT, Traits > rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator> (basic_string_view< CharT, Traits > lhs, const std::basic_string< CharT, Traits > &rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator>= (basic_string_view< CharT, Traits > lhs, basic_string_view< CharT, Traits > rhs) noexcept |
Compares the two views lhs and rhs . More... | |
template<typename CharT , typename Traits > | |
constexpr bool | operator>= (const char *lhs, basic_string_view< CharT, Traits > rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator>= (basic_string_view< CharT, Traits > lhs, const char *rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator>= (const std::basic_string< CharT, Traits > &lhs, basic_string_view< CharT, Traits > rhs) noexcept |
template<typename CharT , typename Traits > | |
constexpr bool | operator>= (basic_string_view< CharT, Traits > lhs, const std::basic_string< CharT, Traits > &rhs) noexcept |
template<typename... TArgs> | |
detail::parameter_names< detail::decay_t< TArgs >... > | parameter_names (TArgs &&...args) |
The parameter_names function should be used add human-readable names of the parameters, for constructors or a methods during the registration process of reflection information. More... | |
template<typename Target_Type , typename Source_Type > | |
Target_Type | rttr_cast (Source_Type object) noexcept |
Casts the given object of type Source_Type to an object of type Target_Type . More... | |
template<typename ClassType , typename ReturnType , typename... Args> | |
auto | select_const (ReturnType(ClassType::*func)(Args...) const) -> decltype(func) |
This is a helper function to register overloaded const member functions. More... | |
template<typename ClassType , typename ReturnType , typename... Args> | |
auto | select_const (ReturnType(ClassType::*func)(Args...) const noexcept) -> decltype(func) |
Overload with noexcept function type. More... | |
template<typename ClassType , typename ReturnType , typename... Args> | |
auto | select_non_const (ReturnType(ClassType::*func)(Args...)) -> decltype(func) |
This is a helper function to register overloaded const member functions. More... | |
template<typename ClassType , typename ReturnType , typename... Args> | |
auto | select_non_const (ReturnType(ClassType::*func)(Args...) noexcept) -> decltype(func) |
Overload with noexcept function type. More... | |
template<typename Signature > | |
Signature * | select_overload (Signature *func) |
This is a helper function to register overloaded functions. More... | |
template<typename Signature , typename ClassType > | |
auto | select_overload (Signature(ClassType::*func)) -> decltype(func) |
This is a helper function to register overloaded member functions. More... | |
template<typename Enum_Type > | |
detail::enum_data< Enum_Type > | value (string_view, Enum_Type value) |
The value function should be used to add a mapping from enum name to value during the registration process of reflection information. More... | |
template<class T > | |
T | variant_cast (const variant &operand) |
Returns a reference to the containing value as type T . More... | |
template<class T > | |
T | variant_cast (variant &operand) |
Returns a reference to the containing value as type T . More... | |
template<class T > | |
T | variant_cast (variant &&operand) |
Move the containing value from the variant into a type T . More... | |
template<class T > | |
const T * | variant_cast (const variant *operand) noexcept |
Returns a pointer to the containing value with type T . More... | |
template<class T > | |
T * | variant_cast (variant *operand) noexcept |
Returns a pointer to the containing value with type T . More... | |
Typedef Documentation
using rttr::string_view = typedef basic_string_view<char> |
A class to hold a reference to a continuous sequence of char
objects.
Enumeration Type Documentation
|
strong |
The access_levels enum represents the three access modifiers, which can be used in classes to encapsulate members access.
In contrast to the three static type values in the registration class, represents this enum the return value to retrieve the access level at runtime.
|
strong |
The filter_item enum is used to filter the search for certain members in types.
Combine the enum value together with the bitwise OR operator.
- Remarks
- In order to get a return, you must specify filter_item::instance_item or filter_item::static_item along with an accessor filter_item::public_access or filter_item::non_public_access.
Enumerator | |
---|---|
instance_item |
Includes all members in the search, which needs an instance to be invoked. |
static_item |
Includes all static members in the search. Static members doesn't need any instance for invoking. |
public_access |
Includes all public specified members in the search.
|
non_public_access |
Includes all non public (private or protected) members in the search.
|
declared_only |
Returns all members declared for the current type; inherited members are not returned. |
Function Documentation
detail::default_args<TArgs...> rttr::default_arguments | ( | TArgs &&... | args | ) |
The default_arguments function should be used add default arguments, for constructors or a methods during the registration process of reflection information.
Use it in the ()
operator of the returned bind object.
The given arguments must match the signature from the starting position to the right most argument.
See following example code:
The metadata function can be used to add additional meta data information during the registration process of reflection information.
Use it in the ()
operator of the returned bind object.
|
noexcept |
Compares the two views lhs
and rhs
.
Two views are not equal if the size() differ or the characters of lhs
are not equivalent and in the same position in rhs
.
- Returns
true
when both views are not the same, otherwisefalse
.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
std::basic_string<CharT, Traits> rttr::operator+ | ( | basic_string_view< CharT, Traits > | lhs, |
const std::basic_string< CharT, Traits > & | rhs | ||
) |
std::basic_string<CharT, Traits> rttr::operator+ | ( | const std::basic_string< CharT, Traits > & | lhs, |
basic_string_view< CharT, Traits > | rhs | ||
) |
std::basic_string<CharT, Traits> rttr::operator+ | ( | basic_string_view< CharT, Traits > | lhs, |
std::basic_string< CharT, Traits > && | rhs | ||
) |
std::basic_string<CharT, Traits> rttr::operator+ | ( | std::basic_string< CharT, Traits > && | lhs, |
basic_string_view< CharT, Traits > | rhs | ||
) |
|
noexcept |
Compares the two views lhs
and rhs
.
The ordering comparisons is done lexicographically. The comparison is performed by a function equivalent to std::lexicographical_compare
.
- Returns
true
when lhs is smaller thanrhs
, otherwise false.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
std::basic_ostream<CharT, Traits>& rttr::operator<< | ( | std::basic_ostream< CharT, Traits > & | os, |
basic_string_view< CharT, Traits > | v | ||
) |
Performs a stream output on a basic_string_view .
- Returns
- os
|
noexcept |
Compares the two views lhs
and rhs
.
The ordering comparisons is done lexicographically. The comparison is performed by a function equivalent to std::lexicographical_compare
.
- Returns
true
when lhs is smaller or equal torhs
, otherwise false.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Compares the two views lhs
and rhs
.
Two views are equal if both the size() of lhs
and rhs
are equal and each character in lhs
has an equivalent character in rhs
at the same position.
- Returns
true
when both views are the same, otherwisefalse
.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Compares the two views lhs
and rhs
.
The ordering comparisons is done lexicographically. The comparison is performed by a function equivalent to std::lexicographical_compare
.
- Returns
true
when lhs is greater thanrhs
, otherwise false.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Compares the two views lhs
and rhs
.
The ordering comparisons is done lexicographically. The comparison is performed by a function equivalent to std::lexicographical_compare
.
- Returns
true
when lhs is greater or equal torhs
, otherwise false.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
detail::parameter_names<detail::decay_t<TArgs>...> rttr::parameter_names | ( | TArgs &&... | args | ) |
The parameter_names function should be used add human-readable names of the parameters, for constructors or a methods during the registration process of reflection information.
Use it in the ()
operator of the returned bind object.
The names must be provided as string literals (i.e. const char*) arguments.
See following example code:
- See also
- parameter_info
|
noexcept |
Casts the given object
of type Source_Type
to an object of type Target_Type
.
When the given the given object
is an instance of type Target_Type
, then this function will cast the pointer to the TargetType
; otherwise it will return a nullptr
. If object
is already a nullptr
then it will also return a nullptr
.
- Remarks
- Both class types must contain the macro RTTR_ENABLE in the class declaration.
Source_Type
andTarget_Type
must be both pointer types.
- Returns
- A pointer of type
Target_Type
auto rttr::select_const | ( | ReturnType(ClassType::*)(Args...) const | func | ) | -> decltype(func) |
This is a helper function to register overloaded const member functions.
Use it like following:
- Remarks
- The method cannot be used with MSVC x86 compiler, because of the different calling convention for global- and member-functions. As workaround you have to explicitly cast to the member function pointer:
auto rttr::select_const | ( | ReturnType(ClassType::*)(Args...) const noexcept | func | ) | -> decltype(func) |
Overload with noexcept
function type.
- See also
- select_const
auto rttr::select_non_const | ( | ReturnType(ClassType::*)(Args...) | func | ) | -> decltype(func) |
This is a helper function to register overloaded const member functions.
Use it like following:
- Remarks
- The method cannot be used with MSVC x86 compiler, because of the different calling convention for global- and member-functions. As workaround you have to explicitly cast to the member function pointer:
auto rttr::select_non_const | ( | ReturnType(ClassType::*)(Args...) noexcept | func | ) | -> decltype(func) |
Overload with noexcept
function type.
- See also
- select_const
Signature* rttr::select_overload | ( | Signature * | func | ) |
This is a helper function to register overloaded functions.
Use it like following:
- Remarks
- The method cannot be used with MSVC x86 compiler, because of the different calling convention for global- and member-functions. As workaround you have to explicitly cast to the function pointer:
auto rttr::select_overload | ( | Signature ClassType::* | func | ) | -> decltype(func) |
This is a helper function to register overloaded member functions.
Use it like following:
- Remarks
- The method cannot be used with MSVC x86 compiler, because of the different calling convention for global- and member-functions. As workaround you have to explicitly cast to the member function pointer:
detail::enum_data<Enum_Type> rttr::value | ( | string_view | , |
Enum_Type | value | ||
) |
The value function should be used to add a mapping from enum name
to value
during the registration process of reflection information.
Use it in the ()
operator of the returned bind object.
- See also
- registration::enumeration
T rttr::variant_cast | ( | const variant & | operand | ) |
Returns a reference to the containing value as type T
.
- Remarks
- Extracting a value type, which is not stored in the variant, leads to undefined behaviour. No exception or error code will be returned!
T rttr::variant_cast | ( | variant & | operand | ) |
Returns a reference to the containing value as type T
.
- Remarks
- Extracting a value type, which is not stored in the variant, leads to undefined behaviour. No exception or error code will be returned!
T rttr::variant_cast | ( | variant && | operand | ) |
Move the containing value from the variant into a type T
.
- Remarks
- Extracting a value type, which is not stored in the variant, leads to undefined behaviour. No exception or error code will be returned!
|
noexcept |
Returns a pointer to the containing value with type T
.
When the containing value is of type T
, a valid pointer to the type will be returned. Otherwise a nullptr
is returned.
- Returns
- A valid pointer, when the containing type is of type
T
; otherwise anullptr
.
|
noexcept |
Returns a pointer to the containing value with type T
.
When the containing value is of type T
, a valid pointer to the type will be returned. Otherwise a nullptr
is returned.
- Returns
- A valid pointer, when the containing type is of type
T
; otherwise anullptr
.