SourcePro® 2023.1 |
SourcePro® API Reference Guide |
A generic function object. More...
#include <rw/functor/RWTFunctor.h>
Public Member Functions | |
RWTFunctor () | |
RWTFunctor (RWStaticCtor) | |
RWTFunctor (const RWTFunctor< R(As...)> &other) | |
template<typename C > | |
RWTFunctor (C callable) | |
R | operator() (As &&...a) const |
RWTFunctor< R(As...)> & | operator= (const RWTFunctor< R(As...)> &other) |
template<typename C > | |
RWTFunctor< R(As...)> & | operator= (C callable) |
RWTFunctor represents a generic function object that can be called with As
... parameters and returns R
.
RWTFunctor< R(As...)>::RWTFunctor | ( | ) |
Constructs an invalid function object. Self will need to be associated with a function or function object before it can be invoked.
RWTFunctor< R(As...)>::RWTFunctor | ( | RWStaticCtor | ) |
Constructs an invalid function object. This constructor assumes the object is constructed with static storage duration and does not explicitly initialize any of its members.
RWTFunctor< R(As...)>::RWTFunctor | ( | const RWTFunctor< R(As...)> & | other | ) |
Copy constructor. Binds self to the functor body instance of other.
RWTFunctor< R(As...)>::RWTFunctor | ( | C | callable | ) |
Constructs a function object associated with callable. When operator() is invoked, callable will be called.
R RWTFunctor< R(As...)>::operator() | ( | As &&... | a | ) | const |
Invokes the callable associated with self, passing parameters a and returning the result. If the underlying callable has not been set, throws RWTHRInvalidPointer.
RWTFunctor<R(As...)>& RWTFunctor< R(As...)>::operator= | ( | const RWTFunctor< R(As...)> & | other | ) |
Assignment operator. Binds self to the functor body instance of other.
RWTFunctor<R(As...)>& RWTFunctor< R(As...)>::operator= | ( | C | callable | ) |
Assignment operator. When operator() is invoked, callable will be called.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |