-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoostMultiIndex.natvis
94 lines (84 loc) · 5.64 KB
/
BoostMultiIndex.natvis
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 Anton Tokar <anton@tokar.xyz>
Use, modification and distribution are subject
to the Boost Software License, Version 1.0. (See accompanying file LICENSE
or copy at http://www.boost.org/LICENSE_1_0.txt) -->
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<!-- Sequenced index represents linked list (std::list-like) -->
<Type Name="boost::multi_index::detail::header_holder<boost::multi_index::detail::sequenced_index_node<*>*,*>">
<DisplayString>{{ size={(($T2*)this)->node_count} }}</DisplayString>
<Expand>
<LinkedListItems>
<Size>(($T2*)this)->node_count</Size>
<HeadPointer>((boost::multi_index::detail::sequenced_index_node<$T1>*)(member))->next_</HeadPointer>
<NextPointer>next_</NextPointer>
<ValueNode>*reinterpret_cast<$T2::value_type*>(&((boost::multi_index::detail::sequenced_index_node<$T1>*)this)->space)</ValueNode>
</LinkedListItems>
</Expand>
</Type>
<!-- Ordered index represents red-black tree (std::set-like) -->
<Type Name="boost::multi_index::detail::header_holder<boost::multi_index::detail::ordered_index_node<*,*>*,*>" Priority="Medium">
<DisplayString>{{ size={(($T3*)this)->node_count} }}</DisplayString>
<Expand>
<!-- Visualization for ordered_index_node_compressed_base (reduced node size) -->
<TreeItems Optional="true">
<Size>(($T3*)this)->node_count</Size>
<HeadPointer>(boost::multi_index::detail::ordered_index_node_trampoline<$T1,$T2>*)(((boost::multi_index::detail::ordered_index_node_trampoline<$T1,$T2>*)(member))->parentcolor_&~uintptr_type(1))</HeadPointer>
<LeftPointer>(boost::multi_index::detail::ordered_index_node_trampoline<$T1,$T2>*)left_</LeftPointer>
<RightPointer>(boost::multi_index::detail::ordered_index_node_trampoline<$T1,$T2>*)right_</RightPointer>
<ValueNode>*reinterpret_cast<$T3::value_type*>(&((boost::multi_index::detail::ordered_index_node<$T1,$T2>*)this)->space)</ValueNode>
</TreeItems>
<!-- Visualization for ordered_index_node_std_base (full node size) -->
<TreeItems Optional="true">
<Size>(($T3*)this)->node_count</Size>
<HeadPointer>(boost::multi_index::detail::ordered_index_node_trampoline<$T1,$T2>*)(((boost::multi_index::detail::ordered_index_node_trampoline<$T1,$T2>*)(member))->parent_)</HeadPointer>
<LeftPointer>(boost::multi_index::detail::ordered_index_node_trampoline<$T1,$T2>*)left_</LeftPointer>
<RightPointer>(boost::multi_index::detail::ordered_index_node_trampoline<$T1,$T2>*)right_</RightPointer>
<ValueNode>*reinterpret_cast<$T3::value_type*>(&((boost::multi_index::detail::ordered_index_node<$T1,$T2>*)this)->space)</ValueNode>
</TreeItems>
</Expand>
</Type>
<!-- Random access index represents continuous memory range (std::vector-like) -->
<Type Name="boost::multi_index::detail::header_holder<boost::multi_index::detail::random_access_index_node<*>*,*>">
<DisplayString>{{ size={(($T2*)this)->node_count} }}</DisplayString>
<Expand>
<Item Name="[capacity]">(($T2*)this)->ptrs.capacity_</Item>
<IndexListItems>
<Size>(($T2*)this)->node_count</Size>
<ValueNode>*reinterpret_cast<$T2::value_type*>(&((boost::multi_index::detail::random_access_index_node<$T1>*)((($T2*)this)->ptrs.spc.data_[$i]))->space)</ValueNode>
</IndexListItems>
</Expand>
</Type>
<Type Name="boost::multi_index::detail::header_holder<boost::multi_index::detail::hashed_index_node<*,*>*,*>">
<DisplayString>{{ size={(($T3*)this)->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)->buckets.spc.n_ - 1</Item>
<Item Name="[max_load]" IncludeView="detailed">(($T3*)this)->max_load</Item>
<Item Name="[max_load_factor]" IncludeView="detailed">(($T3*)this)->mlf</Item>
<Item Name="[key_eq]" IncludeView="detailed">(($T3*)this)->eq_</Item>
<Item Name="[hash_function]" IncludeView="detailed">(($T3*)this)->hash_</Item>
<CustomListItems>
<Variable Name="NumBuckets" InitialValue="(($T3*)this)->buckets.spc.n_ - 1"/>
<Variable Name="BucketIndex" InitialValue="0"/>
<Variable Name="NodePtr" InitialValue="(boost::multi_index::detail::hashed_index_node_trampoline<$T1>*)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<$T1>*)((((($T3*)this)->buckets.spc.data_ + BucketIndex))->prior_)</Exec>
<If Condition="NodePtr != nullptr">
<!-- Let's iterate over its nodes -->
<Loop>
<Item>*reinterpret_cast<$T3::value_type*>(&(((boost::multi_index::detail::hashed_index_node<$T1,$T2>*)NodePtr))->space)</Item>
<!-- Tricky (but legal) check that node is last -->
<Break Condition="NodePtr->next_->prior_ != NodePtr"/>
<Exec>NodePtr = (boost::multi_index::detail::hashed_index_node_trampoline<$T1>*)(NodePtr->next_)</Exec>
</Loop>
</If>
<Exec>++BucketIndex</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>
</AutoVisualizer>