Boost logo

Boost Users :

From: Filip Konvička (filip.konvicka_at_[hidden])
Date: 2007-05-28 10:47:20


> Thanks for now! Now I'll try to make a visualizer for this container and
> see if that can be extended to other containers.
>

OK, here is a visualizer for multi_index_container<T,
indexed_by<sequenced<> > >.

I have not succeeded in expanding this to other index combinations, as
the visualizer does not seem to support "::type" to access typedefs.
When I want to access the "member" member of the container, I need to
explicitly specify the header_holder template instantiation, which seems
impossible, since it takes - as the first argument - an index_node type
structure, which seems to be declared as
boost::multi_index::detail::multi_index_node_type<Value,IndexSpecifierList,Allocator>::type,
but this is not accessible in the visualizer (it does not like the
"::type" part). I'm afraid that there's no way around this, but I'll try
tomorrow.

Cheers,
Filip


;-------------------------------
; boost::multi_index_container
; template arguments are:
; item type, indexed_by stuff, allocator
;
; *** to get to the member field: A=((boost::multi_index::detail::header_holder<boost::multi_index::detail::sequenced_index_node<boost::multi_index::detail::index_node_base<$T1> >,boost::multi_index::multi_index_container<$T1,$T2,$T3> >*)&$c)->member
; *** to get to the next_ field: B=(boost::multi_index::detail::sequenced_index_node_impl*)(boost::multi_index::detail::sequenced_index_node_trampoline<boost::multi_index::detail::index_node_base<$T1> >*)(A)->next_
; *** to get to the node: C=(boost::multi_index::detail::index_node_base<$T1>*)(boost::multi_index::detail::sequenced_index_node<boost::multi_index::detail::index_node_base<$T1> >*)(boost::multi_index::detail::sequenced_index_node_trampoline<boost::multi_index::detail::index_node_base<$T1> >*)(B)
; *** (possibly unsafe?) to get to the value: ($T1&)(C)
;-------------------------------
boost::multi_index::multi_index_container<*,*,*>{
 preview(#($c.node_count, " items"))
 children(
   #(
       #list (
               head : *((boost::multi_index::detail::sequenced_index_node_impl*)(boost::multi_index::detail::sequenced_index_node_trampoline<boost::multi_index::detail::index_node_base<$T1> >*)(((boost::multi_index::detail::header_holder<boost::multi_index::detail::sequenced_index_node<boost::multi_index::detail::index_node_base<$T1> >,boost::multi_index::multi_index_container<$T1,$T2,$T3> >*)&$c)->member)->next_),
               size : $c.node_count,
               next : next_
       ) : ($T1&)(boost::multi_index::detail::index_node_base<$T1>*)(boost::multi_index::detail::sequenced_index_node<boost::multi_index::detail::index_node_base<$T1> >*)(boost::multi_index::detail::sequenced_index_node_trampoline<boost::multi_index::detail::index_node_base<$T1> >*)(&$e),
     item count: [$c.node_count],
     original members: [$c,!]
   )
 )
}


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