I'm planning to create a class representing a html table, problem is that it must be able to contain 3+ dimensions, one dimension will be the width of course, the rest will be along the length like this:
foo1:bar1
foo1:bar2
foo2:bar1
foo2:bar2
etc.
Now I'm contemplating how to represent this in my class, my idea is to use a multi-level dictionary, i.e. one that can be indexed like this: myDict[fooKey][barKey][...]
, is that a good idea? Is it possible? How?
Can I let the user of the class give it any Dictionary along with an int depth and then cast to dictionary when using the class internally?
edit: Seems like I was a bit unclear, there is a practical depth limit obviously, but I'd prefer to code it for any depth, the depth should be given by the user of the class.