CppDelegate::FastDelegate2< Param1, Param2, RetType > Class Template Reference

#include <Delegate.h>

List of all members.

Public Types

typedef FastDelegate2 type

Public Member Functions

 FastDelegate2 ()
 FastDelegate2 (const FastDelegate2 &x)
void operator= (const FastDelegate2 &x)
bool operator== (const FastDelegate2 &x) const
bool operator!= (const FastDelegate2 &x) const
bool operator< (const FastDelegate2 &x) const
bool operator> (const FastDelegate2 &x) const
template<class X, class Y>
 FastDelegate2 (Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2))
template<class X, class Y>
void Bind (Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2))
template<class X, class Y>
 FastDelegate2 (const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2) const)
template<class X, class Y>
void Bind (const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2) const)
 FastDelegate2 (DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2))
void operator= (DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2))
void Bind (DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2))
RetType operator() (Param1 p1, Param2 p2) const
 operator unspecified_bool_type () const
bool operator== (StaticFunctionPtr funcptr)
bool operator!= (StaticFunctionPtr funcptr)
bool operator! () const
bool IsEmpty () const
void Clear ()

Protected Member Functions

const Internal::DelegateMementoGetMemento ()
void SetMemento (const Internal::DelegateMemento &any)

Private Types

typedef Internal::DefaultVoidToVoid<
RetType >::type 
DesiredRetType
typedef DesiredRetType(*) StaticFunctionPtr (Param1 p1, Param2 p2)
typedef RetType(*) UnvoidStaticFunctionPtr (Param1 p1, Param2 p2)
typedef RetType(Internal::GenericClass::*) GenericMemFn (Param1 p1, Param2 p2)
typedef Internal::ClosurePtr<
GenericMemFn, StaticFunctionPtr,
UnvoidStaticFunctionPtr
ClosureType
typedef CppDelegate::FastDelegate2::SafeBoolStruct UselessTypedef
typedef StaticFunctionPtr
SafeBoolStruct::* 
unspecified_bool_type

Private Member Functions

RetType InvokeStaticFunction (Param1 p1, Param2 p2) const

Private Attributes

ClosureType m_Closure

Classes

struct  SafeBoolStruct


Detailed Description

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
class CppDelegate::FastDelegate2< Param1, Param2, RetType >

Definition at line 912 of file Delegate.h.


Member Typedef Documentation

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
typedef Internal::DefaultVoidToVoid<RetType>::type CppDelegate::FastDelegate2< Param1, Param2, RetType >::DesiredRetType [private]

Definition at line 914 of file Delegate.h.

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
typedef DesiredRetType(*) CppDelegate::FastDelegate2< Param1, Param2, RetType >::StaticFunctionPtr(Param1 p1, Param2 p2) [private]

Definition at line 915 of file Delegate.h.

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
typedef RetType(*) CppDelegate::FastDelegate2< Param1, Param2, RetType >::UnvoidStaticFunctionPtr(Param1 p1, Param2 p2) [private]

Definition at line 916 of file Delegate.h.

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
typedef RetType(Internal::GenericClass::*) CppDelegate::FastDelegate2< Param1, Param2, RetType >::GenericMemFn(Param1 p1, Param2 p2) [private]

Definition at line 917 of file Delegate.h.

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
typedef Internal::ClosurePtr<GenericMemFn, StaticFunctionPtr, UnvoidStaticFunctionPtr> CppDelegate::FastDelegate2< Param1, Param2, RetType >::ClosureType [private]

Definition at line 918 of file Delegate.h.

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
typedef FastDelegate2 CppDelegate::FastDelegate2< Param1, Param2, RetType >::type

Definition at line 922 of file Delegate.h.

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
typedef struct CppDelegate::FastDelegate2::SafeBoolStruct CppDelegate::FastDelegate2< Param1, Param2, RetType >::UselessTypedef [private]

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
typedef StaticFunctionPtr SafeBoolStruct::* CppDelegate::FastDelegate2< Param1, Param2, RetType >::unspecified_bool_type [private]

Definition at line 971 of file Delegate.h.


Constructor & Destructor Documentation

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
CppDelegate::FastDelegate2< Param1, Param2, RetType >::FastDelegate2 (  )  [inline]

Definition at line 925 of file Delegate.h.

00925 { Clear(); }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
CppDelegate::FastDelegate2< Param1, Param2, RetType >::FastDelegate2 ( const FastDelegate2< Param1, Param2, RetType > &  x  )  [inline]

Definition at line 926 of file Delegate.h.

00926                                               {
00927                 m_Closure.CopyFrom(this, x.m_Closure); }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
template<class X, class Y>
CppDelegate::FastDelegate2< Param1, Param2, RetType >::FastDelegate2 ( Y *  pthis,
DesiredRetType(X::*)(Param1 p1, Param2 p2)  function_to_bind 
) [inline]

Definition at line 940 of file Delegate.h.

00940                                                                                              {
00941                 m_Closure.bindmemfunc(Internal::implicit_cast<X*>(pthis), function_to_bind); }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
template<class X, class Y>
CppDelegate::FastDelegate2< Param1, Param2, RetType >::FastDelegate2 ( const Y *  pthis,
DesiredRetType(X::*)(Param1 p1, Param2 p2) const   function_to_bind 
) [inline]

Definition at line 947 of file Delegate.h.

00947                                                                                                         {
00948                 m_Closure.bindconstmemfunc(Internal::implicit_cast<const X*>(pthis), function_to_bind); }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
CppDelegate::FastDelegate2< Param1, Param2, RetType >::FastDelegate2 ( DesiredRetType(*)(Param1 p1, Param2 p2)  function_to_bind  )  [inline]

Definition at line 954 of file Delegate.h.

00954                                                                                  {
00955                 Bind(function_to_bind); }


Member Function Documentation

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
void CppDelegate::FastDelegate2< Param1, Param2, RetType >::operator= ( const FastDelegate2< Param1, Param2, RetType > &  x  )  [inline]

Definition at line 928 of file Delegate.h.

00928                                                   {
00929                 m_Closure.CopyFrom(this, x.m_Closure); }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
bool CppDelegate::FastDelegate2< Param1, Param2, RetType >::operator== ( const FastDelegate2< Param1, Param2, RetType > &  x  )  const [inline]

Definition at line 930 of file Delegate.h.

00930                                                        {
00931                 return m_Closure.IsEqual(x.m_Closure);  }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
bool CppDelegate::FastDelegate2< Param1, Param2, RetType >::operator!= ( const FastDelegate2< Param1, Param2, RetType > &  x  )  const [inline]

Definition at line 932 of file Delegate.h.

00932                                                        {
00933                 return !m_Closure.IsEqual(x.m_Closure); }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
bool CppDelegate::FastDelegate2< Param1, Param2, RetType >::operator< ( const FastDelegate2< Param1, Param2, RetType > &  x  )  const [inline]

Definition at line 934 of file Delegate.h.

00934                                                       {
00935                 return m_Closure.IsLess(x.m_Closure);   }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
bool CppDelegate::FastDelegate2< Param1, Param2, RetType >::operator> ( const FastDelegate2< Param1, Param2, RetType > &  x  )  const [inline]

Definition at line 936 of file Delegate.h.

00936                                                       {
00937                 return x.m_Closure.IsLess(m_Closure);   }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
template<class X, class Y>
void CppDelegate::FastDelegate2< Param1, Param2, RetType >::Bind ( Y *  pthis,
DesiredRetType(X::*)(Param1 p1, Param2 p2)  function_to_bind 
) [inline]

Definition at line 943 of file Delegate.h.

00943                                                                                                {
00944                 m_Closure.bindmemfunc(Internal::implicit_cast<X*>(pthis), function_to_bind);    }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
template<class X, class Y>
void CppDelegate::FastDelegate2< Param1, Param2, RetType >::Bind ( const Y *  pthis,
DesiredRetType(X::*)(Param1 p1, Param2 p2) const   function_to_bind 
) [inline]

Definition at line 950 of file Delegate.h.

00950                                                                                                            {
00951                 m_Closure.bindconstmemfunc(Internal::implicit_cast<const X *>(pthis), function_to_bind);        }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
void CppDelegate::FastDelegate2< Param1, Param2, RetType >::operator= ( DesiredRetType(*)(Param1 p1, Param2 p2)  function_to_bind  )  [inline]

Definition at line 957 of file Delegate.h.

00957                                                                                     {
00958                 Bind(function_to_bind); }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
void CppDelegate::FastDelegate2< Param1, Param2, RetType >::Bind ( DesiredRetType(*)(Param1 p1, Param2 p2)  function_to_bind  )  [inline]

Definition at line 959 of file Delegate.h.

00959                                                                                    {
00960                 m_Closure.bindstaticfunc(this, &FastDelegate2::InvokeStaticFunction, 
00961                         function_to_bind); }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
RetType CppDelegate::FastDelegate2< Param1, Param2, RetType >::operator() ( Param1  p1,
Param2  p2 
) const [inline]

Definition at line 963 of file Delegate.h.

00963                                                         {
00964         return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(p1, p2); }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
CppDelegate::FastDelegate2< Param1, Param2, RetType >::operator unspecified_bool_type (  )  const [inline]

Definition at line 973 of file Delegate.h.

00973                                                {
00974         return IsEmpty()? 0: &SafeBoolStruct::m_nonzero;
00975     }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
bool CppDelegate::FastDelegate2< Param1, Param2, RetType >::operator== ( StaticFunctionPtr  funcptr  )  [inline]

Definition at line 977 of file Delegate.h.

00977                                                           {
00978                 return m_Closure.IsEqualToStaticFuncPtr(funcptr);       }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
bool CppDelegate::FastDelegate2< Param1, Param2, RetType >::operator!= ( StaticFunctionPtr  funcptr  )  [inline]

Definition at line 979 of file Delegate.h.

00979                                                           { 
00980                 return !m_Closure.IsEqualToStaticFuncPtr(funcptr);    }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
bool CppDelegate::FastDelegate2< Param1, Param2, RetType >::operator! (  )  const [inline]

Definition at line 981 of file Delegate.h.

00981                                         {       // Is it bound to anything?
00982                         return !m_Closure; }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
bool CppDelegate::FastDelegate2< Param1, Param2, RetType >::IsEmpty (  )  const [inline]

Definition at line 983 of file Delegate.h.

00983                                         {
00984                         return !m_Closure; }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
void CppDelegate::FastDelegate2< Param1, Param2, RetType >::Clear (  )  [inline]

Definition at line 985 of file Delegate.h.

00985 { m_Closure.Clear();}

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
const Internal::DelegateMemento& CppDelegate::FastDelegate2< Param1, Param2, RetType >::GetMemento (  )  [inline, protected]

Definition at line 988 of file Delegate.h.

00988 { return m_Closure; }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
void CppDelegate::FastDelegate2< Param1, Param2, RetType >::SetMemento ( const Internal::DelegateMemento any  )  [inline, protected]

Definition at line 989 of file Delegate.h.

00989 { m_Closure.CopyFrom(this, any); }

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
RetType CppDelegate::FastDelegate2< Param1, Param2, RetType >::InvokeStaticFunction ( Param1  p1,
Param2  p2 
) const [inline, private]

Definition at line 992 of file Delegate.h.

00992                                                                  {
00993         return (*(m_Closure.GetStaticFunction()))(p1, p2); }


Member Data Documentation

template<class Param1, class Param2, class RetType = Internal::DefaultVoid>
ClosureType CppDelegate::FastDelegate2< Param1, Param2, RetType >::m_Closure [private]

Definition at line 919 of file Delegate.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 15 23:41:48 2007 for AVR C++ Lib (common) by  doxygen 1.5.2
SourceForge.net Logo MTÜ TTÜ Robotiklubi