retdec
array_type.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_ARRAY_TYPE_H
8 #define RETDEC_ARRAY_TYPE_H
9 
12 
13 namespace retdec {
14 namespace demangler {
15 namespace borland {
16 
20 class ArrayNode : public TypeNode
21 {
22 public:
23  static std::shared_ptr<ArrayNode> create(
24  Context &context,
25  std::shared_ptr<Node> pointee,
26  unsigned size,
27  const Qualifiers &quals);
28 
29  std::shared_ptr<Node> pointee();
30 
31  unsigned size();
32 
33  void printLeft(std::ostream &s) const override;
34 
35  void printRight(std::ostream &s) const override;
36 
37 private:
38  ArrayNode(
39  std::shared_ptr<Node> pointee,
40  unsigned size,
41  const Qualifiers &quals);
42 
43 private:
44  std::shared_ptr<Node> _pointee;
45  unsigned _size;
46 };
47 
48 } // borland
49 } // demangler
50 } // retdec
51 
52 #endif //RETDEC_ARRAY_TYPE_H
Representation of array types.
Definition: array_type.h:21
void printRight(std::ostream &s) const override
Definition: array_type.cpp:75
unsigned size()
Definition: array_type.cpp:53
static std::shared_ptr< ArrayNode > create(Context &context, std::shared_ptr< Node > pointee, unsigned size, const Qualifiers &quals)
Function for creating array types. If type the same type was already created, then that instance is r...
Definition: array_type.cpp:37
void printLeft(std::ostream &s) const override
Definition: array_type.cpp:66
std::shared_ptr< Node > pointee()
Definition: array_type.cpp:58
std::shared_ptr< Node > _pointee
Definition: array_type.h:44
ArrayNode(std::shared_ptr< Node > pointee, unsigned size, const Qualifiers &quals)
Definition: array_type.cpp:18
unsigned _size
Definition: array_type.h:45
Storage for functions, types and names. Used for cacheing.
Definition: context.h:38
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.