Webmaster  |  Imprint 
Platinum
Platinum C++ Framework
Main  |  License  |  Documentation  |  Download  |  Support 

Method Class Template Reference

Adapter for class methods. More...

#include <Pt/Method.h>

Inheritance diagram for Method:

Callable Invokable

List of all members.

Public Types

typedef R(ClassT::* MemFuncT )(ARGUMENTS)
 The wrapped member function signature.

Public Member Functions

 Method (ClassT &object, MemFuncT ptr)
 Wraps the given object/member pair.
ClassT & object ()
 Returns a reference to this object's wrapped ClassT object.
const ClassT & object () const
 Returns a const reference to the wrapped ClassT object.
const MemFuncTmethod () const
 Returns a reference to the wrapped member function.
operator() (ARGUMENTS0) const
Method< R, ClassT, ARGUMENTS > * clone () const
 Returns a copy of this instance.
bool operator== (const Method &rhs) const
 Returns true if both use the same object and function pointer.


Detailed Description

template<typename R, class ClassT, typename ARGUMENTS>
class Pt::Method< R, ClassT, ARGUMENTS >

The Method class wraps member functions as Callable objects so that they can be used with the signals/slots framework. There are partial specializations of this class template for up to ten arguments.

Member Function Documentation

Method<R, ClassT, ARGUMENTS>* clone (  )  const [virtual]

A copy of the instance is created with new is returned. Ownership is transfered to the caller, who has to delete it.

Implements Callable.

Copyright © 2003-2007 The Pt Development Team
Pt 1.0