retdec
pointer_type.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_POINTER_TYPE_H
8 #define RETDEC_POINTER_TYPE_H
9 
12 
13 namespace retdec {
14 namespace demangler {
15 namespace borland {
16 
20 class PointerTypeNode : public TypeNode
21 {
22 public:
23  static std::shared_ptr<PointerTypeNode> create(
24  Context &context,
25  const std::shared_ptr<Node> &pointee,
26  const Qualifiers &quals);
27 
28  std::shared_ptr<Node> pointee();
29 
30  void printLeft(std::ostream &s) const override;
31 
32  void printRight(std::ostream &s) const override;
33 
34 private:
36  const std::shared_ptr<Node> &pointee,
37  const Qualifiers &quals);
38 
39 private:
40  std::shared_ptr<Node> _pointee;
41 };
42 
43 } // borland
44 } // demangler
45 } // retdec
46 
47 #endif //RETDEC_POINTER_TYPE_H
Storage for functions, types and names. Used for cacheing.
Definition: context.h:38
Representation of pointers.
Definition: pointer_type.h:21
void printRight(std::ostream &s) const override
Prints right side of pointer type. Used for array and funtion types.
Definition: pointer_type.cpp:77
static std::shared_ptr< PointerTypeNode > create(Context &context, const std::shared_ptr< Node > &pointee, const Qualifiers &quals)
Function for creating pointers. If type the same type was already created, then that instance is retu...
Definition: pointer_type.cpp:33
void printLeft(std::ostream &s) const override
Prints left side of pointer type or whole, depending on pointee. Right side printing is used for arra...
Definition: pointer_type.cpp:60
std::shared_ptr< Node > pointee()
Definition: pointer_type.cpp:51
std::shared_ptr< Node > _pointee
Definition: pointer_type.h:40
PointerTypeNode(const std::shared_ptr< Node > &pointee, const Qualifiers &quals)
Definition: pointer_type.cpp:18
Definition: qualifiers.h:20
Base class for all type nodes.
Definition: type_node.h:21
Qualifiers quals()
Definition: type_node.cpp:23
Storage for all created nodes in borland AST.
Definition: archive_wrapper.h:19
Base class for all types in borland AST.