Results 1 to 9 of 9

Thread: Virtual static methods alternative :D

Threaded View

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

    Default Re: Virtual static methods alternative :D

    Quote Originally Posted by hickscorp View Post
    So how the DBHelper will "know" it will have to instanciate a DBEmployee for each resultset?
    You will ask it to do so.
    Qt Code:
    1. QList< DBConferenceRoom * > DBConferenceRoom::findByHalleyCode( const QString & code )
    2. {
    3. return DBHelper::find< DBConferenceRoom * >( "conference_rooms", "halley_code", code );
    4. }
    5.  
    6. QList< DBEmployee * > DBEmployee::findByName( const QString & name )
    7. {
    8. return DBHelper::find< DBEmployee *>( "employees", "name", name );
    9. }
    To copy to clipboard, switch view to plain text mode 

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

    hickscorp (3rd January 2008)

Similar Threads

  1. Replies: 16
    Last Post: 23rd May 2008, 10:12

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.