retdec
visitor.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_CTYPES_VISITOR_H
8 #define RETDEC_CTYPES_VISITOR_H
9 
10 #include <memory>
11 
12 namespace retdec {
13 namespace ctypes {
14 
15 class ArrayType;
16 class EnumType;
17 class FloatingPointType;
18 class FunctionType;
19 class IntegralType;
20 class NamedType;
21 class PointerType;
22 class ReferenceType;
23 class StructType;
24 class TypedefedType;
25 class UnionType;
26 class UnknownType;
27 class VoidType;
28 
32 class Visitor
33 {
34  public:
35  virtual ~Visitor() = default;
36 
37  virtual void visit(const std::shared_ptr<ArrayType> &type) = 0;
38  virtual void visit(const std::shared_ptr<EnumType> &type) = 0;
39  virtual void visit(const std::shared_ptr<FloatingPointType> &type) = 0;
40  virtual void visit(const std::shared_ptr<FunctionType> &type) = 0;
41  virtual void visit(const std::shared_ptr<IntegralType> &type) = 0;
42  virtual void visit(const std::shared_ptr<NamedType> &type) = 0;
43  virtual void visit(const std::shared_ptr<PointerType> &type) = 0;
44  virtual void visit(const std::shared_ptr<ReferenceType> &type) = 0;
45  virtual void visit(const std::shared_ptr<StructType> &type) = 0;
46  virtual void visit(const std::shared_ptr<TypedefedType> &type) = 0;
47  virtual void visit(const std::shared_ptr<UnionType> &type) = 0;
48  virtual void visit(const std::shared_ptr<UnknownType> &type) = 0;
49  virtual void visit(const std::shared_ptr<VoidType> &type) = 0;
50 
51  protected:
52  Visitor() = default;
53 };
54 
55 } // namespace ctypes
56 } // namespace retdec
57 
58 #endif
A base class of all C-types' visitors.
Definition: visitor.h:33
virtual void visit(const std::shared_ptr< UnknownType > &type)=0
virtual void visit(const std::shared_ptr< PointerType > &type)=0
virtual void visit(const std::shared_ptr< IntegralType > &type)=0
virtual ~Visitor()=default
virtual void visit(const std::shared_ptr< TypedefedType > &type)=0
virtual void visit(const std::shared_ptr< FunctionType > &type)=0
virtual void visit(const std::shared_ptr< NamedType > &type)=0
virtual void visit(const std::shared_ptr< EnumType > &type)=0
virtual void visit(const std::shared_ptr< ArrayType > &type)=0
virtual void visit(const std::shared_ptr< UnionType > &type)=0
virtual void visit(const std::shared_ptr< VoidType > &type)=0
virtual void visit(const std::shared_ptr< ReferenceType > &type)=0
virtual void visit(const std::shared_ptr< FloatingPointType > &type)=0
virtual void visit(const std::shared_ptr< StructType > &type)=0
Definition: archive_wrapper.h:19