Signal supporting five parameters. This is the primary class which provides the template for all partial specialized classes. More...
#include <pdf_observer.h>
Public Member Functions | |
Signal () | |
~Signal () | |
template<class T > | |
void | add_slot (T *p, R(T::*func)(A1, A2, A3, A4, A5)) |
Add receiver to receive pre-defined signals. | |
template<class T > | |
bool | remove_slot (T *p, R(T::*func)(A1, A2, A3, A4, A5)) |
Remove receiver from the receivers list. | |
void | broadcast (A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5) |
Notify all receivers. | |
size_t | count () |
Signal supporting five parameters. This is the primary class which provides the template for all partial specialized classes.
Definition at line 227 of file pdf_observer.h.
pdf::Signal< R, A1, A2, A3, A4, A5 >::Signal | ( | ) | [inline] |
Definition at line 231 of file pdf_observer.h.
pdf::Signal< R, A1, A2, A3, A4, A5 >::~Signal | ( | ) | [inline] |
Definition at line 232 of file pdf_observer.h.
void pdf::Signal< R, A1, A2, A3, A4, A5 >::add_slot | ( | T * | p, | |
R(T::*)(A1, A2, A3, A4, A5) | func | |||
) | [inline] |
Add receiver to receive pre-defined signals.
Definition at line 237 of file pdf_observer.h.
Referenced by pdf::PluginDocImpl::PluginDocImpl(), and pdf::PluginViewImpl::PluginViewImpl().
00238 { 00239 IFunctorPtr func_ptr = new Functor<T, R, A1, A2, A3, A4, A5>(p, func); 00240 receivers.push_back(func_ptr); 00241 }
void pdf::Signal< R, A1, A2, A3, A4, A5 >::broadcast | ( | A1 | arg1, | |
A2 | arg2, | |||
A3 | arg3, | |||
A4 | arg4, | |||
A5 | arg5 | |||
) | [inline] |
Notify all receivers.
Definition at line 253 of file pdf_observer.h.
Referenced by pdf::PDFSearcher::notify().
00254 { 00255 ReceiversIter begin, end, it; 00256 begin = receivers.begin(); 00257 end = receivers.end(); 00258 IFunctorPtr ptr = 0; 00259 for(it= begin; it != end; ++it) 00260 { 00261 ptr = *it; 00262 (*ptr)(arg1, arg2, arg3, arg4, arg5); 00263 } 00264 }
size_t pdf::Signal< R, A1, A2, A3, A4, A5 >::count | ( | ) | [inline] |
Definition at line 266 of file pdf_observer.h.
bool pdf::Signal< R, A1, A2, A3, A4, A5 >::remove_slot | ( | T * | p, | |
R(T::*)(A1, A2, A3, A4, A5) | func | |||
) | [inline] |
Remove receiver from the receivers list.
Definition at line 245 of file pdf_observer.h.
Referenced by pdf::PluginViewImpl::~PluginViewImpl().
00246 { 00247 Functor<T, R, A1, A2, A3, A4, A5> func_obj(p, func); 00248 return ReceiversOperations<IFunctorPtr>:: 00249 remove_receiver(&func_obj, receivers); 00250 }