retdec
type.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_COMMON_TYPE_H
8 #define RETDEC_COMMON_TYPE_H
9 
10 #include <set>
11 #include <string>
12 
13 namespace retdec {
14 namespace common {
15 
21 class Type
22 {
23  public:
24  Type();
25  Type(const std::string& llvmIrRepre);
26 
29  bool isDefined() const;
30  bool isWideString() const;
32 
35  void setLlvmIr(const std::string& t);
36  void setIsWideString(bool b);
38 
41  std::string getId() const;
42  std::string getLlvmIr() const;
44 
45  bool operator<(const Type& val) const;
46  bool operator==(const Type& val) const;
47 
48  private:
51  std::string _llvmIr = "i32";
54  bool _wideString = false;
55 };
56 
57 using TypeContainer = std::set<Type>;
58 
59 } // namespace common
60 } // namespace retdec
61 
62 #endif
Definition: type.h:22
std::string _llvmIr
Definition: type.h:51
std::string getId() const
Definition: type.cpp:56
void setLlvmIr(const std::string &t)
Definition: type.cpp:48
void setIsWideString(bool b)
Definition: type.cpp:43
bool _wideString
Definition: type.h:54
std::string getLlvmIr() const
Definition: type.cpp:64
bool operator<(const Type &val) const
Definition: type.cpp:76
bool operator==(const Type &val) const
Definition: type.cpp:85
bool isDefined() const
Definition: type.cpp:29
bool isWideString() const
Definition: type.cpp:38
Type()
Definition: type.cpp:17
std::set< Type > TypeContainer
Definition: type.h:57
Definition: archive_wrapper.h:19