CppDelegate::FastDelegate0< RetType > Class Template Reference

#include <Delegate.h>

List of all members.

Public Types

typedef FastDelegate0 type

Public Member Functions

 FastDelegate0 ()
 FastDelegate0 (const FastDelegate0 &x)
void operator= (const FastDelegate0 &x)
bool operator== (const FastDelegate0 &x) const
bool operator!= (const FastDelegate0 &x) const
bool operator< (const FastDelegate0 &x) const
bool operator> (const FastDelegate0 &x) const
template<class X, class Y>
 FastDelegate0 (Y *pthis, DesiredRetType(X::*function_to_bind)())
template<class X, class Y>
void Bind (Y *pthis, DesiredRetType(X::*function_to_bind)())
template<class X, class Y>
 FastDelegate0 (const Y *pthis, DesiredRetType(X::*function_to_bind)() const)
template<class X, class Y>
void Bind (const Y *pthis, DesiredRetType(X::*function_to_bind)() const)
 FastDelegate0 (DesiredRetType(*function_to_bind)())
void operator= (DesiredRetType(*function_to_bind)())
void Bind (DesiredRetType(*function_to_bind)())
RetType Invoke () const
RetType operator() () 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 ()
typedef RetType(*) UnvoidStaticFunctionPtr ()
typedef RetType(Internal::GenericClass::*) GenericMemFn ()
typedef Internal::ClosurePtr<
GenericMemFn, StaticFunctionPtr,
UnvoidStaticFunctionPtr
ClosureType
typedef CppDelegate::FastDelegate0::SafeBoolStruct UselessTypedef
typedef StaticFunctionPtr
SafeBoolStruct::* 
unspecified_bool_type

Private Member Functions

RetType InvokeStaticFunction () const

Private Attributes

ClosureType m_Closure

Classes

struct  SafeBoolStruct


Detailed Description

template<class RetType = Internal::DefaultVoid>
class CppDelegate::FastDelegate0< RetType >

Definition at line 738 of file Delegate.h.


Member Typedef Documentation

template<class RetType = Internal::DefaultVoid>
typedef Internal::DefaultVoidToVoid<RetType>::type CppDelegate::FastDelegate0< RetType >::DesiredRetType [private]

Definition at line 740 of file Delegate.h.

template<class RetType = Internal::DefaultVoid>
typedef DesiredRetType(*) CppDelegate::FastDelegate0< RetType >::StaticFunctionPtr() [private]

Definition at line 741 of file Delegate.h.

template<class RetType = Internal::DefaultVoid>
typedef RetType(*) CppDelegate::FastDelegate0< RetType >::UnvoidStaticFunctionPtr() [private]

Definition at line 742 of file Delegate.h.

template<class RetType = Internal::DefaultVoid>
typedef RetType(Internal::GenericClass::*) CppDelegate::FastDelegate0< RetType >::GenericMemFn() [private]

Definition at line 743 of file Delegate.h.

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

Definition at line 744 of file Delegate.h.

template<class RetType = Internal::DefaultVoid>
typedef FastDelegate0 CppDelegate::FastDelegate0< RetType >::type

Definition at line 748 of file Delegate.h.

template<class RetType = Internal::DefaultVoid>
typedef struct CppDelegate::FastDelegate0::SafeBoolStruct CppDelegate::FastDelegate0< RetType >::UselessTypedef [private]

template<class RetType = Internal::DefaultVoid>
typedef StaticFunctionPtr SafeBoolStruct::* CppDelegate::FastDelegate0< RetType >::unspecified_bool_type [private]

Definition at line 799 of file Delegate.h.


Constructor & Destructor Documentation

template<class RetType = Internal::DefaultVoid>
CppDelegate::FastDelegate0< RetType >::FastDelegate0 (  )  [inline]

Definition at line 751 of file Delegate.h.

00751 { Clear(); }

template<class RetType = Internal::DefaultVoid>
CppDelegate::FastDelegate0< RetType >::FastDelegate0 ( const FastDelegate0< RetType > &  x  )  [inline]

Definition at line 752 of file Delegate.h.

00752                                               {
00753                 m_Closure.CopyFrom(this, x.m_Closure); }

template<class RetType = Internal::DefaultVoid>
template<class X, class Y>
CppDelegate::FastDelegate0< RetType >::FastDelegate0 ( Y *  pthis,
DesiredRetType(X::*)()  function_to_bind 
) [inline]

Definition at line 766 of file Delegate.h.

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

template<class RetType = Internal::DefaultVoid>
template<class X, class Y>
CppDelegate::FastDelegate0< RetType >::FastDelegate0 ( const Y *  pthis,
DesiredRetType(X::*)() const   function_to_bind 
) [inline]

Definition at line 773 of file Delegate.h.

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

template<class RetType = Internal::DefaultVoid>
CppDelegate::FastDelegate0< RetType >::FastDelegate0 ( DesiredRetType(*)()  function_to_bind  )  [inline]

Definition at line 780 of file Delegate.h.

00780                                                              {
00781                 Bind(function_to_bind); }


Member Function Documentation

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

Definition at line 754 of file Delegate.h.

00754                                                   {
00755                 m_Closure.CopyFrom(this, x.m_Closure); }

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

Definition at line 756 of file Delegate.h.

00756                                                        {
00757                 return m_Closure.IsEqual(x.m_Closure);  }

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

Definition at line 758 of file Delegate.h.

00758                                                        {
00759                 return !m_Closure.IsEqual(x.m_Closure); }

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

Definition at line 760 of file Delegate.h.

00760                                                       {
00761                 return m_Closure.IsLess(x.m_Closure);   }

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

Definition at line 762 of file Delegate.h.

00762                                                       {
00763                 return x.m_Closure.IsLess(m_Closure);   }

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

Definition at line 769 of file Delegate.h.

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

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

Definition at line 776 of file Delegate.h.

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

template<class RetType = Internal::DefaultVoid>
void CppDelegate::FastDelegate0< RetType >::operator= ( DesiredRetType(*)()  function_to_bind  )  [inline]

Definition at line 783 of file Delegate.h.

00783                                                                 {
00784                 Bind(function_to_bind); }

template<class RetType = Internal::DefaultVoid>
void CppDelegate::FastDelegate0< RetType >::Bind ( DesiredRetType(*)()  function_to_bind  )  [inline]

Definition at line 785 of file Delegate.h.

00785                                                                {
00786                 m_Closure.bindstaticfunc(this, &FastDelegate0::InvokeStaticFunction, 
00787                         function_to_bind); }

template<class RetType = Internal::DefaultVoid>
RetType CppDelegate::FastDelegate0< RetType >::Invoke (  )  const [inline]

Definition at line 789 of file Delegate.h.

00789                                {
00790         return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(); }

template<class RetType = Internal::DefaultVoid>
RetType CppDelegate::FastDelegate0< RetType >::operator() (  )  const [inline]

Definition at line 791 of file Delegate.h.

00791                                            {
00792         return Invoke(); }

template<class RetType = Internal::DefaultVoid>
CppDelegate::FastDelegate0< RetType >::operator unspecified_bool_type (  )  const [inline]

Definition at line 801 of file Delegate.h.

00801                                                {
00802         return IsEmpty()? 0: &SafeBoolStruct::m_nonzero;
00803     }

template<class RetType = Internal::DefaultVoid>
bool CppDelegate::FastDelegate0< RetType >::operator== ( StaticFunctionPtr  funcptr  )  [inline]

Definition at line 805 of file Delegate.h.

00805                                                           {
00806                 return m_Closure.IsEqualToStaticFuncPtr(funcptr);       }

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

Definition at line 807 of file Delegate.h.

00807                                                           { 
00808                 return !m_Closure.IsEqualToStaticFuncPtr(funcptr);    }

template<class RetType = Internal::DefaultVoid>
bool CppDelegate::FastDelegate0< RetType >::operator! (  )  const [inline]

Definition at line 809 of file Delegate.h.

00809                                         {       // Is it bound to anything?
00810                         return !m_Closure; }

template<class RetType = Internal::DefaultVoid>
bool CppDelegate::FastDelegate0< RetType >::IsEmpty (  )  const [inline]

Definition at line 811 of file Delegate.h.

00811                                         {
00812                         return !m_Closure; }

template<class RetType = Internal::DefaultVoid>
void CppDelegate::FastDelegate0< RetType >::Clear (  )  [inline]

Definition at line 813 of file Delegate.h.

00813 { m_Closure.Clear(); }

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

Definition at line 816 of file Delegate.h.

00816 { return m_Closure; }

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

Definition at line 817 of file Delegate.h.

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

template<class RetType = Internal::DefaultVoid>
RetType CppDelegate::FastDelegate0< RetType >::InvokeStaticFunction (  )  const [inline, private]

Definition at line 819 of file Delegate.h.

00819                                              {
00820         return (*(m_Closure.GetStaticFunction()))(); }


Member Data Documentation

template<class RetType = Internal::DefaultVoid>
ClosureType CppDelegate::FastDelegate0< RetType >::m_Closure [private]

Definition at line 745 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