-
Categories
-
Buy my book
-
Tag: GCC
Swiften on Lambdas
One of the cool new features of the upcoming C++ (0x) standard is support for
lambda
expressions, providing functional-style inline function declarations. After
seeing Herb Sutter’s PDC 2010
webcast on lambdas, I wanted to try this out on Swiften, the XMPP library
behind Swift. I adapted the introductory EchoBot
example from XMPP: The
Definitive Guide, and ported it from Python to a C++ application using
Swiften. The result is surprisingly clean.
Posted in Programming and Swift | Tagged C++, C++0x, CLang, GCC, Herb Sutter, Jabber, Lambdas, Swift, Swiften, Visual Studio, and XMPP
Mixing Cocoa and Qt
Qt does a great job at abstracting out platform-specific features into platform-independent C++ APIs. However, sometimes you still need to write platform-specific code for features that are not in Qt (e.g. to access the platform's address book), or to access platform-specific applications (e.g. iTunes) or libraries (e.g. Sparkle). On Mac OS X, almost all interfaces are offered through the Cocoa Objective-C interface, and the interfaces that are written in C++ have been deprecated and will disappear soon in favor of Cocoa. Although the language of Cocoa is different from Qt's, Qt and GCC make it very easy to call these interfaces from within your application. In this post, I will show how this can be done by making an auto-updating application using Sparkle.


