CBMC
c_defines.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: C Defines
4 
5 Author: Daniel Kroening, dkr@amazon.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_CRANGLER_C_DEFINES_H
13 #define CPROVER_CRANGLER_C_DEFINES_H
14 
15 #include <optional>
16 #include <string>
17 #include <unordered_map>
18 #include <vector>
19 
23 {
24 public:
25  struct definet
26  {
27  std::optional<std::vector<std::string>> parameters;
28  std::string value;
29  };
30 
31  using mapt = std::unordered_map<std::string, definet>;
33 
34  void parse(const std::string &);
35  std::string operator()(const std::string &) const;
36 };
37 
38 #endif // CPROVER_CRANGLER_C_DEFINES_H
This class maintains a representation of one assignment to the preprocessor macros in a C program.
Definition: c_defines.h:23
mapt map
Definition: c_defines.h:32
std::string operator()(const std::string &) const
Definition: c_defines.cpp:41
void parse(const std::string &)
Definition: c_defines.cpp:21
std::unordered_map< std::string, definet > mapt
Definition: c_defines.h:31
std::optional< std::vector< std::string > > parameters
Definition: c_defines.h:27
std::string value
Definition: c_defines.h:28