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_
16 // ************************************************************
17 // class be_visitor_array
18 // ************************************************************
21 * @class be_visitor_array
23 * @brief be_visitor_array
25 * This is a generic visitor for arrays
27 class be_visitor_array
: public be_visitor_decl
31 be_visitor_array (be_visitor_context
*ctx
);
34 ~be_visitor_array (void);
36 /// visit the array node
37 virtual int visit_array (be_array
*);
39 // = Visitor methods on array types
42 virtual int visit_enum (be_enum
*node
);
44 /// visit an interface
45 virtual int visit_interface (be_interface
*node
);
47 /// visit an interface forward node
48 virtual int visit_interface_fwd (be_interface_fwd
*node
);
51 virtual int visit_valuebox (be_valuebox
*node
);
54 virtual int visit_valuetype (be_valuetype
*node
);
56 /// visit a valuetype forward node
57 virtual int visit_valuetype_fwd (be_valuetype_fwd
*node
);
59 /// visit a predefined type node
60 virtual int visit_predefined_type (be_predefined_type
*node
);
63 virtual int visit_sequence (be_sequence
*node
);
66 virtual int visit_string (be_string
*node
);
69 virtual int visit_structure (be_structure
*node
);
72 virtual int visit_typedef (be_typedef
*node
);
75 virtual int visit_union (be_union
*node
);
79 /// helper that does the common job
80 int visit_node (be_type
*);
82 /// helper that does the common job
83 int emit_common (be_type
*node
);
87 #endif /* _BE_VISITOR_ARRAY_ARRAY_H_*/