|
CBMC
|
A multi namespace is essentially a namespace, with a list of namespaces. More...
#include <namespace.h>
Inheritance diagram for multi_namespacet:
Collaboration diagram for multi_namespacet:Public Member Functions | |
| multi_namespacet () | |
| multi_namespacet (const symbol_table_baset &symbol_table) | |
| bool | lookup (const irep_idt &name, const symbolt *&symbol) const override |
| See documentation for namespace_baset::lookup(). More... | |
| std::size_t | smallest_unused_suffix (const std::string &prefix) const override |
| See documentation for namespace_baset::smallest_unused_suffix(). More... | |
| void | add (const symbol_table_baset &symbol_table) |
| Add symbol table to the list of symbol tables this multi-namespace is working with. More... | |
| const symbolt & | lookup (const irep_idt &name) const |
| Lookup a symbol in the namespace. More... | |
| const symbolt & | lookup (const symbol_exprt &) const |
| Generic lookup function for a symbol expression in a symbol table. More... | |
| const symbolt & | lookup (const tag_typet &) const |
| Generic lookup function for a tag type in a symbol table. More... | |
| virtual bool | lookup (const irep_idt &name, const symbolt *&symbol) const=0 |
Searches for a symbol named name. More... | |
Public Member Functions inherited from namespacet | |
| namespacet (const symbol_table_baset &_symbol_table) | |
| namespacet (const symbol_table_baset &_symbol_table1, const symbol_table_baset &_symbol_table2) | |
| namespacet (const symbol_table_baset *_symbol_table1, const symbol_table_baset *_symbol_table2) | |
| const symbol_table_baset & | get_symbol_table () const |
| Return first symbol table registered with the namespace. More... | |
| const symbolt & | lookup (const irep_idt &name) const |
| Lookup a symbol in the namespace. More... | |
| const symbolt & | lookup (const symbol_exprt &) const |
| Generic lookup function for a symbol expression in a symbol table. More... | |
| const symbolt & | lookup (const tag_typet &) const |
| Generic lookup function for a tag type in a symbol table. More... | |
| virtual bool | lookup (const irep_idt &name, const symbolt *&symbol) const=0 |
Searches for a symbol named name. More... | |
Public Member Functions inherited from namespace_baset | |
| const symbolt & | lookup (const irep_idt &name) const |
| Lookup a symbol in the namespace. More... | |
| const symbolt & | lookup (const symbol_exprt &) const |
| Generic lookup function for a symbol expression in a symbol table. More... | |
| const symbolt & | lookup (const tag_typet &) const |
| Generic lookup function for a tag type in a symbol table. More... | |
| virtual | ~namespace_baset () |
| void | follow_macros (exprt &) const |
| Follow macros to their values in a given expression. More... | |
| const typet & | follow (const typet &) const |
| Resolve type symbol to the type it points to. More... | |
| const union_typet & | follow_tag (const union_tag_typet &) const |
| Follow type tag of union type. More... | |
| const struct_typet & | follow_tag (const struct_tag_typet &) const |
| Follow type tag of struct type. More... | |
| const c_enum_typet & | follow_tag (const c_enum_tag_typet &) const |
| Follow type tag of enum type. More... | |
Protected Types | |
| typedef std::vector< const symbol_table_baset * > | symbol_table_listt |
Protected Attributes | |
| symbol_table_listt | symbol_table_list |
Protected Attributes inherited from namespacet | |
| const symbol_table_baset * | symbol_table1 |
| const symbol_table_baset * | symbol_table2 |
A multi namespace is essentially a namespace, with a list of namespaces.
It's difference with namespacet is that it can use more than two symbol tables to lookup symbols in.
Definition at line 136 of file namespace.h.
|
protected |
Definition at line 168 of file namespace.h.
|
inline |
Definition at line 140 of file namespace.h.
|
inlineexplicit |
Definition at line 144 of file namespace.h.
|
inline |
Add symbol table to the list of symbol tables this multi-namespace is working with.
| symbol_table | Reference to the symbol table to be added to this namespace. |
Definition at line 162 of file namespace.h.
|
inline |
Lookup a symbol in the namespace.
| name | The name of the symbol to lookup. |
Definition at line 43 of file namespace.h.
|
overridevirtual |
See documentation for namespace_baset::lookup().
Iterate through the symbol tables in the multi-namespace and lookup the symbol.
| name | The name of the symbol to be looked up. |
| symbol | The const pointer to the reference of the symbol if it's found during lookup. |
Reimplemented from namespacet.
Definition at line 189 of file namespace.cpp.
| virtual bool namespace_baset::lookup |
Searches for a symbol named name.
Iff found, set symbol to point to the symbol and return false; else symbol is unmodified and true is returned. With multiple symbol tables, symbol_table1 is searched first and then symbol_table2.
| const symbolt & namespace_baset::lookup |
Generic lookup function for a symbol expression in a symbol table.
| expr | The symbol expression to lookup. |
Definition at line 30 of file namespace.cpp.
| const symbolt & namespace_baset::lookup |
Generic lookup function for a tag type in a symbol table.
| type | The tag type to lookup. |
Definition at line 41 of file namespace.cpp.
|
overridevirtual |
See documentation for namespace_baset::smallest_unused_suffix().
Find smallest unused suffix in the all the symbol tables.
| prefix | The prefix to find smallest unused suffix of. |
Reimplemented from namespacet.
Definition at line 173 of file namespace.cpp.
|
protected |
Definition at line 169 of file namespace.h.