12 #ifndef CPROVER_CPP_CPP_SCOPES_H 13 #define CPROVER_CPP_CPP_SCOPES_H 42 assert(!new_scope_name.
empty());
60 bool is_friend =
false);
68 typedef std::unordered_map<irep_idt, cpp_idt *, irep_id_hash>
id_mapt;
75 id_mapt::const_iterator it=id_map.find(identifier);
77 throw "id `"+
id2string(identifier)+
"' not found";
107 current_scope_ptr=
static_cast<cpp_scopet*
>(&id);
132 cpp_scopes(_cpp_scopes),
144 cpp_scopes.current_scope_ptr=saved_scope;
152 #endif // CPROVER_CPP_CPP_SCOPES_H const std::string & id2string(const irep_idt &d)
std::set< cpp_idt * > id_sett
class cpp_scopet & new_scope(const irep_idt &new_scope_name)
cpp_idt & put_into_scope(const symbolt &symbol, cpp_scopet &scope, bool is_friend=false)
cpp_scopet & new_namespace(const irep_idt &new_scope_name)
cpp_scopet & get_global_scope()
cpp_save_scopet(cpp_scopest &_cpp_scopes)
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
cpp_root_scopet root_scope
cpp_scopet & get_root_scope()
std::unordered_map< irep_idt, cpp_idt *, irep_id_hash > id_mapt
cpp_idt & get_id(const irep_idt &identifier)
void go_to_global_scope()
cpp_idt & put_into_scope(const symbolt &symbol, bool is_friend=false)
void print_current(std::ostream &out) const
C++ Language Type Checking.
cpp_scopet & set_scope(const irep_idt &identifier)
cpp_scopet & current_scope()
cpp_scopet * current_scope_ptr
cpp_scopet & new_block_scope()
cpp_scopet & get_scope(const irep_idt &identifier)
cpp_scopet & new_scope(const irep_idt &new_scope_name, cpp_idt::id_classt id_class)
std::set< cpp_scopet * > scope_sett
cpp_scopet & get_global_scope()