CBMC
cpp_using.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: C++ Language Type Checking
4 
5 Author: Daniel Kroening, kroening@cs.cmu.edu
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_CPP_CPP_USING_H
13 #define CPROVER_CPP_CPP_USING_H
14 
15 #include "cpp_name.h"
16 
17 class cpp_usingt:public irept
18 {
19 public:
20  cpp_usingt():irept(ID_cpp_using)
21  {
22  }
23 
25  {
26  return (cpp_namet &)add(ID_name);
27  }
28 
29  const cpp_namet &name() const
30  {
31  return (const cpp_namet &)find(ID_name);
32  }
33 
34  bool get_namespace() const
35  {
36  return get_bool(ID_namespace);
37  }
38 
39  void set_namespace(bool value)
40  {
41  set(ID_namespace, value);
42  }
43 };
44 
45 #endif // CPROVER_CPP_CPP_USING_H
void set_namespace(bool value)
Definition: cpp_using.h:39
const cpp_namet & name() const
Definition: cpp_using.h:29
cpp_namet & name()
Definition: cpp_using.h:24
bool get_namespace() const
Definition: cpp_using.h:34
cpp_usingt()
Definition: cpp_using.h:20
There are a large number of kinds of tree structured or tree-like data in CPROVER.
Definition: irep.h:364
bool get_bool(const irep_idt &name) const
Definition: irep.cpp:57
const irept & find(const irep_idt &name) const
Definition: irep.cpp:93
void set(const irep_idt &name, const irep_idt &value)
Definition: irep.h:412
irept & add(const irep_idt &name)
Definition: irep.cpp:103