diff options
author | Rat <none@none> | 2010-06-07 19:10:55 +0200 |
---|---|---|
committer | Rat <none@none> | 2010-06-07 19:10:55 +0200 |
commit | 32546e22828e793e3881e1055acb72b6a044e331 (patch) | |
tree | 759706cdfe8423887c69a2f8ed651c0c1e5ab7d7 /externals/ace/Auto_Functor.cpp | |
parent | 2e0f8fb6e558088b33bdee83bc5ff20014e983b3 (diff) |
added ace + vcproj for win
--HG--
branch : trunk
Diffstat (limited to 'externals/ace/Auto_Functor.cpp')
-rw-r--r-- | externals/ace/Auto_Functor.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/externals/ace/Auto_Functor.cpp b/externals/ace/Auto_Functor.cpp new file mode 100644 index 00000000000..9d0dc79aa52 --- /dev/null +++ b/externals/ace/Auto_Functor.cpp @@ -0,0 +1,39 @@ +// $Id: Auto_Functor.cpp 80826 2008-03-04 14:51:23Z wotte $ + +#ifndef ACE_AUTO_FUNCTOR_CPP +#define ACE_AUTO_FUNCTOR_CPP + +#include "ace/Auto_Functor.h" + +#if !defined(__ACE_INLINE__) +# include "ace/Auto_Functor.inl" +#endif /* __ACE_INLINE__ */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +template<typename X, typename Functor> +ACE_Utils::Auto_Functor<X,Functor>::~Auto_Functor() +{ + reset(0); +} + +template<typename X, typename Functor> void +ACE_Utils::Auto_Functor<X,Functor>::reset(X * p) +{ + if(p_ != 0) + { + f_(p_); + } + p_ = p; +} + +template<typename X, typename Functor>void +ACE_Utils::Auto_Functor<X,Functor>::reset(X * p, Functor f) +{ + reset(p); + f_ = f; +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /*ACE_AUTO_FUNCTOR_CPP*/ |