[crossfire] C++/Qt server version

Alex Schultz agschult at ucalgary.ca
Mon Nov 24 12:10:47 CST 2008


On Mon, 24 Nov 2008 17:25:40 +0000 (UTC)
Lalo Martins <lalo.martins at gmail.com> wrote:

> > Note that C++/Qt and Python interact decently with some tests, there
> > doesn't seem to be any issue there.
> 
> Well, you *can* simply use libpython from C++.  But Boost::Python is
> a whole new level of integration, it allows you to directly wrap
> classes and other cool magic.
> 
> That may not be an issue for us, though, since we're filtering our
> Python stuff through the plug-in API anyway.  Depends, I guess, on
> how C++ we want to convert the plug-in API to.  It may also turn
> out that once everything is classes, there's no need for the
> plug-in isolation API anymore.

Yep, that automagical wrapping in Boost::Python is one of the biggest
things that made me consider bringing up Boost in the first place,
considering how cfpython seems to be becoming increasingly used.

That said, a little searching shows that if we want similar automagical
wrapping and go with Qt-core, apparently "QtScript" (an ECMAScript based
scripting language which has been included in the Qt toolkit since
4.3.0), appears to be able to provide some kinds of similar
things. Of course, it would also be plausible to use Qt-core for the
bulk of the rewrite and Boost::Python for cfpython, but that could
cause difficulties with differing string types and plain add redundant
bloat to the dependencies.

Alex



More information about the crossfire mailing list