Version 1 (modified by bacek, 12 years ago)

--

Idea of refactoring Key PMC

Current Keys are messy and incomprehensible. So there is idea of refactoring them into something more sane.

Keys currently serve only one purpose: navigate in nested containers. Iteration over containers was removed as part of key_revamp branch. To support this functionality more implicit and in clean way we will:

1. Add KeyItem interface class to represent single abstract step.

2. Implement StringKeyItem, IntegerKeyItem and PMCKeyItem to store concrete value for each step. Such FooKeyItem will implement get_foo vtable methods, freeze/thaw and nothing else. We don't need FloatKeyItem because float keys are meaningless.

3. Re-implement Key as:

  1. RPA for storing *KeyItem.
  1. Various push_foo vtables to create specific FooKeyItem and append it to path.