[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libcdio-devel] started a C++ wrapper for libcdio

From: R. Bernstein
Subject: [Libcdio-devel] started a C++ wrapper for libcdio
Date: Thu, 10 Nov 2005 07:05:31 -0500

I've just commited a first attempt at a C++ wrapper for libcdio using
the guidance given in libcdio-devel so far. Although I have done some
minimal testing, there's always a chance that something is slightly
broken on an OS I haven't tested. (And if so, usually Steve Schultz
tells me - I think he's asleep right now since I haven't heard from
him yet.)

Although I know there is probably room for great improvement (which
I'm hoping kind folks will tell me about), so far, I am pretty
satisfied with the results. I think the C++ programs using this
wrapper are cleaner shorter and less error prone. The (minimally) OO
C++ programs are in example/C++/OO. I suppose one could compare with
those programs in example/C++ from which they are based.

In this endeavour a place where a change propagated back into libcdio
was adding a more generic read_block routine which takes a mode
parameter (as opposed to the 3 read_{audio,mode{1,2}_* routines).

There are some things that haven't been done yet. Peter Creath
suggested a mechanism whereby one can ensure a single instance of the
Cdio class. He gave some sample code off the top of his head that alas
doesn't compile but looks to me pretty much boiler-plate code that can
be inserted at any time. libcdio right now does not contain the audio
or MMC routines. That can easily be fixed; what's there is fairly
large and I wanted to get some feedback on this before going
further. Likewise, a wrapper for libiso9660 could be done.

A C++ wrapper for libcdio_paranoia would probably do more to hide
those things that should have been hidden in the existing C interface.
(Or may they would have been in the next release of cdparanoia?) 

It was suggested that to try to separate C++ from C for C++-phobes, in
particular the includes. So I've add include/cdio++ which I think is
clearer than the suggested include/cdiopp - but if there is a problem
with this, let me know. As mentioned before the example programs are
in example/C++/OO. I haven't (yet) included a mechanism to avoid
building libcdio++.

As always comments are welcome. Thanks for all the input so far.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]