// -*- C++ -*- // // $Id$ ACE_BEGIN_VERSIONED_NAMESPACE_DECL template ACE_INLINE ACE_Utils::Auto_Functor_Ref:: Auto_Functor_Ref(X * p, Functor f) : p_(p) , f_(f) { } template ACE_INLINE ACE_Utils::Auto_Functor::Auto_Functor(X * p, Functor f) : p_(p) , f_(f) { } template ACE_INLINE ACE_Utils::Auto_Functor::Auto_Functor(Auto_Functor & rhs) : p_(rhs.release()) , f_(rhs.f_) { } template ACE_INLINE ACE_Utils::Auto_Functor& ACE_Utils::Auto_Functor:: operator=(Auto_Functor & rhs) { reset(rhs.release()); f_ = rhs.f_; return *this; } #if !defined(ACE_LACKS_MEMBER_TEMPLATES) template template ACE_INLINE ACE_Utils::Auto_Functor::Auto_Functor(Auto_Functor& rhs) : p_(rhs.release()) , f_(rhs.f_) { } template template ACE_INLINE ACE_Utils::Auto_Functor& ACE_Utils::Auto_Functor::operator=(Auto_Functor& rhs) { reset(rhs.release()); return *this; } #endif /* ACE_LACKS_MEMBER_TEMPLATES */ template ACE_INLINE X & ACE_Utils::Auto_Functor::operator*() const { return *p_; } template ACE_INLINE X * ACE_Utils::Auto_Functor::operator->() const { return p_; } template ACE_INLINE X * ACE_Utils::Auto_Functor::get() { return p_; } template ACE_INLINE X * ACE_Utils::Auto_Functor::release() { X * tmp = p_; p_ = 0; return tmp; } template ACE_INLINE Functor const & ACE_Utils::Auto_Functor::functor() const { return f_; } template ACE_INLINE ACE_Utils::Auto_Functor::Auto_Functor(Auto_Functor_Ref rhs) : p_(rhs.p_) , f_(rhs.f_) { } template ACE_INLINE ACE_Utils::Auto_Functor & ACE_Utils::Auto_Functor::operator=(Auto_Functor_Ref rhs) { if(rhs.p_ != p_) { reset(rhs.p_); f_ = rhs.f_; } return *this; } #if !defined(ACE_LACKS_MEMBER_TEMPLATES) template template ACE_INLINE ACE_Utils::Auto_Functor::operator ACE_Utils::Auto_Functor_Ref() { return ACE_Utils::Auto_Functor_Ref(release(), f_); } template template ACE_INLINE ACE_Utils::Auto_Functor::operator ACE_Utils::Auto_Functor() { return ACE_Utils::Auto_Functor(release(), f_); } #else templateACE_INLINE ACE_Utils::Auto_Functor::operator ACE_Utils::Auto_Functor_Ref() { return ACE_Utils::Auto_Functor_Ref(release(), f_); } #endif /* ACE_LACKS_MEMBER_TEMPLATES */ ACE_END_VERSIONED_NAMESPACE_DECL