Basically its loading of xml data but it has following 3 properties to be satisfied
- repetitive (key value pair can repeat)
- mu开发者_运维知识库ltivalued (single key have multiple value)
In both cases I need to preserve the order of data.
It depends on your complexity requirements (or your expected data complexity), but I used once a multimap<Key, list<Value> >
for some project.
I'm not a C++ programmer but this looks like a linked list of linked lists to me.
You can consider using composite design pattern. This link has some relevant information for this context.
No single data structure will satisfy all of these properties. You will have to use inheritance and mix data structures at runtime.
精彩评论