CBMC
cpp_member_spec.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@cs.cmu.edu
6 
7 \*******************************************************************/
8 
9 
10 #ifndef CPROVER_CPP_CPP_MEMBER_SPEC_H
11 #define CPROVER_CPP_CPP_MEMBER_SPEC_H
12 
13 #include <util/source_location.h>
14 #include <util/irep.h>
15 
16 class cpp_member_spect:public irept
17 {
18 public:
19  cpp_member_spect():irept(ID_cpp_member_spec)
20  {
21  }
22 
23  bool is_virtual() const { return get_bool(ID_virtual); }
24  bool is_inline() const { return get_bool(ID_inline); }
25  bool is_friend() const { return get_bool(ID_friend); }
26  bool is_explicit() const { return get_bool(ID_explicit); }
27 
28  void set_virtual(bool value) { set(ID_virtual, value); }
29  void set_inline(bool value) { set(ID_inline, value); }
30  void set_friend(bool value) { set(ID_friend, value); }
31  void set_explicit(bool value) { set(ID_explicit, value); }
32 
33  bool is_empty() const
34  {
35  return !is_virtual() &&
36  !is_inline() &&
37  !is_friend() &&
38  !is_explicit();
39  }
40 };
41 
42 #endif // CPROVER_CPP_CPP_MEMBER_SPEC_H
void set_inline(bool value)
bool is_inline() const
bool is_empty() const
bool is_friend() const
bool is_virtual() const
void set_virtual(bool value)
void set_friend(bool value)
bool is_explicit() const
void set_explicit(bool value)
There are a large number of kinds of tree structured or tree-like data in CPROVER.
Definition: irep.h:360
bool get_bool(const irep_idt &name) const
Definition: irep.cpp:57
void set(const irep_idt &name, const irep_idt &value)
Definition: irep.h:408