CppDelegate::DataDelegate< Controller > Class Template Reference

#include <Delegate.h>

List of all members.

Public Types

typedef void(*) Function (Controller &)
typedef FastDelegate1< Controller & > FastDelegate

Public Member Functions

bool Add (FastDelegate &addable)
bool Add (Function function)
template<class X, class Y>
bool Add (X *object, void(Y::*function)(Controller &))
template<class X, class Y>
bool Add (const X *object, void(Y::*function)(Controller &) const)
bool RemoveAll (FastDelegate &removable)
bool RemoveAll (Function function)
template<class X, class Y>
bool RemoveAll (X *object, void(Y::*function)(Controller &))
template<class X, class Y>
bool RemoveAll (const X *object, void(Y::*function)(Controller &) const)
bool Remove (FastDelegate &removable)
bool Remove (Function function)
template<class X, class Y>
bool Remove (X *object, void(Y::*function)(Controller &))
template<class X, class Y>
bool Remove (const X *object, void(Y::*function)(Controller &) const)
void Clear ()
bool IsEmpty ()
bool operator! ()
bool operator+= (Function function)
bool operator+= (FastDelegate &addable)
bool operator-= (Function function)
bool operator-= (FastDelegate &removable)
 ~DataDelegate ()

Private Member Functions

 DataDelegate ()
 DataDelegate (Function function)
 DataDelegate (const FastDelegate &_me)
template<class X, class Y>
 DataDelegate (X *object, void(Y::*function)(Controller &))
template<class X, class Y>
 DataDelegate (const X *object, void(Y::*function)(Controller &) const)
void Invoke (Controller &controller) const
void operator() (Controller &controller) const

Private Attributes

DataDelegate< Controller > * next
FastDelegate me

Friends

class DelegateController< Controller >
template<class Delegate, class FastDelegate>
bool Internal::AddFastDelegate (Delegate &delegate, FastDelegate &addable)
template<class Delegate, typename Function>
bool Internal::AddFunction (Delegate &delegate, Function function)
template<class Delegate, class Object, typename MemberFunction>
bool Internal::AddMemberFunction (Delegate &delegate, Object *object, MemberFunction function)
template<class Delegate, class FastDelegate>
bool Internal::RemoveAll (Delegate &delegate, FastDelegate &removable)
template<class Delegate, class FastDelegate>
bool Internal::Remove (Delegate &delegate, FastDelegate &removable)
template<class Delegate>
void Internal::Clear (Delegate &delegate)


Detailed Description

template<class Controller>
class CppDelegate::DataDelegate< Controller >

Definition at line 1725 of file Delegate.h.


Member Typedef Documentation

template<class Controller>
typedef void(*) CppDelegate::DataDelegate< Controller >::Function(Controller &)

Definition at line 1729 of file Delegate.h.

template<class Controller>
typedef FastDelegate1<Controller &> CppDelegate::DataDelegate< Controller >::FastDelegate

Definition at line 1730 of file Delegate.h.


Constructor & Destructor Documentation

template<class Controller>
CppDelegate::DataDelegate< Controller >::DataDelegate (  )  [inline, private]

Definition at line 1745 of file Delegate.h.

01745 : next(NULL), me() {}

template<class Controller>
CppDelegate::DataDelegate< Controller >::DataDelegate ( Function  function  )  [inline, private]

Definition at line 1746 of file Delegate.h.

01746 : next(NULL), me(function) {}

template<class Controller>
CppDelegate::DataDelegate< Controller >::DataDelegate ( const FastDelegate _me  )  [inline, private]

Definition at line 1747 of file Delegate.h.

01747 : next(NULL), me(_me) {}

template<class Controller>
template<class X, class Y>
CppDelegate::DataDelegate< Controller >::DataDelegate ( X *  object,
void(Y::*)(Controller &)  function 
) [inline, private]

Definition at line 1748 of file Delegate.h.

01748 : next(NULL), me(object, function) {}

template<class Controller>
template<class X, class Y>
CppDelegate::DataDelegate< Controller >::DataDelegate ( const X *  object,
void(Y::*)(Controller &) const   function 
) [inline, private]

Definition at line 1749 of file Delegate.h.

01749 : next(NULL), me(object, function) {}

template<class Controller>
CppDelegate::DataDelegate< Controller >::~DataDelegate (  )  [inline]

Definition at line 1857 of file Delegate.h.

01857 { Clear(); }


Member Function Documentation

template<class Controller>
void CppDelegate::DataDelegate< Controller >::Invoke ( Controller &  controller  )  const [inline, private]

Definition at line 1751 of file Delegate.h.

01752                 {
01753                         if (!me.IsEmpty() )
01754                         {
01755                                 me(controller);
01756                                 if (next != NULL) next->Invoke(controller);
01757                         }
01758                         
01759                 } // OPERATOR ()

template<class Controller>
void CppDelegate::DataDelegate< Controller >::operator() ( Controller &  controller  )  const [inline, private]

Definition at line 1761 of file Delegate.h.

01761 { Invoke(controller); }

template<class Controller>
bool CppDelegate::DataDelegate< Controller >::Add ( FastDelegate addable  )  [inline]

Definition at line 1765 of file Delegate.h.

01766                 {
01767                         return Internal::AddFastDelegate<DataDelegate<Controller>, FastDelegate>(*this, addable);
01768                         
01769                 } // Add 1

template<class Controller>
bool CppDelegate::DataDelegate< Controller >::Add ( Function  function  )  [inline]

Definition at line 1771 of file Delegate.h.

01772                 {
01773                         return Internal::AddFunction<DataDelegate<Controller>, Function>(*this, function);
01774                         
01775                 } // Add 2

template<class Controller>
template<class X, class Y>
bool CppDelegate::DataDelegate< Controller >::Add ( X *  object,
void(Y::*)(Controller &)  function 
) [inline]

Definition at line 1777 of file Delegate.h.

01778                 {
01779                         return Internal::AddMemberFunction<DataDelegate<Controller>, X, void (Y::*)(Controller &)>(*this, object, function);
01780                         
01781                 } // Add 3

template<class Controller>
template<class X, class Y>
bool CppDelegate::DataDelegate< Controller >::Add ( const X *  object,
void(Y::*)(Controller &) const   function 
) [inline]

Definition at line 1783 of file Delegate.h.

01784                 {
01785                         return Internal::AddMemberFunction<DataDelegate<Controller>, const X, void (Y::*)(Controller &) const>(*this, object, function);
01786                         
01787                 } // Add 4

template<class Controller>
bool CppDelegate::DataDelegate< Controller >::RemoveAll ( FastDelegate removable  )  [inline]

Definition at line 1789 of file Delegate.h.

01790                 {
01791                         return Internal::RemoveAll<DataDelegate<Controller>, Function>(*this, removable);
01792                         
01793                 } // RemoveAll 1

template<class Controller>
bool CppDelegate::DataDelegate< Controller >::RemoveAll ( Function  function  )  [inline]

Definition at line 1795 of file Delegate.h.

01796                 {
01797                         FastDelegate removable(function);
01798                         
01799                         return RemoveAll(removable);
01800                         
01801                 } // RemoveAll 2

template<class Controller>
template<class X, class Y>
bool CppDelegate::DataDelegate< Controller >::RemoveAll ( X *  object,
void(Y::*)(Controller &)  function 
) [inline]

Definition at line 1803 of file Delegate.h.

01804                 {
01805                         FastDelegate removable(object, function);
01806                         
01807                         return RemoveAll(removable);
01808                         
01809                 } // RemoveAll 3

template<class Controller>
template<class X, class Y>
bool CppDelegate::DataDelegate< Controller >::RemoveAll ( const X *  object,
void(Y::*)(Controller &) const   function 
) [inline]

Definition at line 1811 of file Delegate.h.

01812                 {
01813                         FastDelegate removable(object, function);
01814                         
01815                         return RemoveAll(removable);
01816                         
01817                 } // RemoveAll 4

template<class Controller>
bool CppDelegate::DataDelegate< Controller >::Remove ( FastDelegate removable  )  [inline]

Definition at line 1819 of file Delegate.h.

01820                 {
01821                         return Internal::Remove<DataDelegate<Controller>, FastDelegate>(*this, removable);
01822                         
01823                 } // Remove 1

template<class Controller>
bool CppDelegate::DataDelegate< Controller >::Remove ( Function  function  )  [inline]

Definition at line 1825 of file Delegate.h.

01826                 {
01827                         FastDelegate removable(function);
01828                         
01829                         return Remove(removable);
01830                         
01831                 } // Remove 2

template<class Controller>
template<class X, class Y>
bool CppDelegate::DataDelegate< Controller >::Remove ( X *  object,
void(Y::*)(Controller &)  function 
) [inline]

Definition at line 1833 of file Delegate.h.

01834                 {
01835                         FastDelegate removable(object, function);
01836                         
01837                         return Remove(removable);
01838                         
01839                 } // Remove 3

template<class Controller>
template<class X, class Y>
bool CppDelegate::DataDelegate< Controller >::Remove ( const X *  object,
void(Y::*)(Controller &) const   function 
) [inline]

Definition at line 1841 of file Delegate.h.

01842                 {
01843                         FastDelegate removable(object, function);
01844                         
01845                         return Remove(removable);
01846                         
01847                 } // Remove 4

template<class Controller>
void CppDelegate::DataDelegate< Controller >::Clear (  )  [inline]

Definition at line 1849 of file Delegate.h.

01849 { Internal::Clear<DataDelegate<Controller> >(*this); }

template<class Controller>
bool CppDelegate::DataDelegate< Controller >::IsEmpty (  )  [inline]

Definition at line 1850 of file Delegate.h.

01850 { return !me; }

template<class Controller>
bool CppDelegate::DataDelegate< Controller >::operator! (  )  [inline]

Definition at line 1851 of file Delegate.h.

01851 { return IsEmpty(); }

template<class Controller>
bool CppDelegate::DataDelegate< Controller >::operator+= ( Function  function  )  [inline]

Definition at line 1852 of file Delegate.h.

01852 { return Add(function); }

template<class Controller>
bool CppDelegate::DataDelegate< Controller >::operator+= ( FastDelegate addable  )  [inline]

Definition at line 1853 of file Delegate.h.

01853 { return Add(addable); }

template<class Controller>
bool CppDelegate::DataDelegate< Controller >::operator-= ( Function  function  )  [inline]

Definition at line 1854 of file Delegate.h.

01854 { return Remove(function); }

template<class Controller>
bool CppDelegate::DataDelegate< Controller >::operator-= ( FastDelegate removable  )  [inline]

Definition at line 1855 of file Delegate.h.

01855 { return Remove(removable); }


Friends And Related Function Documentation

template<class Controller>
friend class DelegateController< Controller > [friend]

Definition at line 1734 of file Delegate.h.

template<class Controller>
template<class Delegate, class FastDelegate>
bool Internal::AddFastDelegate ( Delegate &  delegate,
FastDelegate addable 
) [friend]

template<class Controller>
template<class Delegate, typename Function>
bool Internal::AddFunction ( Delegate &  delegate,
Function  function 
) [friend]

template<class Controller>
template<class Delegate, class Object, typename MemberFunction>
bool Internal::AddMemberFunction ( Delegate &  delegate,
Object *  object,
MemberFunction  function 
) [friend]

template<class Controller>
template<class Delegate, class FastDelegate>
bool Internal::RemoveAll ( Delegate &  delegate,
FastDelegate removable 
) [friend]

template<class Controller>
template<class Delegate, class FastDelegate>
bool Internal::Remove ( Delegate &  delegate,
FastDelegate removable 
) [friend]

template<class Controller>
template<class Delegate>
void Internal::Clear ( Delegate &  delegate  )  [friend]


Member Data Documentation

template<class Controller>
DataDelegate<Controller>* CppDelegate::DataDelegate< Controller >::next [private]

Definition at line 1742 of file Delegate.h.

template<class Controller>
FastDelegate CppDelegate::DataDelegate< Controller >::me [private]

Definition at line 1743 of file Delegate.h.


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