Boost logo

Boost Users :

From: Filip Konvička (filip.konvicka_at_[hidden])
Date: 2007-06-04 02:45:05


>>>>> It seems that accessing node_count using the same technique
>>>>> as with ordered_unique does not work - I'm off by 4 bytes
>>>>> (see the (((char*)&$c)+4) expression).
>>>>>
> Umm... I've been thinking a little more about this and it turns
> out that we can do the downcast legally without resorting
> to the multi_index_helper_3 hack. The following should work for
> any kind of header_holder:
>
> size : (($T2*)&$c)->node_count
>
> because T2 actually derives from header_holder<*,T2>. This
> would allow us to dispense with multi_index_helper_3 entirely.
> Can you check this out?
>
:-D of course it works. It seems that I'm no longer thinking of using
the simplest and most obvious solutions.
 Thanks! I'll use this for all the visualizers.

I am now able to display the array of buckets, I am able to tell an
empty bucket from a non-empty one, and I am able to display the nodes in
each non-empty bucket. Now I need to access the data. You said that the
node that is in the array itself is not a data bucket, so I suppose that
I need to start from .next_ and try to retrieve the data. What cast
should I do here?

Thanks,
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