Skip to content
Snippets Groups Projects
Commit 8c3de3b7 authored by jpbl's avatar jpbl
Browse files

updated the utilspp version

parent 2a7379fb
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
......@@ -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)
......
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment