Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CTBcallbackR.icc

Go to the documentation of this file.
00001 
00006 /*----------------------------------------------------------------------------*/
00007 /* C Tool Box: Designed and implemented by:                                   */
00008 /*    Walter F.J. Mueller   Gesellschaft fuer Schwerionenforschung (GSI)      */
00009 /*                          Planckstrasse 1, D-64291 Darmstadt, Germany       */
00010 /*                  Email:  W.F.J.Mueller@gsi.de                              */
00011 /*                  WWW:    http://www-kp3.gsi.de/www/kp3/people/mueller.html */
00012 /*------------------------------------------+---------------------------------*/
00013 
00022 //------------------------------------------+-----------------------------------
00024 
00025 template <class TR>
00026 inline void CTBcallbackSource0R<TR>::operator()(CTBvector<TR>& res)
00027 {
00028   CTBcallbackArg0R<TR> arg(res);
00029 
00030   res.Resize(0);
00031   if (m_shead) {
00032     res.EnsureCapacity(NConnect());
00033     Execute(&arg);
00034   }
00035   return;
00036 }
00037 
00038 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00047 //------------------------------------------+-----------------------------------
00049 
00050 template <class T, class TR>
00051 inline CTBcallbackTarget0R<T,TR>::CTBcallbackTarget0R()
00052   : mp_this(0),
00053     mo_func(0)
00054 {}
00055 
00056 //------------------------------------------+-----------------------------------
00058 
00059 template <class T, class TR>
00060 inline CTBcallbackTarget0R<T,TR>::CTBcallbackTarget0R(
00061          const CTBcallbackTarget0R<T,TR>& rhs)
00062   : CTBcallbackTargetBase(rhs),
00063     mp_this(0),
00064     mo_func(0)
00065 {}
00066 
00067 //------------------------------------------+-----------------------------------
00069 
00070 template <class T, class TR>
00071 inline CTBcallbackTarget0R<T,TR>::CTBcallbackTarget0R(T* p_this,
00072                                        TR (T::* o_func)())
00073   : mp_this(p_this),
00074     mo_func(o_func)
00075 {}
00076 
00077 //------------------------------------------+-----------------------------------
00079 
00080 template <class T, class TR>
00081 inline CTBcallbackTarget0R<T,TR>::CTBcallbackTarget0R(
00082     const CTBcallbackTarget0R<T,TR>& rhs,
00083     T* p_this, TR (T::* o_func)())
00084   : CTBcallbackTargetBase(rhs),
00085     mp_this(p_this),
00086     mo_func(o_func)
00087 {}
00088 
00089 //------------------------------------------+-----------------------------------
00091 
00092 template <class T, class TR>
00093 inline void CTBcallbackTarget0R<T,TR>::Configure(T* p_this,
00094                                             TR (T::* o_func)())
00095 {  
00096   mp_this = p_this; 
00097   mo_func = o_func;
00098   return;
00099 }
00100 
00101 //------------------------------------------+-----------------------------------
00103 
00104 template <class T, class TR>
00105 inline void CTBcallbackTarget0R<T,TR>::Connect(
00106     CTBcallbackSource0R<TR>& source)
00107 {  
00108   CTBcallbackTargetBase::Connect(source);
00109   return;
00110 }
00111 
00112 //------------------------------------------+-----------------------------------
00114 
00115 template <class T, class TR>
00116 inline void CTBcallbackTarget0R<T,TR>::Disconnect(
00117     CTBcallbackSource0R<TR>& source)
00118 {  
00119   CTBcallbackTargetBase::Disconnect(source);
00120   return;
00121 }
00122 
00123 //------------------------------------------+-----------------------------------
00125 
00126 template <class T, class TR>
00127 inline void CTBcallbackTarget0R<T,TR>::Execute(void* p_arg) const
00128 {  
00129   CTBcallbackArg0R<TR>* p = (CTBcallbackArg0R<TR>*) p_arg;
00130   if (mp_this) p->m_res << (mp_this->*mo_func)();
00131   return;
00132 }
00133 
00134 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00135 #ifdef DEV_DOCS
00136 
00143 #endif
00144 
00145 //------------------------------------------+-----------------------------------
00147 
00148 template <class TR>
00149 inline CTBcallbackArg0R<TR>::CTBcallbackArg0R(CTBvector<TR>& res)
00150   : m_res(res)
00151 {}
00152 
00153 //##############################################################################
00162 //------------------------------------------+-----------------------------------
00164 
00165 template <class TR, class T1>
00166 inline void CTBcallbackSource1R<TR,T1>::operator()(CTBvector<TR>& res, T1 p1)
00167 {
00168   CTBcallbackArg1R<TR,T1> arg(res,p1);
00169 
00170   res.Resize(0);
00171   if (m_shead) {
00172     res.EnsureCapacity(NConnect());
00173     Execute(&arg);
00174   }
00175   return;
00176 }
00177 
00178 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00187 //------------------------------------------+-----------------------------------
00189 
00190 template <class T, class TR, class T1>
00191 inline CTBcallbackTarget1R<T,TR,T1>::CTBcallbackTarget1R()
00192   : mp_this(0),
00193     mo_func(0)
00194 {}
00195 
00196 //------------------------------------------+-----------------------------------
00198 
00199 template <class T, class TR, class T1>
00200 inline CTBcallbackTarget1R<T,TR,T1>::CTBcallbackTarget1R(
00201          const CTBcallbackTarget1R<T,TR,T1>& rhs)
00202   : CTBcallbackTargetBase(rhs),
00203     mp_this(0),
00204     mo_func(0)
00205 {}
00206 
00207 //------------------------------------------+-----------------------------------
00209 
00210 template <class T, class TR, class T1>
00211 inline CTBcallbackTarget1R<T,TR,T1>::CTBcallbackTarget1R(T* p_this,
00212                                        TR (T::* o_func)(T1))
00213   : mp_this(p_this),
00214     mo_func(o_func)
00215 {}
00216 
00217 //------------------------------------------+-----------------------------------
00219 
00220 template <class T, class TR, class T1>
00221 inline CTBcallbackTarget1R<T,TR,T1>::CTBcallbackTarget1R(
00222     const CTBcallbackTarget1R<T,TR,T1>& rhs,
00223     T* p_this, TR (T::* o_func)(T1))
00224   : CTBcallbackTargetBase(rhs),
00225     mp_this(p_this),
00226     mo_func(o_func)
00227 {}
00228 
00229 //------------------------------------------+-----------------------------------
00231 
00232 template <class T, class TR, class T1>
00233 inline void CTBcallbackTarget1R<T,TR,T1>::Configure(T* p_this,
00234                                             TR (T::* o_func)(T1))
00235 {  
00236   mp_this = p_this; 
00237   mo_func = o_func;
00238   return;
00239 }
00240 
00241 //------------------------------------------+-----------------------------------
00243 
00244 template <class T, class TR, class T1>
00245 inline void CTBcallbackTarget1R<T,TR,T1>::Connect(
00246     CTBcallbackSource1R<TR,T1>& source)
00247 {  
00248   CTBcallbackTargetBase::Connect(source);
00249   return;
00250 }
00251 
00252 //------------------------------------------+-----------------------------------
00254 
00255 template <class T, class TR, class T1>
00256 inline void CTBcallbackTarget1R<T,TR,T1>::Disconnect(
00257     CTBcallbackSource1R<TR,T1>& source)
00258 {  
00259   CTBcallbackTargetBase::Disconnect(source);
00260   return;
00261 }
00262 
00263 //------------------------------------------+-----------------------------------
00265 
00266 template <class T, class TR, class T1>
00267 inline void CTBcallbackTarget1R<T,TR,T1>::Execute(void* p_arg) const
00268 {  
00269   CTBcallbackArg1R<TR,T1>* p = (CTBcallbackArg1R<TR,T1>*) p_arg;
00270   if (mp_this) p->m_res << (mp_this->*mo_func)(p->m_p1);
00271   return;
00272 }
00273 
00274 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00275 #ifdef DEV_DOCS
00276 
00283 #endif
00284 
00285 //------------------------------------------+-----------------------------------
00287 
00288 template <class TR, class T1>
00289 inline CTBcallbackArg1R<TR,T1>::CTBcallbackArg1R(CTBvector<TR>& res, T1 p1)
00290   : m_res(res),
00291     m_p1(p1)
00292 {}
00293 
00294 //##############################################################################
00295 
00296 

Generated at Fri Oct 24 18:11:27 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001