class FoundName
Defined at line 18 of file ../../src/developer/debug/zxdb/expr/found_name.h
This class represents the result of looking up a variable by name. It could be a local or global
variable (simple Variable* object), or it could be a member of the current implicit object
("this" in C++). This class represents either state.
Public Methods
void FoundName ()
Default constructor for a "not found" name.
Defined at line 15 of file ../../src/developer/debug/zxdb/expr/found_name.cc
void FoundName (Kind kind, ParsedIdentifier name)
Constructor for templates and namespaces that have no extra data.
Defined at line 17 of file ../../src/developer/debug/zxdb/expr/found_name.cc
void FoundName (const Variable * variable)
Takes a reference to the object.
Defined at line 22 of file ../../src/developer/debug/zxdb/expr/found_name.cc
void FoundName (const Function * function)
Defined at line 24 of file ../../src/developer/debug/zxdb/expr/found_name.cc
void FoundName (const Symbol * symbol)
Takes a reference to the object. This will forward to variable/function if the Symbol is of
that type, otherwise it will be an "other symbol".
Defined at line 26 of file ../../src/developer/debug/zxdb/expr/found_name.cc
void FoundName (const Variable * object_ptr, FoundMember member)
Constructor for data member variables. The object_ptr may be null if this represents a query on
a type with no corresponding variable).
Defined at line 39 of file ../../src/developer/debug/zxdb/expr/found_name.cc
void FoundName (const Variable * object_ptr, InheritancePath path, const DataMember * data_member)
Defined at line 42 of file ../../src/developer/debug/zxdb/expr/found_name.cc
void FoundName (fxl::RefPtr<Type> type)
Constructor for types.
Defined at line 48 of file ../../src/developer/debug/zxdb/expr/found_name.cc
void ~FoundName ()
Defined at line 50 of file ../../src/developer/debug/zxdb/expr/found_name.cc
ParsedIdentifier GetName ()
Abstracts away the kind and returns the full name of the match.
Defined at line 52 of file ../../src/developer/debug/zxdb/expr/found_name.cc
Kind kind ()
Defined at line 58 of file ../../src/developer/debug/zxdb/expr/found_name.h
bool is_found ()
Implicit conversion to bool to test for a found value.
Defined at line 62 of file ../../src/developer/debug/zxdb/expr/found_name.h
bool operator bool ()
Defined at line 63 of file ../../src/developer/debug/zxdb/expr/found_name.h
const Variable * variable ()
Use when kind == kVariable and kMemberVariable. The variable may be null for member pointers if
the call is just looking up the
Defined at line 70 of file ../../src/developer/debug/zxdb/expr/found_name.h
fxl::RefPtr<Variable> variable_ref ()
Defined at line 71 of file ../../src/developer/debug/zxdb/expr/found_name.h
const char * KindToString (Kind kind)
static.
Defined at line 74 of file ../../src/developer/debug/zxdb/expr/found_name.cc
const Variable * object_ptr ()
Used when kind == kMemberVariable. The object_ptr() will be valid if there's a variable
associated with the member, and will be null otherwise. This won't necessarily be a collection,
it could be a "const pointer to a const collection" or some other complex type.
See FoundMember for how to resolve the value as there are some subtleties.
Defined at line 78 of file ../../src/developer/debug/zxdb/expr/found_name.h
fxl::RefPtr<Variable> object_ptr_ref ()
Defined at line 79 of file ../../src/developer/debug/zxdb/expr/found_name.h
const FoundMember & member ()
Defined at line 80 of file ../../src/developer/debug/zxdb/expr/found_name.h
fxl::RefPtr<Type> & type ()
Valid when kind == kType.
Defined at line 83 of file ../../src/developer/debug/zxdb/expr/found_name.h
const fxl::RefPtr<Type> & type ()
Defined at line 84 of file ../../src/developer/debug/zxdb/expr/found_name.h
fxl::RefPtr<Function> & function ()
Valid when kind == kFunction.
Defined at line 87 of file ../../src/developer/debug/zxdb/expr/found_name.h
const fxl::RefPtr<Function> & function ()
Defined at line 88 of file ../../src/developer/debug/zxdb/expr/found_name.h
fxl::RefPtr<Symbol> & other_symbol ()
Valid when kind == kOtherSymbol.
Defined at line 91 of file ../../src/developer/debug/zxdb/expr/found_name.h
const fxl::RefPtr<Symbol> & other_symbol ()
Defined at line 92 of file ../../src/developer/debug/zxdb/expr/found_name.h
Enumerations
enum Kind
| Name | Value |
|---|---|
| kNone | 0 |
| kVariable | 1 |
| kMemberVariable | 2 |
| kNamespace | 3 |
| kTemplate | 4 |
| kType | 5 |
| kFunction | 6 |
| kOtherSymbol | 7 |
Since identifiers with template parameters at the end are assumed to be a type, we don't need
to check that "std::vector<int>" is a type. This will need to be revisited if we support
templatized function names in expressions ("auto a = &MyClass::MyFunc<int>;");
Defined at line 23 of file ../../src/developer/debug/zxdb/expr/found_name.h