Results 1 to 6 of 6

Thread: Classes with Implicit Sharing

  1. #1
    Join Date
    Nov 2009
    Posts
    68
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded

    Default Classes with Implicit Sharing

    I want to make my own class that has Implicit Sharing. I could not seem to find an example. Can someone give me a quick example or point me to a good one?

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Classes with Implicit Sharing

    Why not first start with the docs?
    http://doc.qt.nokia.com/4.7-snapshot...t-sharing.html
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Nov 2009
    Posts
    68
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded

    Default Re: Classes with Implicit Sharing

    I saw this, not what I am looking for.

    I am looking for an example of how to write a class that has Implicit Sharing.

  4. #4
    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: Classes with Implicit Sharing

    The example is here: QSharedDataPointer.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Nov 2009
    Posts
    68
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded

    Default Re: Classes with Implicit Sharing

    Thanks, that is what I am looking for.

  6. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Classes with Implicit Sharing

    I am looking for an example of how to write a class that has Implicit Sharing.
    Sometimes I really wonder...
    The link I gave you explains how to write shared classes with Qt (or rather is the first steps to that) - isn't that the reason you are looking for an example? to see how this is done?
    If you had at least skimmed through the first paragraph on the link I gave you, you would have come to the link wysota posted.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Implicit sharing vs. c++ refereces
    By IrYoKu in forum Qt Programming
    Replies: 12
    Last Post: 9th November 2011, 23:20
  2. Threads and Implicit Sharing
    By stillwaiting in forum Newbie
    Replies: 5
    Last Post: 30th November 2010, 16:46
  3. How to correctly subclass classes that use implicit sharing
    By Gh0str1d3r in forum Qt Programming
    Replies: 1
    Last Post: 16th August 2010, 09:42
  4. Implicit sharing and pointers
    By Luc4 in forum Qt Programming
    Replies: 4
    Last Post: 16th June 2010, 10:31
  5. QSharedData - implicit sharing
    By gyre in forum Newbie
    Replies: 4
    Last Post: 28th October 2007, 19:09

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.