CBMC
cpp_scopest Class Reference

#include <cpp_scopes.h>

+ Collaboration diagram for cpp_scopest:

Public Types

typedef std::set< cpp_scopet * > scope_sett
 
typedef std::set< cpp_idt * > id_sett
 
typedef std::unordered_map< irep_idt, cpp_idt * > id_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 21 of file cpp_scopes.h.

Member Typedef Documentation

◆ id_mapt

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

Definition at line 67 of file cpp_scopes.h.

◆ id_sett

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

Definition at line 30 of file cpp_scopes.h.

◆ scope_sett

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

Definition at line 29 of file cpp_scopes.h.

Constructor & Destructor Documentation

◆ cpp_scopest()

cpp_scopest::cpp_scopest ( )
inline

Definition at line 24 of file cpp_scopes.h.

Member Function Documentation

◆ current_scope()

cpp_scopet& cpp_scopest::current_scope ( )
inline

Definition at line 32 of file cpp_scopes.h.

◆ get_global_scope()

cpp_scopet& cpp_scopest::get_global_scope ( )
inline

Definition at line 115 of file cpp_scopes.h.

◆ get_id()

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

Definition at line 72 of file cpp_scopes.h.

◆ get_root_scope()

cpp_scopet& cpp_scopest::get_root_scope ( )
inline

Definition at line 93 of file cpp_scopes.h.

◆ get_scope()

cpp_scopet& cpp_scopest::get_scope ( const irep_idt identifier)
inline

Definition at line 80 of file cpp_scopes.h.

◆ go_to()

void cpp_scopest::go_to ( cpp_idt id)
inline

Definition at line 103 of file cpp_scopes.h.

◆ go_to_global_scope()

void cpp_scopest::go_to_global_scope ( )
inline

Definition at line 110 of file cpp_scopes.h.

◆ go_to_root_scope()

void cpp_scopest::go_to_root_scope ( )
inline

Definition at line 98 of file cpp_scopes.h.

◆ new_block_scope()

cpp_scopet & cpp_scopest::new_block_scope ( )

Definition at line 18 of file cpp_scopes.cpp.

◆ new_namespace()

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

Definition at line 49 of file cpp_scopes.h.

◆ new_scope()

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

Definition at line 37 of file cpp_scopes.h.

◆ print_current()

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

Definition at line 72 of file cpp_scopes.cpp.

◆ put_into_scope() [1/2]

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

Definition at line 61 of file cpp_scopes.h.

◆ put_into_scope() [2/2]

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

Definition at line 24 of file cpp_scopes.cpp.

◆ set_scope()

cpp_scopet& cpp_scopest::set_scope ( const irep_idt identifier)
inline

Definition at line 87 of file cpp_scopes.h.

Member Data Documentation

◆ current_scope_ptr

cpp_scopet* cpp_scopest::current_scope_ptr

Definition at line 70 of file cpp_scopes.h.

◆ id_map

id_mapt cpp_scopest::id_map

Definition at line 68 of file cpp_scopes.h.

◆ root_scope

cpp_root_scopet cpp_scopest::root_scope
protected

Definition at line 124 of file cpp_scopes.h.


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