retdec
pointer_type.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_LLVMIR2HLL_IR_POINTER_TYPE_H
8 #define RETDEC_LLVMIR2HLL_IR_POINTER_TYPE_H
9 
12 
13 namespace retdec {
14 namespace llvmir2hll {
15 
16 class Visitor;
17 
24 class PointerType final: public Type {
25 public:
27 
28  virtual ShPtr<Value> clone() override;
29 
30  virtual bool isEqualTo(ShPtr<Value> otherValue) const override;
31 
32  void setContainedType(ShPtr<Type> newContainedType);
34 
37  virtual void accept(Visitor *v) override;
39 
40 private:
43 
44 private:
45  // Since instances are created by calling the static function create(), the
46  // constructor can be private.
48 };
49 
50 } // namespace llvmir2hll
51 } // namespace retdec
52 
53 #endif
A representation of a pointer type.
Definition: pointer_type.h:24
PointerType(ShPtr< Type > containedType)
Constructs a new pointer type.
Definition: pointer_type.cpp:19
static ShPtr< PointerType > create(ShPtr< Type > containedType)
Creates a new pointer type.
Definition: pointer_type.cpp:61
ShPtr< Type > getContainedType() const
Returns the contained type.
Definition: pointer_type.cpp:49
ShPtr< Type > containedType
Contained type.
Definition: pointer_type.h:42
void setContainedType(ShPtr< Type > newContainedType)
Sets a new contained type.
Definition: pointer_type.cpp:40
virtual bool isEqualTo(ShPtr< Value > otherValue) const override
Returns true if this value is equal to otherValue, false otherwise.
Definition: pointer_type.cpp:26
virtual ShPtr< Value > clone() override
Returns a clone of the value.
Definition: pointer_type.cpp:22
virtual void accept(Visitor *v) override
Visitor pattern implementation.
Definition: pointer_type.cpp:68
A base class of all types.
Definition: type.h:20
A base class of all visitors.
Definition: visitor.h:95
A base class of all types.
A library providing API for working with back-end IR.
std::shared_ptr< T > ShPtr
An alias for a shared pointer.
Definition: smart_ptr.h:18
Definition: archive_wrapper.h:19
Declarations, aliases, macros, etc. for the use of smart pointers.