-
Notifications
You must be signed in to change notification settings - Fork 273
/
Copy pathcpp_namespace_spec.h
72 lines (53 loc) · 1.27 KB
/
cpp_namespace_spec.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*******************************************************************\
Module: C++ Language Type Checking
Author: Daniel Kroening, [email protected]
\*******************************************************************/
/// \file
/// C++ Language Type Checking
#ifndef CPROVER_CPP_CPP_NAMESPACE_SPEC_H
#define CPROVER_CPP_CPP_NAMESPACE_SPEC_H
#include <util/expr.h>
#include "cpp_name.h"
class cpp_namespace_spect:public exprt
{
public:
cpp_namespace_spect():exprt(ID_cpp_namespace_spec)
{
alias().make_nil();
}
typedef std::vector<class cpp_itemt> itemst;
const itemst &items() const
{
return (const itemst &)operands();
}
itemst &items()
{
return (itemst &)operands();
}
const irep_idt &get_namespace() const
{
return get(ID_namespace);
}
void set_namespace(const irep_idt &_namespace)
{
set(ID_namespace, _namespace);
}
cpp_namet &alias()
{
return static_cast<cpp_namet &>(add(ID_alias));
}
const cpp_namet &alias() const
{
return static_cast<const cpp_namet &>(find(ID_alias));
}
void output(std::ostream &out) const;
void set_is_inline(bool value)
{
set(ID_is_inline, value);
}
bool get_is_inline() const
{
return get_bool(ID_is_inline);
}
};
#endif // CPROVER_CPP_CPP_NAMESPACE_SPEC_H