Results 1 to 4 of 4

Thread: Replacement for CMapStringToPtr

  1. #1
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Replacement for CMapStringToPtr

    Hi all,

    what is the replacement for CMapStringToPtr in qt to store maps of void pointers ?
    Thanks,
    Rajesh.S

  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: Replacement for CMapStringToPtr

    What is exactly that you want to implement?
    In what way QMap does not answer your needs?
    ==========================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
    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: Replacement for CMapStringToPtr

    Let's see... We have a class that has a name "C"-"Map"-"String"-"To"-"Pointer". After accessing assistant and typing in "Map" you'll see QMap that is a template class that takes two parameters. First one is the key type and the other the value type, so without having any knowledge of Qt you might deduce a QMap<String,Pointer> combination and with a bit of knowledge of C++ and Qt you'd turn it into QMap<QString,void*>.

    If you have any other similar doubts, please conduct a process such as described above before asking such questions.

  4. The following user says thank you to wysota for this useful post:

    rajeshs (21st December 2007)

  5. #4
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Replacement for CMapStringToPtr

    sorry , here onwards i will definitly follow your way,

    I was thinking before exact matching is there in Qt.
    Thanks,
    Rajesh.S

Similar Threads

  1. Replacement for MESSAGE_MAP()
    By krishbhala in forum Qt Programming
    Replies: 2
    Last Post: 4th December 2007, 16:20
  2. Console replacement
    By aegis in forum Qt Programming
    Replies: 14
    Last Post: 3rd April 2007, 01:38
  3. Replies: 2
    Last Post: 28th March 2007, 11:54

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.