updated the utilspp version

This commit is contained in:
jpbl
2005-08-29 14:40:16 +00:00
parent 2a7379fb1c
commit 8c3de3b7cb
3 changed files with 18 additions and 15 deletions

View File

@ -38,15 +38,14 @@ utilspp::Functor<R, TList>::Functor(const PointerToObj &obj, MemFun fun)
template <typename R, class TList>
utilspp::Functor<R, TList>::Functor(const Functor &functor)
: mImpl(functor->mImpl->clone())
: mImpl(functor.mImpl->clone())
{}
template <typename R, class TList>
utilspp::Functor<R, TList> &
utilspp::Functor<R, TList>::operator=(const Functor &functor)
{
delete(mImpl);
mImpl = functor->clone();
mImpl = std::auto_ptr< Impl >(functor.mImpl->clone());
return (*this);
}

View File

@ -32,15 +32,15 @@ namespace utilspp
{
public:
typedef typename ParentFunctor::ResultType ResultType;
MemFunHandler(const PointerToObj& obj, PointerToMemFn memFn)
MemFunHandler(PointerToObj obj, PointerToMemFn memFn)
: mObj(obj)
, mMemFn(memFn)
{}
MemFunHandler* clone() const
{return new MemFunHandler(*this);}
ResultType operator()()
ResultType operator()()
{return ((*mObj).*mMemFn)();}
ResultType operator()(typename ParentFunctor::Parm1 p1)
@ -49,7 +49,9 @@ namespace utilspp
ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2)
{return ((*mObj).*mMemFn)(p1, p2);}
ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3)
ResultType operator()(typename ParentFunctor::Parm1 p1,
typename ParentFunctor::Parm2 p2,
typename ParentFunctor::Parm3 p3)
{return ((*mObj).*mMemFn)(p1, p2, p3);}
ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4)

View File

@ -1,18 +1,19 @@
noinst_LTLIBRARIES = libsingleton.la
libsingleton_la_SOURCES = \
CreationStatic.hpp \
CreationUsingNew.hpp \
LifetimeDefault.hpp \
CreationStatic.hpp CreationStatic.inl \
CreationUsingNew.hpp CreationUsingNew.inl \
LifetimeDefault.hpp LifetimeDefault.inl \
LifetimeLibrary.cpp LifetimeLibrary.hpp LifetimeLibrary.inl \
LifetimeWithLongevity.hpp LifetimeWithLongevity.inl \
PrivateMembers.cpp PrivateMembers.hpp PrivateMembers.inl \
SingletonHolder.hpp SingletonHolder.inl
SingletonHolder.hpp SingletonHolder.inl
pkginclude_HEADERS = \
CreationStatic.hpp \
CreationUsingNew.hpp \
LifetimeDefault.hpp \
pkginclude_HEADERS = \
CreationStatic.hpp CreationStatic.inl \
CreationUsingNew.hpp CreationUsingNew.inl \
LifetimeDefault.hpp LifetimeDefault.inl \
LifetimeLibrary.hpp LifetimeLibrary.inl \
LifetimeWithLongevity.hpp LifetimeWithLongevity.inl \
PrivateMembers.hpp PrivateMembers.inl \
@ -20,3 +21,4 @@ pkginclude_HEADERS = \
pkgincludedir=$(includedir)/utilspp/singleton