Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 29 additions & 30 deletions VS2017/Visualizers/boost_MultiIndex.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -54,39 +54,38 @@
</Expand>
</Type>

<Type Name="boost::multi_index::detail::header_holder&lt;boost::multi_index::detail::hashed_index_node&lt;*,*&gt;*,*&gt;">
<DisplayString>{{ size={(($T3*)this)-&gt;node_count} }}</DisplayString>
<Type Name="boost::multi_index::detail::header_holder&lt;boost::multi_index::detail::hashed_index_node&lt;*&gt;*,*&gt;">
<DisplayString>{{ size={ (($T2*)this)-&gt;node_count } }}</DisplayString>
<Expand>
<!--Easier to take size from auto_space<...> since it always +1 from real size-->
<Item Name="[buckets]" IncludeView="detailed">(($T3*)this)-&gt;buckets.spc.n_ - 1</Item>
<Item Name="[max_load]" IncludeView="detailed">(($T3*)this)-&gt;max_load</Item>
<Item Name="[max_load_factor]" IncludeView="detailed">(($T3*)this)-&gt;mlf</Item>
<Item Name="[key_eq]" IncludeView="detailed">(($T3*)this)-&gt;eq_</Item>
<Item Name="[hash_function]" IncludeView="detailed">(($T3*)this)-&gt;hash_</Item>
<Item Name="[buckets]" IncludeView="detailed">(($T2*)this)-&gt;buckets.spc.n_ - 1</Item>
<Item Name="[max_load]" IncludeView="detailed">(($T2*)this)-&gt;max_load</Item>
<Item Name="[max_load_factor]" IncludeView="detailed">(($T2*)this)-&gt;mlf</Item>
<Item Name="[key_eq]" IncludeView="detailed">(($T2*)this)-&gt;eq_</Item>
<Item Name="[hash_function]" IncludeView="detailed">(($T2*)this)-&gt;hash_</Item>
<CustomListItems>
<Variable Name="NumBuckets" InitialValue="(($T3*)this)-&gt;buckets.spc.n_ - 1"/>
<Variable Name="BucketIndex" InitialValue="0"/>
<Variable Name="NodePtr" InitialValue="(boost::multi_index::detail::hashed_index_node_trampoline&lt;$T1&gt;*)nullptr"/>

<!-- Iterate through all buckets -->
<Loop>
<Break Condition="BucketIndex == NumBuckets"/>

<!-- If bucket is not empty -->
<Exec>NodePtr = (boost::multi_index::detail::hashed_index_node_trampoline&lt;$T1&gt;*)((((($T3*)this)-&gt;buckets.spc.data_ + BucketIndex))-&gt;prior_)</Exec>
<If Condition="NodePtr != nullptr">
<!-- Let's iterate over its nodes -->
<Loop>
<Item>*reinterpret_cast&lt;$T3::value_type*&gt;(&amp;(((boost::multi_index::detail::hashed_index_node&lt;$T1,$T2&gt;*)NodePtr))-&gt;space)</Item>

<!-- Tricky (but legal) check that node is last -->
<Break Condition="NodePtr-&gt;next_-&gt;prior_ != NodePtr"/>
<Exec>NodePtr = (boost::multi_index::detail::hashed_index_node_trampoline&lt;$T1&gt;*)(NodePtr-&gt;next_)</Exec>
</Loop>
</If>

<Exec>++BucketIndex</Exec>
</Loop>
<Variable Name="NumBuckets" InitialValue="(($T2*)this)-&gt;buckets.spc.n_ - 1"/>
<Variable Name="BucketIndex" InitialValue="0"/>
<Variable Name="NodePtr" InitialValue="(boost::multi_index::detail::hashed_index_node_trampoline&lt;$T1&gt;*)nullptr"/>

<!--Iterate through all buckets-->
<Loop>
<Break Condition="BucketIndex == NumBuckets"/>

<!--If bucket is not empty-->
<Exec>NodePtr = (boost::multi_index::detail::hashed_index_node_trampoline&lt;$T1&gt;*)((((($T2*)this)-&gt;buckets.spc.data_ + BucketIndex))-&gt;prior_)</Exec>
<If Condition="NodePtr != nullptr">
<!--Let's iterate over its nodes-->
<Loop>
<Item>*reinterpret_cast&lt;$T2::value_type*&gt;(&amp;(((boost::multi_index::detail::hashed_index_node&lt;$T1&gt;*)NodePtr))-&gt;space)</Item>
<!--Tricky (but legal) check that node is last-->
<Break Condition="NodePtr-&gt;next_-&gt;prior_ != NodePtr"/>
<Exec>NodePtr = (boost::multi_index::detail::hashed_index_node_trampoline&lt;$T1&gt;*)(NodePtr-&gt;next_)</Exec>
</Loop>
</If>

<Exec>++BucketIndex</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>
Expand Down
60 changes: 29 additions & 31 deletions VS2019/Visualizers/boost_MultiIndex.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -54,41 +54,39 @@
</Expand>
</Type>

<Type Name="boost::multi_index::detail::header_holder&lt;boost::multi_index::detail::hashed_index_node&lt;*,*&gt;*,*&gt;">
<DisplayString>{{ size={(($T3*)this)-&gt;node_count} }}</DisplayString>
<Type Name="boost::multi_index::detail::header_holder&lt;boost::multi_index::detail::hashed_index_node&lt;*&gt;*,*&gt;">
<DisplayString>{{ size={ (($T2*)this)-&gt;node_count } }}</DisplayString>
<Expand>
<!--Easier to take size from auto_space<...> since it always +1 from real size-->
<Item Name="[buckets]" IncludeView="detailed">(($T3*)this)-&gt;buckets.spc.n_ - 1</Item>
<Item Name="[max_load]" IncludeView="detailed">(($T3*)this)-&gt;max_load</Item>
<Item Name="[max_load_factor]" IncludeView="detailed">(($T3*)this)-&gt;mlf</Item>
<Item Name="[key_eq]" IncludeView="detailed">(($T3*)this)-&gt;eq_</Item>
<Item Name="[hash_function]" IncludeView="detailed">(($T3*)this)-&gt;hash_</Item>
<Item Name="[buckets]" IncludeView="detailed">(($T2*)this)-&gt;buckets.spc.n_ - 1</Item>
<Item Name="[max_load]" IncludeView="detailed">(($T2*)this)-&gt;max_load</Item>
<Item Name="[max_load_factor]" IncludeView="detailed">(($T2*)this)-&gt;mlf</Item>
<Item Name="[key_eq]" IncludeView="detailed">(($T2*)this)-&gt;eq_</Item>
<Item Name="[hash_function]" IncludeView="detailed">(($T2*)this)-&gt;hash_</Item>
<CustomListItems>
<Variable Name="NumBuckets" InitialValue="(($T3*)this)-&gt;buckets.spc.n_ - 1"/>
<Variable Name="BucketIndex" InitialValue="0"/>
<Variable Name="NodePtr" InitialValue="(boost::multi_index::detail::hashed_index_node_trampoline&lt;$T1&gt;*)nullptr"/>

<!-- Iterate through all buckets -->
<Loop>
<Break Condition="BucketIndex == NumBuckets"/>

<!-- If bucket is not empty -->
<Exec>NodePtr = (boost::multi_index::detail::hashed_index_node_trampoline&lt;$T1&gt;*)((((($T3*)this)-&gt;buckets.spc.data_ + BucketIndex))-&gt;prior_)</Exec>
<If Condition="NodePtr != nullptr">
<!-- Let's iterate over its nodes -->
<Loop>
<Item>*reinterpret_cast&lt;$T3::value_type*&gt;(&amp;(((boost::multi_index::detail::hashed_index_node&lt;$T1,$T2&gt;*)NodePtr))-&gt;space)</Item>

<!-- Tricky (but legal) check that node is last -->
<Break Condition="NodePtr-&gt;next_-&gt;prior_ != NodePtr"/>
<Exec>NodePtr = (boost::multi_index::detail::hashed_index_node_trampoline&lt;$T1&gt;*)(NodePtr-&gt;next_)</Exec>
</Loop>
</If>

<Exec>++BucketIndex</Exec>
</Loop>
<Variable Name="NumBuckets" InitialValue="(($T2*)this)-&gt;buckets.spc.n_ - 1"/>
<Variable Name="BucketIndex" InitialValue="0"/>
<Variable Name="NodePtr" InitialValue="(boost::multi_index::detail::hashed_index_node_trampoline&lt;$T1&gt;*)nullptr"/>

<!--Iterate through all buckets-->
<Loop>
<Break Condition="BucketIndex == NumBuckets"/>

<!--If bucket is not empty-->
<Exec>NodePtr = (boost::multi_index::detail::hashed_index_node_trampoline&lt;$T1&gt;*)((((($T2*)this)-&gt;buckets.spc.data_ + BucketIndex))-&gt;prior_)</Exec>
<If Condition="NodePtr != nullptr">
<!--Let's iterate over its nodes-->
<Loop>
<Item>*reinterpret_cast&lt;$T2::value_type*&gt;(&amp;(((boost::multi_index::detail::hashed_index_node&lt;$T1&gt;*)NodePtr))-&gt;space)</Item>
<!--Tricky (but legal) check that node is last-->
<Break Condition="NodePtr-&gt;next_-&gt;prior_ != NodePtr"/>
<Exec>NodePtr = (boost::multi_index::detail::hashed_index_node_trampoline&lt;$T1&gt;*)(NodePtr-&gt;next_)</Exec>
</Loop>
</If>

<Exec>++BucketIndex</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>

</AutoVisualizer>