The destructor class provides a destructor for registered types.
More...
#include <destructor.h>
The destructor class provides a destructor for registered types.
A instance of a destructor class can only be obtained from the type class. See type::get_destructor().
Copying and Assignment
A destructor object is lightweight and can be copied by value. However, each copy will refer to the same underlying destructor.
Typical Usage
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:90
static type get() noexcept
Returns a type object for the given template type T.
static type get_by_name(string_view name) noexcept
Returns the type object with the given name name.
The variant class allows to store data of any type and convert between these types transparently.
Definition variant.h:199
- See also
- method, property, enumeration, constructor and type
◆ get_declaring_type()
type rttr::destructor::get_declaring_type |
( |
| ) |
const |
|
noexcept |
Returns the class that declares this destructor.
- Returns
- Type of the declaring class/struct for this destructor.
◆ get_destructed_type()
type rttr::destructor::get_destructed_type |
( |
| ) |
const |
|
noexcept |
Returns the rttr::type for which this destructor can delete objects.
- Returns
- The type of this destructor.
◆ invoke()
bool rttr::destructor::invoke |
( |
variant & | obj | ) |
const |
|
noexcept |
Destroys the contained object in the variant obj
.
- Returns
- True if the destructor of the object could be invoked, otherwise false.
◆ is_valid()
bool rttr::destructor::is_valid |
( |
| ) |
const |
|
noexcept |
Returns true whether this destructor object is valid; otherwise false.
- Returns
- Returns true when the destructor is valid; otherwise false.
◆ operator bool()
rttr::destructor::operator bool |
( |
| ) |
const |
|
explicitnoexcept |
Convenience function to check if this destructor is valid or not.
- Returns
- True if this destructor is valid, otherwise false.
◆ operator!=()
Returns true if this destructor is the not the same like the other
.
- Returns
- True if both destructors are different, otherwise false.
◆ operator==()
Returns true if this destructor is the same like the other
.
- Returns
- True if both destructors are equal, otherwise false.
The documentation for this class was generated from the following file: