pixled-lib
1.0
|
#include <function.h>
Public Types | |
typedef R | Type |
Public Member Functions | |
FctWrapper (const base::Function< R > &fct) | |
FctWrapper (R value) | |
FctWrapper (const FctWrapper< R > &other) | |
FctWrapper (FctWrapper< R > &&other) | |
FctWrapper & | operator= (const FctWrapper< R > &other) |
FctWrapper & | operator= (FctWrapper< R > &&other) |
const base::Function< R > & | operator* () const |
const base::Function< R > & | get () const |
~FctWrapper () | |
A smart pointer used to manage dynamically allocated virtual base::Function instances.
R | function return type |
typedef R pixled::FctWrapper< R >::Type |
Function return type.
|
inline |
Initializes this wrapper with a copy of the input function.
Doing so, this FctWrapper automatically takes the ownership of a dynamically allocated copy of fct
, that does not need to be dynamically allocated and that can be safely destroyed once this FctWrapper has been initialized.
fct | function to wrap |
|
inline |
Initializes this FctWrapper with a Constant value
.
value | value of the Constant |
|
inline |
FctWrapper copy constructor.
This FctWrapper is initialized with a copy of the wrapped function of other
, that is left unchanged.
other | FctWrapper to copy from |
|
inline |
FctWrapper move constructor.
This FctWrapper is initialized with the wrapped function of other
, that is left dangling.
other | FctWrapper to move from |
|
inline |
FctWrapper destructor.
If this FctWrapper is not dangling, the internal function is destroyed.
|
inline |
FctWrapper copy assignment.
If this FctWrapper is not dangling, the internal function is destroyed.
Then, the internal function is replaced with a copy of the wrapped function of other, that is left unchanged.
other | FctWrapper to copy from |
|
inline |
FctWrapper move assignment.
If this FctWrapper is not dangling, the internal function is destroyed.
Then, the internal function is replaced with the the wrapped function of other, that is left dangling.
other | FctWrapper to move from |
|
inline |
Indirection operator.
Returns a reference to the wrapped function.
|
inline |
Gets a reference to the wrapped function.