svn commit: samba r18030 - in branches/SAMBA_3_0/source/tdb/common: .

Tim Potter tpot at
Fri Sep 8 01:00:44 GMT 2006

On Mon, 2006-09-04 at 22:53 +1000, tridge at wrote:

> Is it really practical to make our libraries usable in real C++
> programs, without adding a lot of C++ specific code?
> Is a fairly complex C library like tdb really usable in real C++
> programs?  I am certainly no C++ expert, but I thought there was a bit
> more to it than just getting it to compile.

I use both tdb and ldb (a pre-libreplace version) in production code at
work.  For tdb a C++ wrapper is quite simple as I'm just putting
tdb_open() in the constructor, tdb_close() in the destructor, and
converting TDB_DATA structures to C++ std::string objects.

For ldb a wrapper is a bit trickier, as the parent/child memory hierachy
doesn't lend itself to making each C struct an object so it was easier
just to use the C ldb API within a higher level C++ class.


More information about the samba-technical mailing list