[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Alternative C++ API

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2002-12-15 07:01:26 CET

On Sunday, December 15, 2002, at 12:56 AM, Scott Lamb wrote:
>
> - I couldn't understand what the classes represent / the inheritance
> hierarchy. What doess a single "Client" object represent? Why does it
> keep a revision? What does Auth inherit from Client? etc. I'd expected
> something more closely mirroring the structures in the C API, just
> with added object-oriented goodness.

for what it's worth, i've never really understood the class hierarchy
in the svncpp stuff either. it all seemed pretty arbitrary and didn't
really follow any rhyme or reason as far as i could tell.

> So I've started a new (unnamed) API. Usage is pretty simple:
>
> using namespace std;
> using namespace svn;
> try {
> client::AuthBaton authBaton;
> authBaton.setStoreAuthInfo(true);
> client::update(authBaton, "/tmp/primes",
> client::RevisionSpecifier::HEAD, true, notify, top);
> } catch (exception &e) {
> cerr << "Error: " << e.what() << endl;
> }

that looks pretty much like what i'd envisioned a c++ binding for svn
to look like.

> It has very basic code for translating between svn::Exception (derived
> from std::exception) and svn_error_t*s. Ideally, users can throw
> exceptions in callbacks and receive them from my wrappers of
> Subversion functions and not worry about what happens between.

*laugh* i've got similar stuff sitting in a local svn repository from
when i was playing with some c++ bindings for svn. mine never got
further than playing around though. it's definately the way i'd go
with it though.

> I've just been playing around with this for myself. Are other people
> interested in such a thing?
>
> The tarball's only 7K, so it's attached.

thanks, i'll take a look at it tomorrow sometime, it sounds promising.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 15 07:02:03 2002

This is an archived mail posted to the Subversion Dev mailing list.