c++ - Alternative to map<someKey , map<anotherKey,Identifier > > -


i assign data for each pair of (pointer object, name of method in object), later efficiently retrieve data knowing pointer object , name of method.

class object; class data; 

which container work better:

std::map<object*,std::map<std::string, data> > container; 

or

std::map<std::pair<object*,std::string>,data > container; 

or, should use else? please note of objects have 1 method, few objects having more 1 method.

p.s. "work better" mean optimizing speed of access.

you mentioned using qt , object qobject. qt has dynamic properties can used attach data specific instance of qobject setproperty member function.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -