10 #ifndef CPROVER_CPP_CPP_NAME_H
11 #define CPROVER_CPP_CPP_NAME_H
35 set(ID_identifier, base_name);
42 set(ID_identifier, _base_name);
70 get_sub().push_back(
namet(_base_name, _source_location));
79 get_sub().front().find(ID_C_source_location));
92 return (sub.size()==1 && sub.front().id()==ID_name) ||
93 (sub.size()==2 && sub.front().id()==ID_operator) ||
94 (sub.size()==2 && sub[0].id()==
"~" && sub[1].id()==ID_name);
101 return get_sub().front().id()==ID_operator;
111 for(
const auto &irep :
get_sub())
113 if(irep.id() ==
"::")
126 for(
const auto &irep :
get_sub())
128 if(irep.id() == ID_template_args)
139 return static_cast<const exprt &
>(
static_cast<const irept &
>(*this));
144 return static_cast<const typet &
>(
static_cast<const irept &
>(*this));
151 return static_cast<cpp_namet &
>(cpp_name);
157 return static_cast<const cpp_namet &
>(cpp_name);
namet(const irep_idt &base_name)
namet(const irep_idt &_base_name, const source_locationt &_source_location)
const source_locationt & source_location() const
source_locationt & add_source_location()
const typet & as_type() const
bool is_qualified() const
irep_idt get_base_name() const
const source_locationt & source_location() const
bool has_template_args() const
bool is_simple_name() const
std::string to_string() const
bool is_destructor() const
cpp_namet(const irep_idt &base_name)
cpp_namet(const irep_idt &_base_name, const source_locationt &_source_location)
const exprt & as_expr() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
There are a large number of kinds of tree structured or tree-like data in CPROVER.
bool get_bool(const irep_idt &name) const
const irept & find(const irep_idt &name) const
void set(const irep_idt &name, const irep_idt &value)
const irep_idt & id() const
irept & add(const irep_idt &name)
static const source_locationt & nil()
The type of an expression, extends irept.
cpp_namet & to_cpp_name(irept &cpp_name)
#define PRECONDITION(CONDITION)