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.

Synopsis

Declared in <bdlf_memfn.h>

template<
    class PROTOTYPE,
    class INSTANCE>
class MemFnInstance;

Type Aliases

Name

Description

Args

Args is an alias for the list of arguments passed to an invocation of this member function wrapper, expressed as a bslmf_Typelist.

Deref

Dereference helper for the bound object type.

ObjectType

ObjectType is an alias for the class type to which the member function that is wrapped belongs.

ProtoType

ProtoType is an alias for the parameterized PROTOTYPE passed as a template argument to this wrapper.

Prototype

ProtoType is an alias for the parameterized PROTOTYPE passed as a template argument to this wrapper.

ResultType

ResultType is an alias for the type of the object returned by an invocation of this member function wrapper.

Member Functions

Name

Description

MemFnInstance [constructor]

Constructors

~MemFnInstance [destructor]

Destroy this object.

operator=

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.

operator()

Function call operators

Created with MrDocs