cprover
cpp_scopest Class Reference

#include <cpp_scopes.h>

Collaboration diagram for cpp_scopest:
[legend]

Public Types

typedef std::set< cpp_scopet * > scope_sett
 
typedef std::set< cpp_idt * > id_sett
 
typedef std::unordered_map< irep_idt, cpp_idt *, irep_id_hashid_mapt
 

Public Member Functions

 cpp_scopest ()
 
cpp_scopetcurrent_scope ()
 
cpp_scopetnew_scope (const irep_idt &new_scope_name, cpp_idt::id_classt id_class)
 
cpp_scopetnew_namespace (const irep_idt &new_scope_name)
 
cpp_scopetnew_block_scope ()
 
cpp_idtput_into_scope (const symbolt &symbol, cpp_scopet &scope, bool is_friend=false)
 
cpp_idtput_into_scope (const symbolt &symbol, bool is_friend=false)
 
cpp_idtget_id (const irep_idt &identifier)
 
cpp_scopetget_scope (const irep_idt &identifier)
 
cpp_scopetset_scope (const irep_idt &identifier)
 
cpp_scopetget_root_scope ()
 
void go_to_root_scope ()
 
void go_to (cpp_idt &id)
 
void go_to_global_scope ()
 
cpp_scopetget_global_scope ()
 
void print_current (std::ostream &out) const
 

Public Attributes

id_mapt id_map
 
cpp_scopetcurrent_scope_ptr
 

Protected Attributes

cpp_root_scopet root_scope
 

Detailed Description

Definition at line 22 of file cpp_scopes.h.

Member Typedef Documentation

◆ id_mapt

typedef std::unordered_map<irep_idt, cpp_idt *, irep_id_hash> cpp_scopest::id_mapt

Definition at line 68 of file cpp_scopes.h.

◆ id_sett

typedef std::set<cpp_idt *> cpp_scopest::id_sett

Definition at line 31 of file cpp_scopes.h.

◆ scope_sett

typedef std::set<cpp_scopet *> cpp_scopest::scope_sett

Definition at line 30 of file cpp_scopes.h.

Constructor & Destructor Documentation

◆ cpp_scopest()

cpp_scopest::cpp_scopest ( )
inline

Definition at line 25 of file cpp_scopes.h.

References current_scope_ptr, and root_scope.

Member Function Documentation

◆ current_scope()

cpp_scopet& cpp_scopest::current_scope ( )
inline

Definition at line 33 of file cpp_scopes.h.

References current_scope_ptr.

Referenced by cpp_typecheckt::add_anonymous_members_to_scope(), cpp_typecheckt::check_component_access(), cpp_typecheckt::class_template_identifier(), cpp_declarator_convertert::convert(), cpp_typecheckt::convert(), cpp_typecheckt::convert_anon_struct_union_member(), cpp_typecheckt::convert_anonymous_union(), cpp_typecheckt::convert_class_template_specialization(), cpp_typecheck_resolvet::convert_identifier(), cpp_declarator_convertert::convert_new_symbol(), cpp_typecheckt::convert_parameter(), cpp_typecheckt::convert_template_function_or_member_specialization(), cpp_typecheck_resolvet::filter_for_named_scopes(), get_global_scope(), cpp_typecheck_resolvet::guess_template_args(), cpp_typecheckt::instantiate_template(), new_block_scope(), cpp_typecheckt::put_compound_into_scope(), put_into_scope(), cpp_typecheck_resolvet::resolve(), cpp_typecheck_resolvet::resolve_namespace(), cpp_typecheck_resolvet::resolve_scope(), set_scope(), cpp_typecheckt::tag_scope(), cpp_typecheckt::this_struct_type(), cpp_typecheckt::typecheck_class_template(), cpp_typecheckt::typecheck_class_template_member(), cpp_typecheckt::typecheck_compound_bases(), cpp_typecheckt::typecheck_compound_declarator(), cpp_typecheckt::typecheck_compound_type(), cpp_typecheckt::typecheck_enum_type(), cpp_typecheckt::typecheck_expr_cpp_name(), cpp_typecheckt::typecheck_expr_this(), cpp_typecheckt::typecheck_function_template(), cpp_typecheckt::typecheck_member_function(), cpp_typecheckt::typecheck_member_initializer(), and cpp_typecheckt::typecheck_template_parameters().

◆ get_global_scope()

cpp_scopet& cpp_scopest::get_global_scope ( )
inline

Definition at line 116 of file cpp_scopes.h.

References current_scope(), and cpp_scopet::get_global_scope().

Referenced by go_to_global_scope(), and cpp_typecheckt::tag_scope().

◆ get_id()

cpp_idt& cpp_scopest::get_id ( const irep_idt identifier)
inline

Definition at line 73 of file cpp_scopes.h.

References id2string(), and id_map.

Referenced by cpp_typecheck_resolvet::filter_for_named_scopes(), and get_scope().

◆ get_root_scope()

cpp_scopet& cpp_scopest::get_root_scope ( )
inline

Definition at line 94 of file cpp_scopes.h.

References root_scope.

Referenced by cpp_typecheck_resolvet::do_builtin().

◆ get_scope()

◆ go_to()

◆ go_to_global_scope()

void cpp_scopest::go_to_global_scope ( )
inline

◆ go_to_root_scope()

void cpp_scopest::go_to_root_scope ( )
inline

Definition at line 99 of file cpp_scopes.h.

References current_scope_ptr, and root_scope.

Referenced by cpp_typecheck_resolvet::resolve_scope().

◆ new_block_scope()

cpp_scopet & cpp_scopest::new_block_scope ( )

◆ new_namespace()

cpp_scopet& cpp_scopest::new_namespace ( const irep_idt new_scope_name)
inline

Definition at line 50 of file cpp_scopes.h.

References cpp_idt::NAMESPACE, and new_scope().

Referenced by cpp_typecheckt::convert().

◆ new_scope()

cpp_scopet& cpp_scopest::new_scope ( const irep_idt new_scope_name,
cpp_idt::id_classt  id_class 
)
inline

◆ print_current()

void cpp_scopest::print_current ( std::ostream &  out) const

◆ put_into_scope() [1/2]

◆ put_into_scope() [2/2]

cpp_idt& cpp_scopest::put_into_scope ( const symbolt symbol,
bool  is_friend = false 
)
inline

Definition at line 62 of file cpp_scopes.h.

References current_scope(), and put_into_scope().

◆ set_scope()

Member Data Documentation

◆ current_scope_ptr

◆ id_map

◆ root_scope

cpp_root_scopet cpp_scopest::root_scope
protected

Definition at line 125 of file cpp_scopes.h.

Referenced by cpp_scopest(), get_root_scope(), and go_to_root_scope().


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