CBMC
cpp_scopet Class Reference

#include <cpp_scope.h>

+ Inheritance diagram for cpp_scopet:
+ Collaboration diagram for cpp_scopet:

Public Types

enum  lookup_kindt { SCOPE_ONLY , QUALIFIED , RECURSIVE }
 
typedef std::set< cpp_idt * > id_sett
 
- Public Types inherited from cpp_idt
enum class  id_classt {
  UNKNOWN , SYMBOL , TYPEDEF , CLASS ,
  ENUM , TEMPLATE , TEMPLATE_PARAMETER , NAMESPACE ,
  BLOCK_SCOPE , TEMPLATE_SCOPE , ROOT_SCOPE
}
 

Public Member Functions

 cpp_scopet ()
 
id_sett lookup (const irep_idt &base_name_to_lookup, lookup_kindt kind)
 
id_sett lookup (const irep_idt &base_name_to_lookup, lookup_kindt kind, cpp_idt::id_classt identifier_class)
 
id_sett lookup_identifier (const irep_idt &id, cpp_idt::id_classt identifier_class)
 
cpp_idtinsert (const irep_idt &_base_name)
 
cpp_idtinsert (const cpp_idt &cpp_id)
 
bool contains (const irep_idt &base_name_to_lookup)
 
bool is_root_scope () const
 
bool is_global_scope () const
 
cpp_scopetget_parent () const
 
cpp_scopetget_global_scope ()
 
void add_secondary_scope (cpp_scopet &other)
 
void add_using_scope (cpp_scopet &other)
 
class cpp_scopetnew_scope (const irep_idt &new_scope_name)
 
- Public Member Functions inherited from cpp_idt
 cpp_idt ()
 
bool is_class () const
 
bool is_enum () const
 
bool is_namespace () const
 
bool is_typedef () const
 
bool is_template_scope () const
 
cpp_idtget_parent () const
 
void set_parent (cpp_idt &_parent)
 
void clear ()
 
void print (std::ostream &out, unsigned indent=0) const
 
void print_fields (std::ostream &out, unsigned indent=0) const
 

Protected Member Functions

void lookup_rec (const irep_idt &base_name, lookup_kindt kind, id_sett &)
 
void lookup_rec (const irep_idt &base_name, lookup_kindt kind, cpp_idt::id_classt id_class, id_sett &)
 

Additional Inherited Members

- Public Attributes inherited from cpp_idt
bool is_member
 
bool is_method
 
bool is_static_member
 
bool is_scope
 
bool is_constructor
 
id_classt id_class
 
irep_idt identifier
 
irep_idt base_name
 
irep_idt class_identifier
 
exprt this_expr
 
std::string prefix
 
std::string suffix
 
unsigned compound_counter
 
- Protected Types inherited from cpp_idt
typedef std::multimap< irep_idt, cpp_idtcpp_id_mapt
 
typedef std::vector< cpp_idt * > scope_listt
 
- Protected Attributes inherited from cpp_idt
cpp_id_mapt sub
 
scope_listt using_scopes
 
scope_listt secondary_scopes
 
cpp_idtparent
 

Detailed Description

Definition at line 20 of file cpp_scope.h.

Member Typedef Documentation

◆ id_sett

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

Definition at line 28 of file cpp_scope.h.

Member Enumeration Documentation

◆ lookup_kindt

Enumerator
SCOPE_ONLY 
QUALIFIED 
RECURSIVE 

Definition at line 30 of file cpp_scope.h.

Constructor & Destructor Documentation

◆ cpp_scopet()

cpp_scopet::cpp_scopet ( )
inline

Definition at line 23 of file cpp_scope.h.

Member Function Documentation

◆ add_secondary_scope()

void cpp_scopet::add_secondary_scope ( cpp_scopet other)
inline

Definition at line 103 of file cpp_scope.h.

◆ add_using_scope()

void cpp_scopet::add_using_scope ( cpp_scopet other)
inline

Definition at line 109 of file cpp_scope.h.

◆ contains()

bool cpp_scopet::contains ( const irep_idt base_name_to_lookup)

Definition at line 201 of file cpp_scope.cpp.

◆ get_global_scope()

cpp_scopet& cpp_scopet::get_global_scope ( )
inline

Definition at line 93 of file cpp_scope.h.

◆ get_parent()

cpp_scopet& cpp_scopet::get_parent ( ) const
inline

Definition at line 88 of file cpp_scope.h.

◆ insert() [1/2]

cpp_idt& cpp_scopet::insert ( const cpp_idt cpp_id)
inline

Definition at line 64 of file cpp_scope.h.

◆ insert() [2/2]

cpp_idt& cpp_scopet::insert ( const irep_idt _base_name)
inline

Definition at line 52 of file cpp_scope.h.

◆ is_global_scope()

bool cpp_scopet::is_global_scope ( ) const
inline

Definition at line 82 of file cpp_scope.h.

◆ is_root_scope()

bool cpp_scopet::is_root_scope ( ) const
inline

Definition at line 77 of file cpp_scope.h.

◆ lookup() [1/2]

id_sett cpp_scopet::lookup ( const irep_idt base_name_to_lookup,
lookup_kindt  kind 
)
inline

Definition at line 32 of file cpp_scope.h.

◆ lookup() [2/2]

id_sett cpp_scopet::lookup ( const irep_idt base_name_to_lookup,
lookup_kindt  kind,
cpp_idt::id_classt  identifier_class 
)
inline

Definition at line 39 of file cpp_scope.h.

◆ lookup_identifier()

cpp_scopet::id_sett cpp_scopet::lookup_identifier ( const irep_idt id,
cpp_idt::id_classt  identifier_class 
)

Definition at line 157 of file cpp_scope.cpp.

◆ lookup_rec() [1/2]

void cpp_scopet::lookup_rec ( const irep_idt base_name,
lookup_kindt  kind,
cpp_idt::id_classt  id_class,
id_sett id_set 
)
protected

Definition at line 83 of file cpp_scope.cpp.

◆ lookup_rec() [2/2]

void cpp_scopet::lookup_rec ( const irep_idt base_name,
lookup_kindt  kind,
id_sett id_set 
)
protected

Definition at line 27 of file cpp_scope.cpp.

◆ new_scope()

cpp_scopet & cpp_scopet::new_scope ( const irep_idt new_scope_name)

Definition at line 190 of file cpp_scope.cpp.


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