Possible Duplicate:
How to retrieve the values for the particular key from CFMutableDictionary
In C++:
typedef struct
{
unsigned short wId;
bool bPersists;
unsigned short uPeriod;
bool bStop;
}stTimer;
unsigned short wId;
stTimer pEvent;
CTypedPtrMap<CMapWordToPtr,WORD,stTimer*>m_cIdMap;
if(m_cIdMap.Lookup(wId,pEvent))
{
//find and remove the event pEvent;
}
I need to port the same functionality to Objective-C
I could be able to set and get the values into the CFDictionary, but I need to do look ups into the dictionary with the wId(key) and the pEvent(value).
You would use an NSDictionary and box the keys with NSNumber (assuming you have created a class to represent your stTimer struct.
I don’t see any point of going for a lower level interface. You might as well stick with the C++ version.