iceoryx_hoofs 2.0.3
|
Public Types | |
template<typename T > | |
using | ConstMethodPointer = ReturnValue(T::*)(Args...) const |
Public Member Functions | |
ConstMethodCallback (const ConstMethodCallback &rhs) noexcept=default | |
ConstMethodCallback & | operator= (const ConstMethodCallback &rhs) noexcept=default |
template<typename ClassType > | |
ConstMethodCallback (const ClassType &objectRef, ConstMethodPointer< ClassType > const methodPtr) noexcept | |
Constructs a ConstMethodCallback from a pointer to a specific object and a pointer to a method of that class. More... | |
ConstMethodCallback (ConstMethodCallback &&rhs) noexcept | |
Move constructor. More... | |
ConstMethodCallback & | operator= (ConstMethodCallback &&rhs) noexcept |
Move assignment operator. More... | |
template<typename... MethodArguments> | |
expected< ReturnValue, MethodCallbackError > | operator() (MethodArguments &&... args) const noexcept |
Calls the method if the ConstMethodCallback is valid, otherwise it will return MethodCallbackError::UNINITIALIZED_CALLBACK. More... | |
bool | operator== (const ConstMethodCallback &rhs) const noexcept |
Comparison operator. Two ConstMethodCallbacks are equal if they have the same object pointer and method pointer. | |
bool | operator!= (const ConstMethodCallback &rhs) const noexcept |
Inequality operator. Two ConstMethodCallback are not equal if they have different object or method pointer. | |
operator bool () const noexcept | |
Verifies if the ConstMethodCallback is valid. More... | |
bool | isValid () const noexcept |
Verifies if the ConstMethodCallback is valid. More... | |
template<typename ClassType > | |
void | setCallback (const ClassType &objectRef, ConstMethodPointer< ClassType > methodPtr) noexcept |
Sets a new callback. More... | |
template<typename ClassType > | |
const ClassType * | getObjectPointer () const noexcept |
Returns object pointer. | |
template<typename ClassType > | |
auto | getMethodPointer () const noexcept -> ConstMethodPointer< ClassType > |
Returns cond method pointer. | |
|
noexcept |
Constructs a ConstMethodCallback from a pointer to a specific object and a pointer to a method of that class.
[in] | objectRef | const object reference |
[in] | methodPtr | pointer to a const method |
|
noexcept |
Move constructor.
[in] | rhs | move origin |
|
noexcept |
Verifies if the ConstMethodCallback is valid.
|
explicitnoexcept |
Verifies if the ConstMethodCallback is valid.
|
noexcept |
Calls the method if the ConstMethodCallback is valid, otherwise it will return MethodCallbackError::UNINITIALIZED_CALLBACK.
[in] | args... | arguments which will be perfectly forwarded to the method |
|
noexcept |
Move assignment operator.
[in] | rhs | move origin |
|
noexcept |
Sets a new callback.
[in] | objectRef | const reference to the object |
[in] | methodPtr | pointer to the method |