Results 1 to 7 of 7

Thread: Suggest me a container

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Suggest me a container

    You may need to maintain 3 containers, to achieve the specified performance.

    1. sorted with speed (to take N-fastest clients), use qSort() to sort
    2. sorted with IP/Port, use qSort() to sort then use qBinaryFind() to search
    3. the master container with actual objects, the first two contain references to this container

    you need to implement the appropriate operators (like ==, >) too use the containers (stl / qt algorithms) to be able to sort, find etc.

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

    giantdragon (3rd June 2011)

Similar Threads

  1. Do you suggest to develop a videoplayer and notetaker with QT ?
    By fenerista in forum Qt-based Software
    Replies: 4
    Last Post: 14th November 2009, 06:28
  2. Container plugins
    By Benne Gesserit in forum Qt Tools
    Replies: 4
    Last Post: 20th November 2008, 23:43
  3. Quick ? about qSort(Container & container)
    By JimDaniel in forum Qt Programming
    Replies: 2
    Last Post: 15th December 2007, 11:20
  4. Container Extensions
    By mariok in forum Qt Programming
    Replies: 1
    Last Post: 3rd July 2007, 11:06

Tags for this Thread

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.