×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Jun 2013
    Posts
    10

    Unhappy Hashmap for Fp1 Mr

    Is it a sad fact that there is no way to use RHashMap on Fp1 MR ? is there any similar Structure available to do the trick ?

    -T

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Hashmap for Fp1 Mr

    My MR SDK help does have mention of RHashMap , just saying that its not part of the public SDK. So indeed its there, and if you cna find suitable libs & headers to use it , then it is usable.

  3. #3
    Registered User
    Join Date
    Jun 2013
    Posts
    10

    Re: Hashmap for Fp1 Mr

    Location: e32hashtab.h

    This item is not part of the S60 SDK

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Hashmap for Fp1 Mr

    it means that the RHashMap is defined in e32hashtab.h, which is not included in the public SDK. Also there would be a library which has the implementation which would be needed in order to use the API.

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,698

    Re: Hashmap for Fp1 Mr

    You can get the headers from some other SDK-s (perhaps UIQ, but you can also check the more recent 'real' Symbian^3/Belle SDK-s too), or even the ex-open source Symbian^3 code (project symbiandump on SourceForge). As far as I remember, the implementation is present in euser.lib in S60 3rd MR and FP1, so you really need the headers only.

  6. #6
    Registered User
    Join Date
    Jun 2013
    Posts
    10

    Re: Hashmap for Fp1 Mr

    I now decided to do it on fp2 which has hashtable headers--
    but i can insert items but the find returns null all the time!!
    here is the code i Used

    _LIT (KOne, "1");
    HBufC* incomeVal =income.AllocL();
    RHashMap<TDesC16, TDesC16 > iIncomeMap;
    iIncomeMap.InsertL(KOne, *incomeVal );

    TDesC16 *op = iIncomeMap.Find(KOne);

    op is NULL after this!

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,698

    Re: Hashmap for Fp1 Mr

    TDes/C are behaving as abstract types, they do not contain actual data. If you really want to hash a descriptor, use TBuf.

  8. #8
    Registered User
    Join Date
    Jun 2013
    Posts
    10

    Re: Hashmap for Fp1 Mr

    RHashMap<TBuf<512>, TBuf<512> > iIncomeMap();
    TBuf<512> inckey;
    inckey.Copy(*incomekey);// trim if big
    delete incomekey;
    TBuf<512> inckey3;
    inckey3.Copy(Kone);
    iIncomeMap.InsertL (inckey, inckey3);

    this doesnt compile .. it gives a expression syntax error for iIncomeMap.InsertL (inckey, inckey3);

    I dotn understand why its complaining about syntax issue, im passing two TBuf objects as needed

  9. #9
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,041

    Re: Hashmap for Fp1 Mr

    RHashMap<TBuf<512>, TBuf<512> > iIncomeMap(); , try without () , i.e. RHashMap<TBuf<512>, TBuf<512> > iIncomeMap;

  10. #10
    Registered User
    Join Date
    Jun 2013
    Posts
    10

    Re: Hashmap for Fp1 Mr

    Then i end up with errors like

    4 Undefined symbol: 'int (*)(void const *, void const *) RHashTableBase:efaults<class TBuf<512>, 0>::Id(void) (?Id@?$Defaults@V?$TBuf@$0CAA@@@$0A@@RHashTableBase@@SAP6AHPBX0@ZXZ)' dwldr Unknown C/C++ Problem
    5 Undefined symbol: 'unsigned long (*)(void const *) RHashTableBase:efaults<class TBuf<512>, 0>::Hash(void) (?Hash@?$Defaults@V?$TBuf@$0CAA@@@$0A@@RHashTableBase@@SAP6AKPBX@ZXZ)' dwldr Unknown C/C++ Problem

  11. #11
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,041

    Re: Hashmap for Fp1 Mr


  12. #12
    Registered User
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    639

    Re: Hashmap for Fp1 Mr

    Hello,
    there's also an example about hash tables, have you already found/read it? maybe it can help
    http://devlib.symbian.slions.net/s3/...3FD843832.html

    regards,
    pg

  13. #13
    Registered User
    Join Date
    Jun 2013
    Posts
    10

    Re: Hashmap for Fp1 Mr

    I saw that example .. but i cnanot see any operatins done on a map RHashMap<TDesC16, TDesC16> hashMapDes16(); !! they have operations on other maps .. if I try operations on this map I end up with the problems i faced like getting null!!!

Similar Threads

  1. HashMap implementation
    By chandran.biju007 in forum Symbian
    Replies: 5
    Last Post: 2010-04-07, 20:30
  2. Something like a Hashmap in Symbian C++?
    By cbrueckner in forum Symbian
    Replies: 8
    Last Post: 2008-05-29, 12:26
  3. HashMap doesn't exist in MIDP 2.0
    By personne64 in forum Mobile Java General
    Replies: 3
    Last Post: 2007-04-10, 12:19
  4. HashTable, HashMap
    By khurshed79 in forum Symbian
    Replies: 0
    Last Post: 2005-08-09, 12:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×