Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions

bdlf::MemFnInstance< PROTOTYPE, INSTANCE > Class Template Reference

#include <bdlf_memfn.h>

List of all members.

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 ()
MemFnInstanceoperator= (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

Detailed Description

template<class PROTOTYPE, class INSTANCE>
class bdlf::MemFnInstance< PROTOTYPE, INSTANCE >

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.

See Component bdlf_memfn


Member Typedef Documentation

template<class PROTOTYPE, class INSTANCE>
typedef Traits::ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::ResultType
template<class PROTOTYPE, class INSTANCE>
typedef Traits::ArgumentList bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::Args
template<class PROTOTYPE, class INSTANCE>
typedef Traits::ClassType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::ObjectType
template<class PROTOTYPE, class INSTANCE>
typedef PROTOTYPE bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::Prototype
template<class PROTOTYPE, class INSTANCE>
typedef PROTOTYPE bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::ProtoType
template<class PROTOTYPE, class INSTANCE>
typedef MemFn_Dereference<ObjectType> bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::Deref

Constructor & Destructor Documentation

template<class PROTOTYPE, class INSTANCE>
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.

template<class PROTOTYPE, class INSTANCE>
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.

template<class PROTOTYPE, class INSTANCE>
bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::~MemFnInstance (  ) 

Destroy this object.


Member Function Documentation

template<class PROTOTYPE, class INSTANCE>
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.

template<class PROTOTYPE, class INSTANCE>
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() (  )  const
template<class PROTOTYPE, class INSTANCE>
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() ( ARG1  arg1  )  const
template<class PROTOTYPE, class INSTANCE>
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() ( ARG1  arg1,
ARG2  arg2 
) const
template<class PROTOTYPE, class INSTANCE>
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() ( ARG1  arg1,
ARG2  arg2,
ARG3  arg3 
) const
template<class PROTOTYPE, class INSTANCE>
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() ( ARG1  arg1,
ARG2  arg2,
ARG3  arg3,
ARG4  arg4 
) const
template<class PROTOTYPE, class INSTANCE>
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() ( ARG1  arg1,
ARG2  arg2,
ARG3  arg3,
ARG4  arg4,
ARG5  arg5 
) const
template<class PROTOTYPE, class INSTANCE>
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() ( ARG1  arg1,
ARG2  arg2,
ARG3  arg3,
ARG4  arg4,
ARG5  arg5,
ARG6  arg6 
) const
template<class PROTOTYPE, class INSTANCE>
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() ( ARG1  arg1,
ARG2  arg2,
ARG3  arg3,
ARG4  arg4,
ARG5  arg5,
ARG6  arg6,
ARG7  arg7 
) const
template<class PROTOTYPE, class INSTANCE>
ResultType bdlf::MemFnInstance< PROTOTYPE, INSTANCE >::operator() ( ARG1  arg1,
ARG2  arg2,
ARG3  arg3,
ARG4  arg4,
ARG5  arg5,
ARG6  arg6,
ARG7  arg7,
ARG8  arg8 
) const
template<class PROTOTYPE, class INSTANCE>
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
template<class PROTOTYPE, class INSTANCE>
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
template<class PROTOTYPE, class INSTANCE>
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
template<class PROTOTYPE, class INSTANCE>
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
template<class PROTOTYPE, class INSTANCE>
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
template<class PROTOTYPE, class INSTANCE>
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.


The documentation for this class was generated from the following file: