Results 1 to 9 of 9

Thread: wrapper of methods

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    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: wrapper of methods

    Quote Originally Posted by mickey View Post
    why I shouldn't use pointertomembers.
    They're ugly, so if you want ot use them, hide them inside the class.

    Quote Originally Posted by mickey View Post
    Anyway: What do you suggest for this case? The same?
    How about this?

    Qt Code:
    1. TransformationFactory::TransformationFactory()
    2. {
    3. transformations[ SomeTransformation ] = new SomeTransformation();
    4. ...
    5. }
    6.  
    7. const Transformation * TransformationFactory::get( TransformationType type )
    8. {
    9. return transformations[ type ];
    10. }
    11.  
    12. ...
    13.  
    14. transformedVector = factory.get( SomeTransformation )->transform( originalVector );
    To copy to clipboard, switch view to plain text mode 
    Last edited by jacek; 14th August 2008 at 20:13. Reason: typo

Similar Threads

  1. How to access OCX methods and events
    By joy in forum Qt Programming
    Replies: 4
    Last Post: 1st May 2018, 16:37
  2. QComboBox - Few virtual methods
    By gruszczy in forum Qt Programming
    Replies: 17
    Last Post: 16th July 2008, 16:08
  3. Signal/Slot methods
    By Micawber in forum Newbie
    Replies: 4
    Last Post: 3rd August 2007, 15:23
  4. can't reuse a pure c++ .h file's methods and classes
    By sincnarf in forum General Programming
    Replies: 11
    Last Post: 3rd August 2007, 03:39
  5. The Methods of quick search...
    By Xagen in forum General Discussion
    Replies: 1
    Last Post: 27th February 2006, 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
  •  
Qt is a trademark of The Qt Company.