The namespace for all rttr components. More...
Classes | |
class | class_ |
This class is used to register the constructors, properties, methods and enumeration for a certain class ClassType . 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 | enumeration |
The enumeration class provides several meta information about an enum. More... | |
class | metadata |
This class gives access to a constructor of a rttr::type. More... | |
class | method |
The method class provides several meta information about a method and can be invoked. More... | |
class | property |
The property class provides several meta information about a property and gives read/write access to its value. More... | |
class | type |
This 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_array |
The variant_array class is a specialization of a variant, but for array types. More... | |
Typedefs | |
typedef short | int16 |
typedef int | int32 |
typedef char | int8 |
typedef unsigned short | uint16 |
typedef unsigned int | uint32 |
typedef unsigned char | uint8 |
Functions | |
template<typename T > | |
void | constructor_ (std::vector< rttr::metadata > data=std::vector< rttr::metadata >()) |
Register a constructor for a type T. More... | |
template<typename EnumType > | |
void | enumeration_ (std::vector< std::pair< std::string, EnumType > > enum_data, std::vector< rttr::metadata > data=std::vector< rttr::metadata >()) |
Register an enumeration of type EnumType . More... | |
template<typename F > | |
void | method_ (const std::string &name, F function) |
Register a free function. More... | |
template<typename F > | |
void | method_ (const std::string &name, F function, std::vector< rttr::metadata > data) |
Register a free function. More... | |
template<typename F , typename Policy > | |
void | method_ (const std::string &name, F function, const Policy &policy) |
Register a free function. More... | |
template<typename F , typename Policy > | |
void | method_ (const std::string &name, F function, std::vector< rttr::metadata > data, const Policy &policy) |
Register a free function. More... | |
template<typename A > | |
void | property_ (const std::string &name, A acc) |
Register a property with read and write access. More... | |
template<typename A > | |
void | property_ (const std::string &name, A acc, std::vector< rttr::metadata > data) |
Register a property with read and write access. More... | |
template<typename A , typename Policy > | |
void | property_ (const std::string &name, A acc, const Policy &policy,) |
Register a property with read and write access. More... | |
template<typename A , typename Policy > | |
void | property_ (const std::string &name, A acc, std::vector< rttr::metadata > data, const Policy &policy) |
Register a property with read and write access. More... | |
template<typename A1 , typename A2 > | |
void | property_ (const std::string &name, A1 getter, A2 setter,) |
Register a property with read and write access. More... | |
template<typename A1 , typename A2 > | |
void | property_ (const std::string &name, A1 getter, A2 setter, std::vector< rttr::metadata > data) |
Register a property with read and write access. More... | |
template<typename A1 , typename A2 , typename Policy > | |
void | property_ (const std::string &name, A1 getter, A2 setter, const Policy &policy) |
Register a property with read and write access. More... | |
template<typename A1 , typename A2 , typename Policy > | |
void | property_ (const std::string &name, A1 getter, A2 setter,) |
Register a property with read and write access. More... | |
template<typename A > | |
void | property_readonly_ (const std::string &name, A acc) |
Register a property with read only access. More... | |
template<typename A > | |
void | property_readonly_ (const std::string &name, A acc, std::vector< rttr::metadata > data) |
Register a property with read only access. More... | |
template<typename A , typename Policy > | |
void | property_readonly_ (const std::string &name, A acc, const Policy &policy) |
Register a property with read only access. More... | |
template<typename A , typename Policy > | |
void | property_readonly_ (const std::string &name, A acc, std::vector< rttr::metadata > data, const Policy &policy) |
Register a property with read only access. More... | |
template<typename TargetType , typename SourceType > | |
TargetType | rttr_cast (SourceType object) |
Casts the given object of type SourceType to an object of type TargetType . More... | |
Variables | |
RTTR_API detail::bind_property_as_ptr_policy | bind_property_as_ptr |
RTTR_API detail::discard_return_value_policy | discard_return_value |
RTTR_API detail::return_reference_as_ptr_policy | return_reference_as_ptr |
The namespace for all rttr components.
typedef short rttr::int16 |
typedef int rttr::int32 |
typedef char rttr::int8 |
typedef unsigned short rttr::uint16 |
typedef unsigned int rttr::uint32 |
typedef unsigned char rttr::uint8 |
void rttr::constructor_ | ( | std::vector< rttr::metadata > | data = std::vector< rttr::metadata >() | ) |
Register a constructor for a type T.
data | Additional meta data. |
void rttr::enumeration_ | ( | std::vector< std::pair< std::string, EnumType > > | enum_data, |
std::vector< rttr::metadata > | data = std::vector< rttr::metadata >() |
||
) |
Register an enumeration of type EnumType
.
enum_data | The name of the property. |
data | Additional meta data. |
void rttr::method_ | ( | const std::string & | name, |
F | function | ||
) |
Register a free function.
name | The name of the method. |
function | The function accessor to this method; this can be a member function, a function or a std::function. |
void rttr::method_ | ( | const std::string & | name, |
F | function, | ||
std::vector< rttr::metadata > | data | ||
) |
Register a free function.
name | The name of the method. |
function | The function accessor to this method; this can be a member function, a function or a std::function. |
data | Additional meta data. |
void rttr::method_ | ( | const std::string & | name, |
F | function, | ||
const Policy & | policy | ||
) |
Register a free function.
name | The name of the method. |
function | The function accessor to this method; this can be a member function, a function or a std::function. |
policy | The policies parameter describes how the method should be binded to the type system. |
void rttr::method_ | ( | const std::string & | name, |
F | function, | ||
std::vector< rttr::metadata > | data, | ||
const Policy & | policy | ||
) |
Register a free function.
name | The name of the method. |
function | The function accessor to this method; this can be a member function, a function or a std::function. |
data | Additional meta data. |
policy | The policies parameter describes how the method should be binded to the type system. |
void rttr::property_ | ( | const std::string & | name, |
A | acc | ||
) |
Register a property with read and write access.
name | The name of the property. |
acc | The accessor to the property; a pointer to a variable. |
void rttr::property_ | ( | const std::string & | name, |
A | acc, | ||
std::vector< rttr::metadata > | data | ||
) |
Register a property with read and write access.
name | The name of the property. |
acc | The accessor to the property; a pointer to a variable. |
data | Additional meta data. |
void rttr::property_ | ( | const std::string & | name, |
A | acc, | ||
const Policy & | policy | ||
) |
Register a property with read and write access.
name | The name of the property. |
acc | The accessor to the property; a pointer to a variable. |
policy | The policies parameter describes how the property should be binded to the type system. |
void rttr::property_ | ( | const std::string & | name, |
A | acc, | ||
std::vector< rttr::metadata > | data, | ||
const Policy & | policy | ||
) |
Register a property with read and write access.
name | The name of the property. |
acc | The accessor to the property; a pointer to a variable. |
data | Additional meta data. |
policy | The policies parameter describes how the property should be binded to the type system. |
void rttr::property_ | ( | const std::string & | name, |
A1 | getter, | ||
A2 | setter | ||
) |
Register a property with read and write access.
name | The name of the property. |
getter | The getter accessor to the property; this can be a pointer to a function or a std::function. |
setter | The setter accessor to the property; this can be a pointer to a function or a std::function. |
void rttr::property_ | ( | const std::string & | name, |
A1 | getter, | ||
A2 | setter, | ||
std::vector< rttr::metadata > | data | ||
) |
Register a property with read and write access.
name | The name of the property. |
getter | The getter accessor to the property; this can be a pointer to a function or a std::function. |
setter | The setter accessor to the property; this can be a pointer to a function or a std::function. |
data | Additional meta data. |
void rttr::property_ | ( | const std::string & | name, |
A1 | getter, | ||
A2 | setter, | ||
const Policy & | policy | ||
) |
Register a property with read and write access.
name | The name of the property. |
getter | The getter accessor to the property; this can be a pointer to a function or a std::function. |
setter | The setter accessor to the property; this can be a pointer to a function or a std::function. |
policy | The policies parameter describes how the property should be binded to the type system. |
void rttr::property_ | ( | const std::string & | name, |
A1 | getter, | ||
A2 | setter | ||
) |
Register a property with read and write access.
name | The name of the property. |
getter | The getter accessor to the property; this can be a pointer to a function or a std::function. |
setter | The setter accessor to the property; this can be a pointer to a function or a std::function. |
data | Additional meta data. |
policy | The policies parameter describes how the property should be binded to the type system. |
void rttr::property_readonly_ | ( | const std::string & | name, |
A | acc | ||
) |
Register a property with read only access.
name | The name of the property. |
acc | The accessor to the property; this can be a pointer to a variable, a pointer to a function or a std::function. |
data | Additional meta data. |
void rttr::property_readonly_ | ( | const std::string & | name, |
A | acc, | ||
std::vector< rttr::metadata > | data | ||
) |
Register a property with read only access.
name | The name of the property. |
acc | The accessor to the property; this can be a pointer to a variable, a pointer to a function or a std::function. |
data | Additional meta data. |
void rttr::property_readonly_ | ( | const std::string & | name, |
A | acc, | ||
const Policy & | policy | ||
) |
Register a property with read only access.
name | The name of the property. |
acc | The accessor to the property; this can be a pointer to a variable, a pointer to a function or a std::function. |
policy | The policies parameter describes how the property should be binded to the type system. |
void rttr::property_readonly_ | ( | const std::string & | name, |
A | acc, | ||
std::vector< rttr::metadata > | data, | ||
const Policy & | policy | ||
) |
Register a property with read only access.
name | The name of the property. |
acc | The accessor to the property; this can be a pointer to a variable, a pointer to a function or a std::function. |
data | Additional meta data. |
policy | The policies parameter describes how the property should be binded to the type system. |
TargetType rttr::rttr_cast | ( | SourceType | object | ) |
Casts the given object
of type SourceType
to an object of type TargetType
.
When the given the given object is an instance of type TargetType
, 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.
SourceType
and TargetType
must be both pointer types.TargetType
RTTR_API detail::bind_property_as_ptr_policy rttr::bind_property_as_ptr |
RTTR_API detail::discard_return_value_policy rttr::discard_return_value |
RTTR_API detail::return_reference_as_ptr_policy rttr::return_reference_as_ptr |