View Poll Results: Do you use Boost libraries?

Voters
20. You may not vote on this poll
  • Yes, I use Boost libraries for Qt applications.

    3 15.00%
  • Yes, I do, but only for non-Qt applications.

    3 15.00%
  • No, I don't use them at all.

    14 70.00%
Page 1 of 2 12 LastLast
Results 1 to 20 of 27

Thread: Boost libraries

  1. #1
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Boost libraries

    Hi,

    I was wondering how many of you here use the Boost libraries with your Qt applications?

    Regards,
    Steve

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Boost libraries

    I have added a poll, so that everybody can answer this question easily.

  3. The following user says thank you to jacek for this useful post:

    steg90 (10th May 2007)

  4. #3
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Boost libraries

    Quote Originally Posted by steg90 View Post
    Hi,
    I was wondering how many of you here use the Boost libraries with your Qt applications?
    Regards,
    Steve

    What is Boost libraries?
    is this a way to become more source code line? I know only QT libs, curl, tidy, libxslt, libxml2, libexiv2 , Sablot XSLT, all lib wo can build on all OS...

    my last discovery libs is http://poppler.freedesktop.org/ to transform pdf to image... but is not possibel to build if automake or autoconf is not the last version..

    libraries wo is not possibel to build quick , not give sense to me. this is like to write a cin.getline from string and transform to QString

  5. #4
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Boost libraries

    Hi,

    Take a look at http://www.boost.org

    Regards,
    Steve

  6. #5
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Boost libraries

    I have used Boost, but it's cumbersome to use. It is a very "academic" library that is wholly unsuitable if you are not a C++ expert. It relishes in using all of the advanced features of C++, even for the simplest of problems. It is primarily based not on Object Oriented Programming, but Generic Programming. If you don't know what a functor is, stay away!

    Most things that Boost gives you are already available in Qt.

  7. #6
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Boost libraries

    Quote Originally Posted by Brandybuck View Post
    I have used Boost, but it's cumbersome to use. It is a very "academic" library that is wholly unsuitable if you are not a C++ expert. It relishes in using all of the advanced features of C++, even for the simplest of problems. It is primarily based not on Object Oriented Programming, but Generic Programming. If you don't know what a functor is, stay away!

    Most things that Boost gives you are already available in Qt.
    Yes, but I've found that you either use Qt all the way, or you don't use Qt. The Qt classes are very interdependent. Whereas boost is meant to be an extension of the standard library.
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

  8. #7
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Boost libraries

    Quote Originally Posted by Michiel View Post
    The Qt classes are very interdependent. Whereas boost is meant to be an extension of the standard library.
    Actually, Boost is quite interdependent as well. It's nearly impossible to take just one class (or set of related classes) out of Boost and use it by itself. And while some people are lobbying for parts of Boost to be included in a future C++ standard library, that does NOT mean Boost should be treated as a C++ standard.

  9. #8
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Boost libraries

    I have noticed a lot of the financial trading software houses in the uk use Boost?!

  10. #9
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Boost libraries

    There's a lot of US financial trading companies in New York using Qt :-)

  11. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Boost libraries

    Especially if their software was written by ICS

  12. #11
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Boost libraries

    Pity I'm in the UK! I do know certain financial houses do use Boost here in the UK. I have 'played' with it in the past and used mainly the smart pointers as I often forget to delete pointers and using these, it does it for you

  13. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Boost libraries

    Smart pointers delete objects? I think we're having a different concept of smart pointers... Mine is that it sets the pointer to 0 once the object pointed is deleted. The concept you described I'd call a hijacking pointer and I don't want my pointers hijacked Anyway: QPointer.

  14. #13
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Boost libraries

    Hi,

    Not heard of 'hijacking' pointer

    I'll take a look at QPointer, thanks!

    Regards,
    Steve

  15. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Boost libraries

    It's hijacking, because when it's destroyed, it destroys the pointed object as well (that's what you said). This means that if it doesn't have ownership of the object, it'll hijack it from the real owner. And it's probably implemented more or less like so:
    Qt Code:
    1. template <typename T> class HijackingPointer {
    2. public:
    3. HijackingPointer(T *ptr=0), m_ptr(ptr){}
    4. void setPointer(T* ptr){ m_ptr = ptr; }
    5. ~HijackingPointer(){ delete m_ptr; }
    6. // + operator T*, operator * and operator ->
    7. private:
    8. T* m_ptr;
    9. };
    To copy to clipboard, switch view to plain text mode 

    I don't think I have to link to a bloated library just for this small snippet.

  16. #15
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Boost libraries

    Quote Originally Posted by wysota View Post
    I don't think I have to link to a bloated library just for this small snippet.
    std::auto_ptr from STL is the one that "hijacks" pointers, not the classes from Boost's Smart Pointers family.

  17. #16
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Boost libraries

    So Boost pointers won't do that for you:
    . I have 'played' with it in the past and used mainly the smart pointers as I often forget to delete pointers and using these, it does it for you.
    Right?

  18. #17
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Boost libraries

    Quote Originally Posted by wysota View Post
    So Boost pointers won't do that for you: [...] Right?
    It depends which one you choose.

  19. #18
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Boost libraries

    So is there a pointer in the family that deletes objects pointed to when it's deleted but doesn't hijack the object (for me this is contradictory, but maybe I just can't imagine the situation)?

  20. #19
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Boost libraries

    Quote Originally Posted by wysota View Post
    So is there a pointer in the family that deletes objects pointed to when it's deleted but doesn't hijack the object (for me this is contradictory, but maybe I just can't imagine the situation)?
    Boost has three kinds of smart pointers:
    • shared pointers, which share the ownership amongs them,
    • scoped pointers, which take the ownership for themselves,
    • weak pointers, which don't take the ownership, but know when the object was destroyed.

    All these three kinds of smart pointers are well behaved and the term "hijacking" isn't appropriate. It's just as if you said that QCoreApplication::postEvent() "hijacks" pointers, because it takes their ownership --- it doesn't, it's just a part of its contract.

    If you want to call something "pointer hijacking", take a look what std::auto_ptrs do on copy --- they're like hungry hienas, which steal a dead antilope from each other.

  21. #20
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Boost libraries

    So "weak pointer" is an equivalent of QPointer, "scoped pointer" does to pointers more or less what QMutexLocker does to mutexes and shared pointer is a combination of the two that does reference counting. Correct? Of course all these might fail if you use any regular pointers with the same object.

Similar Threads

  1. Combining Qt with other libraries (Boost, ...)
    By Raistlin in forum Qt Programming
    Replies: 2
    Last Post: 13th February 2007, 07:28
  2. how to add new libraries to QT
    By whoops.slo in forum Newbie
    Replies: 3
    Last Post: 12th January 2007, 12:15
  3. Qt 3.3 libraries
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st December 2006, 18:25
  4. Standardization on libraries
    By brcain in forum General Discussion
    Replies: 13
    Last Post: 16th August 2006, 23:56
  5. Replies: 4
    Last Post: 7th March 2006, 09:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.