CppDelegate::FastDelegate4< Param1, Param2, Param3, Param4, RetType > Class Template Reference

#include <Delegate.h>

List of all members.

Public Types

typedef FastDelegate4 type

Public Member Functions

 FastDelegate4 ()
 FastDelegate4 (const FastDelegate4 &x)
void operator= (const FastDelegate4 &x)
bool operator== (const FastDelegate4 &x) const
bool operator!= (const FastDelegate4 &x) const
bool operator< (const FastDelegate4 &x) const
bool operator> (const FastDelegate4 &x) const
template<class X, class Y>
 FastDelegate4 (Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4))
template<class X, class Y>
void Bind (Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4))
template<class X, class Y>
 FastDelegate4 (const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4) const)
template<class X, class Y>
void Bind (const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4) const)
 FastDelegate4 (DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4))
void operator= (DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4))
void Bind (DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4))
RetType operator() (Param1 p1, Param2 p2, Param3 p3, Param4 p4) 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, Param3 p3, Param4 p4)
typedef RetType(*) UnvoidStaticFunctionPtr (Param1 p1, Param2 p2, Param3 p3, Param4 p4)
typedef RetType(Internal::GenericClass::*) GenericMemFn (Param1 p1, Param2 p2, Param3 p3, Param4 p4)
typedef Internal::ClosurePtr<
GenericMemFn, StaticFunctionPtr,
UnvoidStaticFunctionPtr
ClosureType
typedef CppDelegate::FastDelegate4::SafeBoolStruct UselessTypedef
typedef StaticFunctionPtr
SafeBoolStruct::* 
unspecified_bool_type

Private Member Functions

RetType InvokeStaticFunction (Param1 p1, Param2 p2, Param3 p3, Param4 p4) const

Private Attributes

ClosureType m_Closure

Classes

struct  SafeBoolStruct


Detailed Description

template<class Param1, class Param2, class Param3, class Param4, class RetType = Internal::DefaultVoid>
class CppDelegate::FastDelegate4< Param1, Param2, Param3, Param4, RetType >

Definition at line 1084 of file Delegate.h.


Member Typedef Documentation

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

Definition at line 1086 of file Delegate.h.

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

Definition at line 1087 of file Delegate.h.

template<class Param1, class Param2, class Param3, class Param4, class RetType = Internal::DefaultVoid>
typedef RetType(*) CppDelegate::FastDelegate4< Param1, Param2, Param3, Param4, RetType >::UnvoidStaticFunctionPtr(Param1 p1, Param2 p2, Param3 p3, Param4 p4) [private]

Definition at line 1088 of file Delegate.h.

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

Definition at line 1089 of file Delegate.h.

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

Definition at line 1090 of file Delegate.h.

template<class Param1, class Param2, class Param3, class Param4, class RetType = Internal::DefaultVoid>
typedef FastDelegate4 CppDelegate::FastDelegate4< Param1, Param2, Param3, Param4, RetType >::type

Definition at line 1094 of file Delegate.h.

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

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

Definition at line 1143 of file Delegate.h.


Constructor & Destructor Documentation

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

Definition at line 1097 of file Delegate.h.

01097 { Clear(); }

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

Definition at line 1098 of file Delegate.h.

01098                                               {
01099                 m_Closure.CopyFrom(this, x.m_Closure); }

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

Definition at line 1112 of file Delegate.h.

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

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

Definition at line 1119 of file Delegate.h.

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

template<class Param1, class Param2, class Param3, class Param4, class RetType = Internal::DefaultVoid>
CppDelegate::FastDelegate4< Param1, Param2, Param3, Param4, RetType >::FastDelegate4 ( DesiredRetType(*)(Param1 p1, Param2 p2, Param3 p3, Param4 p4)  function_to_bind  )  [inline]

Definition at line 1126 of file Delegate.h.

01126                                                                                                        {
01127                 Bind(function_to_bind); }


Member Function Documentation

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

Definition at line 1100 of file Delegate.h.

01100                                                   {
01101                 m_Closure.CopyFrom(this, x.m_Closure); }

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

Definition at line 1102 of file Delegate.h.

01102                                                        {
01103                 return m_Closure.IsEqual(x.m_Closure);  }

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

Definition at line 1104 of file Delegate.h.

01104                                                        {
01105                 return !m_Closure.IsEqual(x.m_Closure); }

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

Definition at line 1106 of file Delegate.h.

01106                                                       {
01107                 return m_Closure.IsLess(x.m_Closure);   }

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

Definition at line 1108 of file Delegate.h.

01108                                                       {
01109                 return x.m_Closure.IsLess(m_Closure);   }

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

Definition at line 1115 of file Delegate.h.

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

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

Definition at line 1122 of file Delegate.h.

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

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

Definition at line 1129 of file Delegate.h.

01129                                                                                                           {
01130                 Bind(function_to_bind); }

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

Definition at line 1131 of file Delegate.h.

01131                                                                                                          {
01132                 m_Closure.bindstaticfunc(this, &FastDelegate4::InvokeStaticFunction, 
01133                         function_to_bind); }

template<class Param1, class Param2, class Param3, class Param4, class RetType = Internal::DefaultVoid>
RetType CppDelegate::FastDelegate4< Param1, Param2, Param3, Param4, RetType >::operator() ( Param1  p1,
Param2  p2,
Param3  p3,
Param4  p4 
) const [inline]

Definition at line 1135 of file Delegate.h.

01135                                                                               {
01136         return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(p1, p2, p3, p4); }

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

Definition at line 1145 of file Delegate.h.

01145                                                {
01146         return IsEmpty()? 0: &SafeBoolStruct::m_nonzero;
01147     }

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

Definition at line 1149 of file Delegate.h.

01149                                                           {
01150                 return m_Closure.IsEqualToStaticFuncPtr(funcptr);       }

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

Definition at line 1151 of file Delegate.h.

01151                                                           { 
01152                 return !m_Closure.IsEqualToStaticFuncPtr(funcptr);    }

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

Definition at line 1153 of file Delegate.h.

01153                                         {       // Is it bound to anything?
01154                         return !m_Closure; }

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

Definition at line 1155 of file Delegate.h.

01155                                         {
01156                         return !m_Closure; }

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

Definition at line 1157 of file Delegate.h.

01157 { m_Closure.Clear();}

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

Definition at line 1160 of file Delegate.h.

01160 { return m_Closure; }

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

Definition at line 1161 of file Delegate.h.

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

template<class Param1, class Param2, class Param3, class Param4, class RetType = Internal::DefaultVoid>
RetType CppDelegate::FastDelegate4< Param1, Param2, Param3, Param4, RetType >::InvokeStaticFunction ( Param1  p1,
Param2  p2,
Param3  p3,
Param4  p4 
) const [inline, private]

Definition at line 1164 of file Delegate.h.

01164                                                                                        {
01165         return (*(m_Closure.GetStaticFunction()))(p1, p2, p3, p4); }


Member Data Documentation

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

Definition at line 1091 of file Delegate.h.


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