Menu

#13 Allow descriptors to determine their enclosing context

open
nobody
None
5
2010-03-10
2010-03-10
No

Some descriptors - particularly private ones - require to know, or are only valid within a given (private) context.
For example there are some OpenTV private data sections, and some of the private descriptors may only validly occur within a certain data section.

However as things stand, there is no context available for the descriptor to inspect, i.e. it can't ask, "am I in data section with Id = X" since there is no stateful mechanism by which the section contents are organised.

I would like to suggest some kind of hierarchical structure which gets updated/'pushed' when each containing entity is entered, and 'popped' when it is left, which allows an item to find out what it is contained within.

Maybe just a stack of objects with a type enum field, cast to and filled in with the current table fields, allowing an enclosed item to look up at its context.

Discussion


Log in to post a comment.