Boost logo

Boost Users :

From: Filip Konvička (filip.konvicka_at_[hidden])
Date: 2007-05-29 17:18:38


Bill Buklis 29.5.2007 18:56:
> Sub-patterns are done by using independent visualizer patterns for that
> type. Of course, this isn't always practical when using complex templates. I
> ran into this problem for ptr_map. I wanted to express ptr_map's underyling
> std::map<key,void*>, but couldn't because there was no way to include a
> visualizer just for std::map<key,void*>. How could I possibly convert void*
> without knowing what it is?
>
Sure, but I needed to pattern-match the watched expression's parent
class in this way, which is not possible. The primary pattern in my
example was multi_index_container<*,*,*>, and I wanted another match as
header_holder<*,*> or something like this. The debugger just can not
match the header_holder. The problem is that the pattern matching
mechanism works at the most-derived-class level, and the parent classes
can not be accessed AFAIK.
> My workaround was to display the "keys" in the preview and the "values" in
> the expansion. If I could've defined a sub-pattern than I could've done the
> same thing as std::map and show both keys and values in the preview and in
> expansion.
>
> For multi-index the templates are complex enough that I'm not sure you'll be
> able to separate out the sub-members and express them using a unique
> visualizer. Maybe.
>
All I wanted was a simple list-like view of the members, which is
possible with indexed_by<sequenced<> >. So I hoped that there would be a
way to (perhaps) utilize the raw store, or something like this...

Cheers,
Filip


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net