class PrettyRecursiveVariant
Defined at line 260 of file ../../src/developer/debug/zxdb/expr/pretty_type.h
Generic variants in C++ are normally implemented as a nested list of unions. This allows a
generic number of possibilities for the variant value by using the type system to implement
recursion.
Public Methods
void PrettyRecursiveVariant (const std::string &simple_type_name,const std::string &base_expr,const std::string &index_expr,const std::string &next_expr,const std::string &value_expr,const std::string &no_value_string,std::initializer_list<std::pair<std::string, std::string>>getters)
To get to the value, this class constructs an expression based on the "index_expr" which is
an expression that should evaluate to an integer. The pattern will be:
<base
_expr> . (
<next
_expr> * index ) .
<value
_expr>
So if index_expr evaluates to 2 and given simple neams for each item, it will produce:
"base.next.next.value"
If the index casted to a signed integer is negative, the value will be reported as the
"no_value_string".
Defined at line 270 of file ../../src/developer/debug/zxdb/expr/pretty_type.h
void Format (FormatNode *node,const FormatOptions &options,const fxl::RefPtr<EvalContext> &context,fit::deferred_callbackcb)
Defined at line 640 of file ../../src/developer/debug/zxdb/expr/pretty_type.cc