Wrapper that invokes a member function pointer like a free function.

Synopsis

Declared in <bdlf_memfn.h>

template<class PROTOTYPE>
class MemFn;

Description

This class encapsulates a member function pointer having the parameterized PROTOTYPE, such that the member function pointer can be invoked in syntactically the same manner as a free function pointer. When invoking a member function through this wrapper, the first argument must be a pointer or reference to the instance on which to invoke the member function pointer. Zero to fourteen additional arguments may be specified depending on PROTOTYPE.

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.

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

MemFn [constructor]

Constructors

operator()

Function call operators

Created with MrDocs