-
Notifications
You must be signed in to change notification settings - Fork 19
/
bpptree.natvis
77 lines (77 loc) · 4.06 KB
/
bpptree.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
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="b_plus_plus_tree<*>">
<DisplayString>{{ size={root_.parent->size} }}</DisplayString>
<Expand>
<Item Name="[comparator]" ExcludeView="simple">(key_compare &)root_</Item>
<Item Name="[allocator]" ExcludeView="simple">(node_allocator_t &)root_</Item>
<Item Name="[raw]">root_</Item>
<CustomListItems Condition="root_.parent->size != 0">
<Variable InitialValue="root_.left" Name="node"/>
<Variable InitialValue="0" Name="where"/>
<Variable InitialValue="0" Name="index"/>
<Loop>
<If Condition="where >= node->size">
<Exec>node = ((leaf_node_t *)node)->next</Exec>
<Exec>where = 0</Exec>
</If>
<If Condition="node->size == 0">
<Break/>
</If>
<Item Name="[{index}]">((leaf_node_t *)node)->item[where]</Item>
<Exec>++where</Exec>
<Exec>++index</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>
<Type Name="b_plus_plus_tree<*>::iterator">
<AlternativeType Name="b_plus_plus_tree<*>::const_iterator" />
<AlternativeType Name="b_plus_plus_tree<*>::reverse_iterator" />
<AlternativeType Name="b_plus_plus_tree<*>::const_reverse_iterator" />
<DisplayString Condition="node->size != 0">{((leaf_node_t *)node)->item[where]}</DisplayString>
<DisplayString Condition="node->size == 0">end</DisplayString>
<Expand>
<Item Condition="node->size != 0" Name="[ptr]">((leaf_node_t *)node)->item[where]</Item>
</Expand>
</Type>
<Type Name="b_plus_plus_tree<*>::key_stack_t">
<DisplayString Condition="true">{*(key_type *)&key_pod}</DisplayString>
</Type>
<Type Name="b_plus_plus_tree<*>::node_t">
<DisplayString Condition="size == 0">{{ root:size={parent->size} }}</DisplayString>
<DisplayString Condition="level != 0 && size != 0">{{ inner:size={size},used={((inner_node_t *)this)->used + 1} }}</DisplayString>
<DisplayString Condition="level == 0 && size != 0 ">{{ leaf:size={size} }}</DisplayString>
<Expand>
<Item Name="[size]">size</Item>
<Item Name="[root]" Condition="size == 0 && parent->size > 0">((root_node_t *)this)->parent</Item>
<Item Name="[most left]" Condition="size == 0 && parent->size > 0">((root_node_t *)this)->left</Item>
<Item Name="[most right]" Condition="size == 0 && parent->size > 0">((root_node_t *)this)->right</Item>
<Item Name="[bound]" Condition="level != 0 && size != 0">((inner_node_t *)this)->used + 1</Item>
<Item Name="[bound]" Condition="level == 0 && size != 0">size</Item>
<Item Name="[prev]" Condition="level == 0 && size != 0">((leaf_node_t *)this)->prev</Item>
<Item Name="[next]" Condition="level == 0 && size != 0">((leaf_node_t *)this)->next</Item>
<CustomListItems Condition="level != 0 && size != 0">
<Variable InitialValue="0" Name="index"/>
<Loop>
<If Condition="index > ((inner_node_t *)this)->used">
<Break/>
</If>
<Item Condition="index < ((inner_node_t *)this)->used" Name="[{((inner_node_t *)this)->item[index]}]">((inner_node_t *)this)->children[index]</Item>
<Item Condition="index == ((inner_node_t *)this)->used" Name="[over]">((inner_node_t *)this)->children[index]</Item>
<Exec>++index</Exec>
</Loop>
</CustomListItems>
<CustomListItems Condition="level == 0 && size != 0">
<Variable InitialValue="0" Name="index"/>
<Loop>
<If Condition="index >= ((leaf_node_t *)this)->size">
<Break/>
</If>
<Item Name="[{index}]">((leaf_node_t *)this)->item[index]</Item>
<Exec>++index</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>
</AutoVisualizer>