retdec
member.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_CTYPES_MEMBER_H
8 #define RETDEC_CTYPES_MEMBER_H
9 
10 #include <memory>
11 #include <string>
12 
13 namespace retdec {
14 namespace ctypes {
15 
16 class Type;
17 
21 class Member
22 {
23  public:
24  Member(const std::string &name, const std::shared_ptr<Type> &type);
25 
26  const std::string &getName() const;
27  std::shared_ptr<Type> getType() const;
28 
29  bool operator==(const Member &other) const;
30  bool operator!=(const Member &other) const;
31 
32  private:
33  std::string name;
34  std::shared_ptr<Type> type;
35 };
36 
37 } // namespace ctypes
38 } // namespace retdec
39 
40 #endif
A representation of a composite type (struct, union) member.
Definition: member.h:22
std::shared_ptr< Type > getType() const
Returns member's type.
Definition: member.cpp:29
std::shared_ptr< Type > type
Definition: member.h:34
std::string name
Definition: member.h:33
const std::string & getName() const
Returns member's name.
Definition: member.cpp:21
Member(const std::string &name, const std::shared_ptr< Type > &type)
Constructs a new member.
Definition: member.cpp:15
bool operator!=(const Member &other) const
Definition: member.cpp:39
bool operator==(const Member &other) const
Definition: member.cpp:34
Definition: archive_wrapper.h:19