CppDelegate::FastDelegate1< Param1, RetType > Class Template Reference

#include <Delegate.h>

List of all members.

Public Types

typedef FastDelegate1 type

Public Member Functions

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

Private Member Functions

RetType InvokeStaticFunction (Param1 p1) const

Private Attributes

ClosureType m_Closure

Classes

struct  SafeBoolStruct


Detailed Description

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

Definition at line 825 of file Delegate.h.


Member Typedef Documentation

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

Definition at line 827 of file Delegate.h.

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

Definition at line 828 of file Delegate.h.

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

Definition at line 829 of file Delegate.h.

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

Definition at line 830 of file Delegate.h.

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

Definition at line 831 of file Delegate.h.

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

Definition at line 835 of file Delegate.h.

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

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

Definition at line 886 of file Delegate.h.


Constructor & Destructor Documentation

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

Definition at line 838 of file Delegate.h.

00838 { Clear(); }

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

Definition at line 839 of file Delegate.h.

00839                                               {
00840                 m_Closure.CopyFrom(this, x.m_Closure); }

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

Definition at line 853 of file Delegate.h.

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

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

Definition at line 860 of file Delegate.h.

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

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

Definition at line 867 of file Delegate.h.

00867                                                                       {
00868                 Bind(function_to_bind); }


Member Function Documentation

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

Definition at line 841 of file Delegate.h.

00841                                                   {
00842                 m_Closure.CopyFrom(this, x.m_Closure); }

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

Definition at line 843 of file Delegate.h.

00843                                                        {
00844                 return m_Closure.IsEqual(x.m_Closure);  }

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

Definition at line 845 of file Delegate.h.

00845                                                        {
00846                 return !m_Closure.IsEqual(x.m_Closure); }

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

Definition at line 847 of file Delegate.h.

00847                                                       {
00848                 return m_Closure.IsLess(x.m_Closure);   }

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

Definition at line 849 of file Delegate.h.

00849                                                       {
00850                 return x.m_Closure.IsLess(m_Closure);   }

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

Definition at line 856 of file Delegate.h.

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

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

Definition at line 863 of file Delegate.h.

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

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

Definition at line 870 of file Delegate.h.

00870                                                                          {
00871                 Bind(function_to_bind); }

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

Definition at line 872 of file Delegate.h.

00872                                                                         {
00873                 m_Closure.bindstaticfunc(this, &FastDelegate1::InvokeStaticFunction, 
00874                         function_to_bind); }

template<class Param1, class RetType = Internal::DefaultVoid>
RetType CppDelegate::FastDelegate1< Param1, RetType >::Invoke ( Param1  p1  )  const [inline]

Definition at line 876 of file Delegate.h.

00876                                         {
00877         return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(p1); }

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

Definition at line 878 of file Delegate.h.

00878                                                     {
00879         return Invoke(p1); }

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

Definition at line 888 of file Delegate.h.

00888                                                {
00889         return IsEmpty()? 0: &SafeBoolStruct::m_nonzero;
00890     }

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

Definition at line 892 of file Delegate.h.

00892                                                           {
00893                 return m_Closure.IsEqualToStaticFuncPtr(funcptr);       }

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

Definition at line 894 of file Delegate.h.

00894                                                           { 
00895                 return !m_Closure.IsEqualToStaticFuncPtr(funcptr);    }

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

Definition at line 896 of file Delegate.h.

00896                                         {       // Is it bound to anything?
00897                         return !m_Closure; }

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

Definition at line 898 of file Delegate.h.

00898                                         {
00899                         return !m_Closure; }

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

Definition at line 900 of file Delegate.h.

00900 { m_Closure.Clear(); }

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

Definition at line 903 of file Delegate.h.

00903 { return m_Closure; }

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

Definition at line 904 of file Delegate.h.

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

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

Definition at line 906 of file Delegate.h.

00906                                                       {
00907         return (*(m_Closure.GetStaticFunction()))(p1); }


Member Data Documentation

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

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