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
cpp_member_spect::set_inline
void set_inline(bool value)
Definition: cpp_member_spec.h:29
cpp_member_spect::set_virtual
void set_virtual(bool value)
Definition: cpp_member_spec.h:28
cpp_member_spect::cpp_member_spect
cpp_member_spect()
Definition: cpp_member_spec.h:19
cpp_member_spect::is_inline
bool is_inline() const
Definition: cpp_member_spec.h:24
cpp_member_spect::is_virtual
bool is_virtual() const
Definition: cpp_member_spec.h:23
cpp_member_spect::is_explicit
bool is_explicit() const
Definition: cpp_member_spec.h:26
irept::set
void set(const irep_idt &name, const irep_idt &value)
Definition: irep.h:420
source_location.h
cpp_member_spect::is_empty
bool is_empty() const
Definition: cpp_member_spec.h:33
cpp_member_spect::set_friend
void set_friend(bool value)
Definition: cpp_member_spec.h:30
irept
There are a large number of kinds of tree structured or tree-like data in CPROVER.
Definition: irep.h:359
cpp_member_spect::set_explicit
void set_explicit(bool value)
Definition: cpp_member_spec.h:31
cpp_member_spect
Definition: cpp_member_spec.h:16
irept::get_bool
bool get_bool(const irep_idt &name) const
Definition: irep.cpp:58
cpp_member_spect::is_friend
bool is_friend() const
Definition: cpp_member_spec.h:25
irep.h