SymbolGroupNodeVisitor Class

The SymbolGroupNodeVisitor class is a visitor that iterates over the nodes and builds the full iname path ('local.foo.bar') that is required for GDBMI dumping. More...

Header: #include <SymbolGroupNodeVisitor>
Inherited By:

DebugSymbolGroupNodeVisitor and DumpSymbolGroupNodeVisitor

Public Functions

virtual ~SymbolGroupNodeVisitor() = default

Static Public Members

std::string parentIname(const std::string &iname)

Protected Types

enum VisitResult { VisitContinue, VisitSkipChildren, VisitStop }

Protected Functions

SymbolGroupNodeVisitor() = default
virtual void childrenVisited(const AbstractSymbolGroupNode *node, unsigned depth)
virtual bool sortChildrenAlphabetically() const
virtual VisitResult visit(AbstractSymbolGroupNode *node, const std::string &fullIname, unsigned child, unsigned depth) = 0

Detailed Description

The SymbolGroupNodeVisitor class is a visitor that iterates over the nodes and builds the full iname path ('local.foo.bar') that is required for GDBMI dumping.

The full name depends on the path on which a node was reached for referenced nodes (a linked list element can be reached via array index or by expanding the whole structure). visit() is not called for the (invisible) root node, but starting with the root's children with depth=0. Return VisitStop from visit() to terminate the recursion.

Member Type Documentation

enum SymbolGroupNodeVisitor::VisitResult

Member Function Documentation

[default protected] SymbolGroupNodeVisitor::SymbolGroupNodeVisitor()

Default constructs an instance of SymbolGroupNodeVisitor.

[default] SymbolGroupNodeVisitor::~SymbolGroupNodeVisitor()

Destroys the instance of SymbolGroupNodeVisitor. The destructor is virtual.

[virtual protected] void SymbolGroupNodeVisitor::childrenVisited(const AbstractSymbolGroupNode *node, unsigned depth)

[static] std::string SymbolGroupNodeVisitor::parentIname(const std::string &iname)

[virtual protected] bool SymbolGroupNodeVisitor::sortChildrenAlphabetically() const

[pure virtual protected] VisitResult SymbolGroupNodeVisitor::visit(AbstractSymbolGroupNode *node, const std::string &fullIname, unsigned child, unsigned depth)