cprover
multi_namespacet Class Reference

#include <namespace.h>

+ Inheritance diagram for multi_namespacet:
+ Collaboration diagram for multi_namespacet:

Public Member Functions

 multi_namespacet ()
 
 multi_namespacet (const symbol_tablet &symbol_table)
 
bool lookup (const irep_idt &name, const symbolt *&symbol) const override
 See 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_tablet &symbol_table)
 
const symboltlookup (const irep_idt &name) const
 
const symboltlookup (const symbol_exprt &) const
 
const symboltlookup (const symbol_typet &) const
 
const symboltlookup (const tag_typet &) const
 
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_tablet &_symbol_table)
 
 namespacet (const symbol_tablet &_symbol_table1, const symbol_tablet &_symbol_table2)
 
 namespacet (const symbol_tablet *_symbol_table1, const symbol_tablet *_symbol_table2)
 
const symbol_tabletget_symbol_table () const
 
const symboltlookup (const irep_idt &name) const
 
const symboltlookup (const symbol_exprt &) const
 
const symboltlookup (const symbol_typet &) const
 
const symboltlookup (const tag_typet &) const
 
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 symboltlookup (const irep_idt &name) const
 
const symboltlookup (const symbol_exprt &) const
 
const symboltlookup (const symbol_typet &) const
 
const symboltlookup (const tag_typet &) const
 
virtual ~namespace_baset ()
 
void follow_macros (exprt &) const
 
const typetfollow (const typet &) const
 
const typetfollow_tag (const union_tag_typet &) const
 
const typetfollow_tag (const struct_tag_typet &) const
 
const typetfollow_tag (const c_enum_tag_typet &) const
 

Protected Types

typedef std::vector< const symbol_tablet * > symbol_table_listt
 

Protected Attributes

symbol_table_listt symbol_table_list
 
- Protected Attributes inherited from namespacet
const symbol_tabletsymbol_table1
 
const symbol_tabletsymbol_table2
 

Detailed Description

Definition at line 120 of file namespace.h.

Member Typedef Documentation

◆ symbol_table_listt

typedef std::vector<const symbol_tablet *> multi_namespacet::symbol_table_listt
protected

Definition at line 146 of file namespace.h.

Constructor & Destructor Documentation

◆ multi_namespacet() [1/2]

multi_namespacet::multi_namespacet ( )
inline

Definition at line 124 of file namespace.h.

◆ multi_namespacet() [2/2]

multi_namespacet::multi_namespacet ( const symbol_tablet symbol_table)
inlineexplicit

Definition at line 128 of file namespace.h.

Member Function Documentation

◆ add()

void multi_namespacet::add ( const symbol_tablet symbol_table)
inline

Definition at line 140 of file namespace.h.

◆ lookup() [1/6]

const symbolt& namespace_baset::lookup
inline

Definition at line 34 of file namespace.h.

◆ lookup() [2/6]

const symbolt & namespace_baset::lookup

Definition at line 48 of file namespace.cpp.

◆ lookup() [3/6]

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.

Returns
False iff the requested symbol is found in at least one of the tables.

◆ lookup() [4/6]

const symbolt & namespace_baset::lookup

Definition at line 38 of file namespace.cpp.

◆ lookup() [5/6]

const symbolt & namespace_baset::lookup

Definition at line 43 of file namespace.cpp.

◆ lookup() [6/6]

bool multi_namespacet::lookup ( const irep_idt name,
const symbolt *&  symbol 
) const
overridevirtual

See namespace_baset::lookup().

Note that namespacet has two symbol tables.

Reimplemented from namespacet.

Definition at line 179 of file namespace.cpp.

◆ smallest_unused_suffix()

std::size_t multi_namespacet::smallest_unused_suffix ( const std::string &  prefix) const
overridevirtual

See documentation for namespace_baset::smallest_unused_suffix().

Reimplemented from namespacet.

Definition at line 169 of file namespace.cpp.

Member Data Documentation

◆ symbol_table_list

symbol_table_listt multi_namespacet::symbol_table_list
protected

Definition at line 147 of file namespace.h.


The documentation for this class was generated from the following files: