Anyone knows how to create the hash map using structure

A

Amit

Hi ,

Anyone knows how to create the hash map using structure


typedef struct _STID1ID2ID3
{
ACE_UINT32 ID1;
ACE_UINT8 ID2;
ACE_UINT16 ID3;


bool operator == (const _stIPIDDetails &rhs) const
{
return (memcmp(&ID1, &rhs.ID1, sizeof(ACE_UINT32)) == 0);
}


ACE_UINT32 hash() const
{
return ??????????????????;
}



}STID1ID2ID3;


typedef ACE_Hash_Map_Manager_Ex<STID1ID2ID3, STInfo ,
ACE_Hash<STID1ID2ID3>, ACE_Equal_To<STID1ID2ID3>, ACE_Mutex> HMap;
 
A

Amit

Hi,

I want to use ACE hash map for structure as key, thats why i need hash
function.

Thanks
Amit Papriwal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top