retdec
reference_type.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_REFERENCE_TYPE_H
8 #define RETDEC_REFERENCE_TYPE_H
9 
12 
13 namespace retdec {
14 namespace demangler {
15 namespace borland {
16 
21 {
22 public:
23  static std::shared_ptr<ReferenceTypeNode> create(
24  Context &context,
25  std::shared_ptr<Node> pointee);
26 
27  std::shared_ptr<Node> pointee();
28 
29  void printLeft(std::ostream &s) const override;
30 
31  void printRight(std::ostream &s) const override;
32 
33 private:
34  explicit ReferenceTypeNode(std::shared_ptr<Node> pointee);
35 
36 private:
37  std::shared_ptr<Node> _pointee;
38 };
39 
40 } // borland
41 } // demangler
42 } // retdec
43 
44 #endif //RETDEC_REFERENCE_TYPE_H
Storage for functions, types and names. Used for cacheing.
Definition: context.h:38
Representation of l-value references.
Definition: reference_type.h:21
static std::shared_ptr< ReferenceTypeNode > create(Context &context, std::shared_ptr< Node > pointee)
Function for creating references. If type the same type was already created, then that instance is re...
Definition: reference_type.cpp:33
std::shared_ptr< Node > _pointee
Definition: reference_type.h:37
void printRight(std::ostream &s) const override
Prints right side of reference type. Used for array and funtion types.
Definition: reference_type.cpp:75
void printLeft(std::ostream &s) const override
Prints left side of reference type or whole, depending on pointee. Right side printing is used for ar...
Definition: reference_type.cpp:59
std::shared_ptr< Node > pointee()
Definition: reference_type.cpp:50
ReferenceTypeNode(std::shared_ptr< Node > pointee)
Definition: reference_type.cpp:19
Base class for all type nodes.
Definition: type_node.h:21
Storage for all created nodes in borland AST.
Definition: archive_wrapper.h:19
Base class for all types in borland AST.