mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
updated the utilspp version
This commit is contained in:
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user