< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

RE: [reSIProcate] RE: Boost and resiprocate


Hi All

I use last 5019 tallbar of reSIProcate.
I have downloaded repro's source code from subversion and get compiler
error:
'SharedPtr' : undeclared identifier
So I see there is no SharedPtr class in last reSIProcate tallbar.
Is it skipped in 0-9-0 release?

Thanks a lot,
Alex

-----Original Message-----
From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Scott
Godin
Sent: Monday, May 30, 2005 8:51 PM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [reSIProcate] RE: Boost and resiprocate

Hi Everyone!

Thanks very much for all your input on this subject - it's great to see so
much discussion.  For now I've decided not to pull in the complete Boost
library (or and unmodified version of shared_ptr).  There are now 2 new
files in resiprocate/os - SharedCount.hxx and SharedPtr.hxx - these two
files are modified versions of Boosts shared_count.hpp and shared_ptr.hpp -
all other boost dependencies have been removed. 

Mutex's guarding the SharedCount have been maintained, so all info about
thread security listed in the Boost documentation applies:

http://www.boost.org/libs/smart_ptr/shared_ptr.htm

I've renamed the class from shared_ptr to SharedPtr to be more resip like
and I've placed it into the resip:: namespace.  So this is clearly a
modified version of the Boost implementation.  

I've also modified the DUM project to use this new SharedPtr class to manage
the lifetime of the Master/UserProfile classes.  For most applications this
will just mean a minor modification in the way that you create your
MasterProfile and set it on the DUM object.

For example:
MasterProfile masterProfile;
masterProfile.setXXXX();
dum->setMasterProfile(&masterProfile);

Should become:
SharedPtr<MasterProfile> masterProfile(new MasterProfile);
masterProfile->setXXXX();
dum->setMasterProfile(masterProfile);

I've modified the apps in dum/test to reflect this.

Your application can now use UserProfile's in the dum->makeXXXXX methods and
not have to worry if they are still in use when wanting to express
disinterest in them.  If your application "releases" the Shared Ptr, then
the Profile object will be automatically destroyed when the last DialogSet
using it is deleted.

Thanks,

Scott
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel