Re: object-model: Wrapping Subversion C-structs in C++

2010-09-26 Thread Stefan Fuhrmann
Hyrum K. Wright > wrote: For the C++ folks out there, I've got a question about an approach to take on the object-model branch. At issue is how to wrap the various C structure

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-25 Thread Hyrum K. Wright
On Sat, Sep 25, 2010 at 3:30 AM, Steinar Bang wrote: >> "Hyrum K. Wright" : > >> This could get ugly. > >> Creating and destroying pools all over the place could get ugly, but >> it's necessary evil because all of our object creation / duplication >> functions all require a pool.  An alternati

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-25 Thread Steinar Bang
> Steinar Bang : > What exactly is it you want to do? Have a thin C++ wrapper around C > objects, where the C objects "do the work"? Why do you want to? > Ie. what benefit do you expect to get, compared to just using the C > objects from inside your C++ code? Another pattern that I've used

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-25 Thread Branko Čibej
On 25.09.2010 10:34, Steinar Bang wrote: >> Branko Čibej : >> I suggest you take a look at auto_ptr and auto_ptr_ref. > auto_ptr is very limited in that it allows only a single pointer to a > single object. Which is why I mentioned auto_ptr_ref, which is a reference to an auto_ptr (non-owned)

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-25 Thread Steinar Bang
> Branko Čibej : > I suggest you take a look at auto_ptr and auto_ptr_ref. auto_ptr is very limited in that it allows only a single pointer to a single object. > You need a similar pair of classes that will deal with pools, ...but the idea of smart pointers is the correct one here, yes.

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-25 Thread Steinar Bang
> "Hyrum K. Wright" : > This could get ugly. > Creating and destroying pools all over the place could get ugly, but > it's necessary evil because all of our object creation / duplication > functions all require a pool. An alternative would be a set of > functions returning the size of the ob

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-24 Thread Hyrum K. Wright
On Fri, Sep 24, 2010 at 12:04 PM, Branko Čibej wrote: >  On 24.09.2010 18:43, Hyrum K. Wright wrote: >> All of the Pools used to hold the child objects are children of the >> global parent (created with NULL as the parent pool).  As such, they >> are independent of each other, and won't have destr

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-24 Thread Branko Čibej
On 24.09.2010 18:43, Hyrum K. Wright wrote: > All of the Pools used to hold the child objects are children of the > global parent (created with NULL as the parent pool). As such, they > are independent of each other, and won't have destruction order > issues. It's pretty wasteful in terms of the

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-24 Thread Hyrum K. Wright
On Fri, Sep 24, 2010 at 1:02 AM, Branko Čibej wrote: >  On 24.09.2010 04:05, Hyrum K. Wright wrote: >> On Thu, Sep 23, 2010 at 2:20 PM, Branko Čibej wrote: >>>  On 22.09.2010 21:41, Hyrum K. Wright wrote: [ apologizes for the somewhat stream-of-conscious nature of these mails ] On

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-23 Thread Branko Čibej
On 24.09.2010 04:05, Hyrum K. Wright wrote: > On Thu, Sep 23, 2010 at 2:20 PM, Branko Čibej wrote: >> On 22.09.2010 21:41, Hyrum K. Wright wrote: >>> [ apologizes for the somewhat stream-of-conscious nature of these mails ] >>> >>> On Wed, Sep 22, 2010 at 7:16 PM, Hyrum K. Wright >>> wrote: >>>

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-23 Thread Hyrum K. Wright
On Thu, Sep 23, 2010 at 2:20 PM, Branko Čibej wrote: >  On 22.09.2010 21:41, Hyrum K. Wright wrote: >> [ apologizes for the somewhat stream-of-conscious nature of these mails ] >> >> On Wed, Sep 22, 2010 at 7:16 PM, Hyrum K. Wright >> wrote: >>> On Wed, Sep 22, 2010 at 5:35 PM, Hyrum K. Wright >>

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-23 Thread Branko Čibej
On 22.09.2010 21:41, Hyrum K. Wright wrote: > [ apologizes for the somewhat stream-of-conscious nature of these mails ] > > On Wed, Sep 22, 2010 at 7:16 PM, Hyrum K. Wright > wrote: >> On Wed, Sep 22, 2010 at 5:35 PM, Hyrum K. Wright >> wrote: >>> For the C++ folks out there, I've got a question

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-22 Thread Hyrum K. Wright
[ apologizes for the somewhat stream-of-conscious nature of these mails ] On Wed, Sep 22, 2010 at 7:16 PM, Hyrum K. Wright wrote: > On Wed, Sep 22, 2010 at 5:35 PM, Hyrum K. Wright > wrote: >> For the C++ folks out there, I've got a question about an approach to >> take on the object-model branc

Re: object-model: Wrapping Subversion C-structs in C++

2010-09-22 Thread Hyrum K. Wright
On Wed, Sep 22, 2010 at 5:35 PM, Hyrum K. Wright wrote: > For the C++ folks out there, I've got a question about an approach to > take on the object-model branch.  At issue is how to wrap the various > C structures returned to callers, particularly in a backward > compatible manner.  Currently, I'

object-model: Wrapping Subversion C-structs in C++

2010-09-22 Thread Hyrum K. Wright
For the C++ folks out there, I've got a question about an approach to take on the object-model branch. At issue is how to wrap the various C structures returned to callers, particularly in a backward compatible manner. Currently, I'm looking at svn_wc_notify_t *. As I see it, there are a few opt