Quick Links: |
#include <bdlf_memfn.h>
Public Types | |
typedef Traits::ResultType | ResultType |
typedef Traits::ArgumentList | Args |
typedef Traits::ClassType | ObjectType |
typedef PROTOTYPE | Prototype |
typedef PROTOTYPE | ProtoType |
typedef MemFn_Dereference < ObjectType > | Deref |
Public Member Functions | |
MemFnInstance (PROTOTYPE func, const INSTANCE &object, bslma::Allocator *basicAllocator=0) | |
MemFnInstance (const MemFnInstance &original, bslma::Allocator *basicAllocator=0) | |
~MemFnInstance () | |
MemFnInstance & | operator= (const MemFnInstance &rhs) |
ResultType | operator() () const |
ResultType | operator() (ARG1 arg1) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2, ARG3 arg3) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4, ARG5 arg5) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4, ARG5 arg5, ARG6 arg6) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4, ARG5 arg5, ARG6 arg6, ARG7 arg7) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4, ARG5 arg5, ARG6 arg6, ARG7 arg7, ARG8 arg8) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4, ARG5 arg5, ARG6 arg6, ARG7 arg7, ARG8 arg8, ARG9 arg9) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4, ARG5 arg5, ARG6 arg6, ARG7 arg7, ARG8 arg8, ARG9 arg9, ARG10 arg10) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4, ARG5 arg5, ARG6 arg6, ARG7 arg7, ARG8 arg8, ARG9 arg9, ARG10 arg10, ARG11 arg11) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4, ARG5 arg5, ARG6 arg6, ARG7 arg7, ARG8 arg8, ARG9 arg9, ARG10 arg10, ARG11 arg11, ARG12 arg12) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4, ARG5 arg5, ARG6 arg6, ARG7 arg7, ARG8 arg8, ARG9 arg9, ARG10 arg10, ARG11 arg11, ARG12 arg12, ARG13 arg13) const |
ResultType | operator() (ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4, ARG5 arg5, ARG6 arg6, ARG7 arg7, ARG8 arg8, ARG9 arg9, ARG10 arg10, ARG11 arg11, ARG12 arg12, ARG13 arg13, ARG14 arg14) const |
This class encapsulates a member function pointer having the parameterized PROTOTYPE
and a value of the parameterized INSTANCE
type, which can be either be the type of object referred to by the PROTOTYPE
, or a pointer to one, such that the member function pointer can be invoked on the wrapped instance in syntactically the same manner as a free function pointer. Zero to fourteen additional arguments may be specified depending on the PROTOTYPE
. Note that whether INSTANCE
is a pointer or an object is determined by whether it has pointer semantics or not (as determined by the bslmf::HasPointerSemantics
type trait). Also note that if INSTANCE
is an object that does not have pointer semantics, PROTOTYPE
must be const-qualified.
typedef Traits::ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::ResultType |
typedef Traits::ArgumentList bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::Args |
typedef Traits::ClassType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::ObjectType |
typedef PROTOTYPE bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::Prototype |
typedef PROTOTYPE bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::ProtoType |
typedef MemFn_Dereference<ObjectType> bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::Deref |
bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::MemFnInstance | ( | PROTOTYPE | func, | |
const INSTANCE & | object, | |||
bslma::Allocator * | basicAllocator = 0 | |||
) |
Create a member function pointer wrapper around the specified func
member function pointer of the parameterized PROTOTYPE
, that is invocable on the specified object
instance of the parameterized INSTANCE
. Optionally specify a basicAllocator
used to supply memory. If basicAllocator
is 0, the currently installed default allocator is used.
bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::MemFnInstance | ( | const MemFnInstance< PROTOTYPE, INSTANCE > & | original, | |
bslma::Allocator * | basicAllocator = 0 | |||
) |
Create a member function pointer wrapper around the same member function and instance pointed to by the specified original
object. Optionally specify a basicAllocator
used to supply memory. If basicAllocator
is 0, the currently installed default allocator is used.
bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::~MemFnInstance | ( | ) |
Destroy this object.
MemFnInstance& bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator= | ( | const MemFnInstance< PROTOTYPE, INSTANCE > & | rhs | ) |
Assign to this member function pointer wrapper the same member function and instance pointed to by the specified rhs
member function pointer wrapper, and return a reference to this modifiable member function pointer wrapper.
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1 | ) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2 | |||
) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2, | |||
ARG3 | arg3 | |||
) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2, | |||
ARG3 | arg3, | |||
ARG4 | arg4 | |||
) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2, | |||
ARG3 | arg3, | |||
ARG4 | arg4, | |||
ARG5 | arg5 | |||
) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2, | |||
ARG3 | arg3, | |||
ARG4 | arg4, | |||
ARG5 | arg5, | |||
ARG6 | arg6 | |||
) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2, | |||
ARG3 | arg3, | |||
ARG4 | arg4, | |||
ARG5 | arg5, | |||
ARG6 | arg6, | |||
ARG7 | arg7 | |||
) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2, | |||
ARG3 | arg3, | |||
ARG4 | arg4, | |||
ARG5 | arg5, | |||
ARG6 | arg6, | |||
ARG7 | arg7, | |||
ARG8 | arg8 | |||
) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2, | |||
ARG3 | arg3, | |||
ARG4 | arg4, | |||
ARG5 | arg5, | |||
ARG6 | arg6, | |||
ARG7 | arg7, | |||
ARG8 | arg8, | |||
ARG9 | arg9 | |||
) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2, | |||
ARG3 | arg3, | |||
ARG4 | arg4, | |||
ARG5 | arg5, | |||
ARG6 | arg6, | |||
ARG7 | arg7, | |||
ARG8 | arg8, | |||
ARG9 | arg9, | |||
ARG10 | arg10 | |||
) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2, | |||
ARG3 | arg3, | |||
ARG4 | arg4, | |||
ARG5 | arg5, | |||
ARG6 | arg6, | |||
ARG7 | arg7, | |||
ARG8 | arg8, | |||
ARG9 | arg9, | |||
ARG10 | arg10, | |||
ARG11 | arg11 | |||
) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2, | |||
ARG3 | arg3, | |||
ARG4 | arg4, | |||
ARG5 | arg5, | |||
ARG6 | arg6, | |||
ARG7 | arg7, | |||
ARG8 | arg8, | |||
ARG9 | arg9, | |||
ARG10 | arg10, | |||
ARG11 | arg11, | |||
ARG12 | arg12 | |||
) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2, | |||
ARG3 | arg3, | |||
ARG4 | arg4, | |||
ARG5 | arg5, | |||
ARG6 | arg6, | |||
ARG7 | arg7, | |||
ARG8 | arg8, | |||
ARG9 | arg9, | |||
ARG10 | arg10, | |||
ARG11 | arg11, | |||
ARG12 | arg12, | |||
ARG13 | arg13 | |||
) | const |
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() | ( | ARG1 | arg1, | |
ARG2 | arg2, | |||
ARG3 | arg3, | |||
ARG4 | arg4, | |||
ARG5 | arg5, | |||
ARG6 | arg6, | |||
ARG7 | arg7, | |||
ARG8 | arg8, | |||
ARG9 | arg9, | |||
ARG10 | arg10, | |||
ARG11 | arg11, | |||
ARG12 | arg12, | |||
ARG13 | arg13, | |||
ARG14 | arg14 | |||
) | const |
Invoke the member function pointer held by this wrapper on the provided object with the specified arg1
up to argN
as arguments, with N
being the number of arguments of the member function, and return the result of this invocation, or void
if this member function pointer does not return a result.