2 //=============================================================================
6 * Visitors for generation of code for Arrays.
8 * @author Aniruddha Gokhale
10 //=============================================================================
13 #ifndef _BE_VISITOR_ARRAY_ARRAY_H_
14 #define _BE_VISITOR_ARRAY_ARRAY_H_
17 * @class be_visitor_array
19 * @brief be_visitor_array
21 * This is a generic visitor for arrays
23 class be_visitor_array
: public be_visitor_decl
27 be_visitor_array (be_visitor_context
*ctx
);
32 /// visit the array node
33 virtual int visit_array (be_array
*);
35 // = Visitor methods on array types
38 virtual int visit_enum (be_enum
*node
);
40 /// visit an interface
41 virtual int visit_interface (be_interface
*node
);
43 /// visit an interface forward node
44 virtual int visit_interface_fwd (be_interface_fwd
*node
);
47 virtual int visit_valuebox (be_valuebox
*node
);
50 virtual int visit_valuetype (be_valuetype
*node
);
52 /// visit a valuetype forward node
53 virtual int visit_valuetype_fwd (be_valuetype_fwd
*node
);
55 /// visit a predefined type node
56 virtual int visit_predefined_type (be_predefined_type
*node
);
59 virtual int visit_sequence (be_sequence
*node
);
62 virtual int visit_string (be_string
*node
);
65 virtual int visit_structure (be_structure
*node
);
68 virtual int visit_typedef (be_typedef
*node
);
71 virtual int visit_union (be_union
*node
);
74 /// helper that does the common job
75 int visit_node (be_type
*);
77 /// helper that does the common job
78 int emit_common (be_type
*node
);
81 #endif /* _BE_VISITOR_ARRAY_ARRAY_H_*/