Using C++ Boost libraries for KDevelop

Roberto Raggi roberto at kdevelop.org
Thu Nov 17 13:19:06 UTC 2005


Hi!

I don't mind to use boost! but boost is huge and I don't think it is a good 
idea to maintain a copy of boost in the our repository. So just add a check 
for it (if you really need it). 

The good news is that Qt 4.1 is boost friendly. We tried to avoid name 
conflicts (e.g. signals we use Q_SIGNALS and Q_SLOTS in our header files). If 
you want to use boost you must require Qt 4.1 and avoid the use of the Qt 
`keywords' and use the macros instead.

ciao robe



On Thursday 17 November 2005 10:44, Vladimir Prus wrote:
> Hi,
> the more I work on debugger, the more I think that using some libraries
> from C++ Boost would simplify the code quite a bit.
>
> For example, I send a command to debugger and want to be notified when that
> command finished. Currently, there's no such way, at all. All possible
> solutions are pretty clumsy.
>
> With C++ Boost, specifically with Boost.Function and Boost.Bind libraries,
> things will be improved a lot, I'll be able to write this:
>
>     class GDBController {
>     public:
>         void queueCmd(const QString& command,
>                       boost::function<void ()> callback);
>     };
>
>     class SomeOtherClass {
>     public:
>         void do_operation()
>         {
>                 controller->queueCmd(
>                    "whatever",
>    				boost::bind(&SomeOtherClass::step_2, this));
>         }
>         void step_2()
>         {
> 			// Continue with the operation.
>         }
>     };
>
> Here:
> - boost::function<void ()> is a generic functional object taking
>   no arguments and returning nothing
> - boost::bind in the above example takes method pointer, and this,
>   and binds them together. The resulting class instance can be
>   called with zero arguments.
>
>
> The libraries in question are header-only -- they don't require any
> linking, so this reduces problems somehow.
>
> So, what is the general opinion about this:
> - is it OK to add extra third party dependencies, in general
> - any conditions the dependency must fulfill?
> - it is best to rely on pre-installed dependency, or package it
>   with KDevelop?
>
>
> - Volodya
>
>
>
>
>
> _______________________________________________
> KDevelop-devel mailing list
> KDevelop-devel at barney.cs.uni-potsdam.de
> http://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel




More information about the KDevelop-devel mailing list