retdec
named_type.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_CTYPES_NAMED_TYPE_H
8 #define RETDEC_CTYPES_NAMED_TYPE_H
9 
10 #include "retdec/ctypes/type.h"
11 #include "retdec/ctypes/context.h"
12 
13 namespace retdec {
14 namespace ctypes {
15 
21 class NamedType: public Type {
22 public:
23  static std::shared_ptr<NamedType> create(
24  const std::shared_ptr<Context> &context,
25  const std::string &name
26  );
27 
30  void accept(Visitor *v) override;
32 
33  bool isNamed() const override;
34 
35 private:
36  explicit NamedType(const std::string &name);
37 };
38 
39 } // namespace ctypes
40 } // namespace retdec
41 
42 #endif //RETDEC_CTYPES_NAMED_TYPE_H
A representation of custom types. Named type represents class types and instatiated template class ty...
Definition: named_type.h:21
static std::shared_ptr< NamedType > create(const std::shared_ptr< Context > &context, const std::string &name)
Creates named type.
Definition: named_type.cpp:32
void accept(Visitor *v) override
Visitor pattern implementation.
Definition: named_type.cpp:56
NamedType(const std::string &name)
Constructs new NamedType.
Definition: named_type.cpp:18
bool isNamed() const override
Definition: named_type.cpp:51
A base class of all C types.
Definition: type.h:22
std::string name
Definition: type.h:48
A base class of all C-types' visitors.
Definition: visitor.h:33
Container for all C functions and types.
A base class of all C types.
Definition: archive_wrapper.h:19