Qt: any way to automatically generate QSharedData-based structures?

Posted by Eye of Hell on Stack Overflow See other posts from Stack Overflow or by Eye of Hell
Published on 2010-06-14T09:36:23Z Indexed on 2010/06/14 9:42 UTC
Read the original article Hit count: 212

Filed under:

Hello.

Qt has a build-in supprt for creating objects with integrated reference counting via QSharedData and QSharedDataPointer. All wordks great, but for each such object i need to write a lot of code: QSharedData-based implementation class with constructor and copy constructor, object class itsef with accessor methods for each filed. For a simple structures with 5-10 fields this requires really lot of near same code. Is it some ways to automate such classes generation? Maybe it's some generators exists that take a short description and automatically generates implementation class and object class with all accessors?

© Stack Overflow or respective owner

Related posts about qt