cprover
cpp_scopet Class Reference

#include <cpp_scope.h>

Inheritance diagram for cpp_scopet:
[legend]
Collaboration diagram for cpp_scopet:
[legend]

Public Types

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

Public Member Functions

 cpp_scopet ()
 
void lookup (const irep_idt &base_name, lookup_kindt kind, id_sett &id_set)
 
void lookup (const irep_idt &base_name, lookup_kindt kind, cpp_idt::id_classt id_class, id_sett &id_set)
 
void lookup_identifier (const irep_idt &identifier, cpp_idt::id_classt id_class, id_sett &id_set)
 
cpp_idtinsert (const irep_idt &_base_name)
 
cpp_idtinsert (const cpp_idt &cpp_id)
 
bool contains (const irep_idt &base_name)
 
bool is_root_scope () const
 
bool is_global_scope () const
 
bool is_template_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
 
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
 

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.

References cpp_idt::is_scope.

Member Function Documentation

◆ add_secondary_scope()

void cpp_scopet::add_secondary_scope ( cpp_scopet other)
inline

Definition at line 104 of file cpp_scope.h.

References cpp_idt::is_scope, and cpp_idt::secondary_scopes.

Referenced by cpp_typecheckt::typecheck_compound_bases().

◆ add_using_scope()

void cpp_scopet::add_using_scope ( cpp_scopet other)
inline

◆ contains()

bool cpp_scopet::contains ( const irep_idt base_name)

◆ get_global_scope()

cpp_scopet& cpp_scopet::get_global_scope ( )
inline

Definition at line 94 of file cpp_scope.h.

References get_parent(), and is_global_scope().

Referenced by cpp_scopest::get_global_scope().

◆ get_parent()

◆ insert() [1/2]

◆ insert() [2/2]

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

Definition at line 60 of file cpp_scope.h.

References cpp_idt::base_name, and cpp_idt::sub.

◆ is_global_scope()

bool cpp_scopet::is_global_scope ( ) const
inline

◆ is_root_scope()

bool cpp_scopet::is_root_scope ( ) const
inline

◆ is_template_scope()

bool cpp_scopet::is_template_scope ( ) const
inline

Definition at line 84 of file cpp_scope.h.

References cpp_idt::id_class, and cpp_idt::TEMPLATE_SCOPE.

Referenced by cpp_typecheckt::typecheck_member_function().

◆ lookup() [1/2]

◆ lookup() [2/2]

◆ lookup_identifier()

void cpp_scopet::lookup_identifier ( const irep_idt identifier,
cpp_idt::id_classt  id_class,
id_sett id_set 
)

◆ new_scope()


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