Hi,
I am trying to create a native visualizer for a linked list.
The only way to know when the end of the list is reached is that there is an end item, the address of which is stored in the top level list object. Therefore the next pointer must be compared with the end pointer to determine if the end of the list has been reached.
The problem is that I can't see how to access the end pointer from within <NextPointer> because I need to reference relative to the list object and not the node object.
Is there any way to refer back to the list from within <NextPointer>
Changing the list implementation is not an option btw :)
Here is the code, which doesn't work because $LIST is not defined:
<Type Name="stlpd_std::list<*>"><Expand><LinkedListItems><HeadPointer>(stlpd_std::_List_node<$T1>*)(_M_node._M_data._M_next)</HeadPointer><NextPointer>(stlpd_std::_List_node<$T1>*)((_M_next!=&$LIST._M_node._M_data)?_M_next:0)</NextPointer><ValueNode>_M_data</ValueNode></LinkedListItems></Expand></Type>
What I need is something to replace $LIST that gives a reference to the list object.
Thanks!
Jeremy