Auto_Functor.cpp

Go to the documentation of this file.
00001 // $Id: Auto_Functor.cpp 80826 2008-03-04 14:51:23Z wotte $
00002 
00003 #ifndef ACE_AUTO_FUNCTOR_CPP
00004 #define ACE_AUTO_FUNCTOR_CPP
00005 
00006 #include "ace/Auto_Functor.h"
00007 
00008 #if !defined(__ACE_INLINE__)
00009 # include "ace/Auto_Functor.inl"
00010 #endif /* __ACE_INLINE__ */
00011 
00012 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00013 
00014 template<typename X, typename Functor>
00015 ACE_Utils::Auto_Functor<X,Functor>::~Auto_Functor()
00016 {
00017   reset(0);
00018 }
00019 
00020 template<typename X, typename Functor> void
00021 ACE_Utils::Auto_Functor<X,Functor>::reset(X * p)
00022 {
00023   if(p_ != 0)
00024   {
00025     f_(p_);
00026   }
00027   p_ = p;
00028 }
00029 
00030 template<typename X, typename Functor>void
00031 ACE_Utils::Auto_Functor<X,Functor>::reset(X * p, Functor f)
00032 {
00033   reset(p);
00034   f_ = f;
00035 }
00036 
00037 ACE_END_VERSIONED_NAMESPACE_DECL
00038 
00039 #endif /*ACE_AUTO_FUNCTOR_CPP*/

Generated on Tue Feb 2 17:18:38 2010 for ACE by  doxygen 1.4.7