|
cprover
|
#include <resolve_inherited_component.h>
Classes | |
| class | inherited_componentt |
Public Member Functions | |
| resolve_inherited_componentt (const symbol_table_baset &symbol_table) | |
| See the operator() method comment. | |
| std::optional< inherited_componentt > | operator() (const irep_idt &class_id, const irep_idt &component_name, bool include_interfaces, std::function< bool(const symbolt &)> user_filter=[](const symbolt &) { return true;}) |
| Given a class and a component, identify the concrete field or method it is resolved to. | |
Static Public Member Functions | |
| static irep_idt | build_full_component_identifier (const irep_idt &class_name, const irep_idt &component_name) |
| Build a component name as found in a GOTO symbol table equivalent to the name of a concrete component component_name on class class_name. | |
Private Attributes | |
| const symbol_table_baset & | symbol_table |
Definition at line 24 of file resolve_inherited_component.h.
|
explicit |
See the operator() method comment.
| symbol_table | The symbol table to resolve the component against |
Definition at line 17 of file resolve_inherited_component.cpp.
|
static |
Build a component name as found in a GOTO symbol table equivalent to the name of a concrete component component_name on class class_name.
| component_name | The name of the component |
| class_name | The class the implementation would be found on. |
Definition at line 94 of file resolve_inherited_component.cpp.
| std::optional< resolve_inherited_componentt::inherited_componentt > resolve_inherited_componentt::operator() | ( | const irep_idt & | class_id, |
| const irep_idt & | component_name, | ||
| bool | include_interfaces, | ||
| std::function< bool(const symbolt &)> | user_filter = [](const symbolt &) { return true; } ) |
Given a class and a component, identify the concrete field or method it is resolved to.
For example, a reference Child.abc refers to Child's method or field if it exists, or else Parent.abc, and so on regarding Parent's ancestors. If none are found, an empty string will be returned.
| class_id | The name of the class the function is being called on |
| component_name | The base name of the component (i.e. without the class specifier) |
| include_interfaces | If true, consider inheritance from interfaces (parent types other than the first listed) |
| user_filter | Predicate that should return true for symbols that can be returned. Those for which it returns false will be ignored. |
Definition at line 36 of file resolve_inherited_component.cpp.
|
private |
Definition at line 62 of file resolve_inherited_component.h.