Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / TAO_IDL / be_include / be_visitor.h
blob7c95f2f9c491a3e5021aa362e9cdf4bb9fa25c34
2 /* -*- c++ -*- */
3 //=============================================================================
4 /**
5 * @file be_visitor.h
7 * The abstract visitor class. The concrete classes are responsible for code
8 * generation.
10 * @author Copyright 1994-1995 by Sun Microsystems
11 * @author Inc. and Carlos O'Ryan
12 * @author Aniruddha Gokhale
14 //=============================================================================
16 #ifndef TAO_BE_VISITOR_H
17 #define TAO_BE_VISITOR_H
19 class be_decl;
20 class be_scope;
21 class be_type;
22 class be_predefined_type;
23 class be_module;
24 class be_interface;
25 class be_interface_fwd;
26 class be_valuebox;
27 class be_valuetype;
28 class be_valuetype_fwd;
29 class be_eventtype;
30 class be_eventtype_fwd;
31 class be_component;
32 class be_component_fwd;
33 class be_template_module;
34 class be_template_module_inst;
35 class be_template_module_ref;
36 class be_porttype;
37 class be_provides;
38 class be_uses;
39 class be_publishes;
40 class be_emits;
41 class be_consumes;
42 class be_extended_port;
43 class be_mirror_port;
44 class be_connector;
45 class be_home;
46 class be_factory;
47 class be_finder;
48 class be_structure;
49 class be_structure_fwd;
50 class be_exception;
51 class be_expression;
52 class be_enum;
53 class be_operation;
54 class be_field;
55 class be_argument;
56 class be_attribute;
57 class be_union;
58 class be_union_fwd;
59 class be_union_branch;
60 class be_union_label;
61 class be_constant;
62 class be_enum_val;
63 class be_array;
64 class be_sequence;
65 class be_map;
66 class be_string;
67 class be_typedef;
68 class be_root;
69 class be_native;
70 class be_fixed;
71 class be_param_holder;
73 class be_visitor_context;
74 class TAO_OutStream;
76 /**
77 * @class be_visitor
79 * @brief Base class for visitors.
81 * To implement code generation we use the "Visitor Pattern", this
82 * is the abstract "Visitor".
83 * The "visit" methods are not pure virtual to facilitate the
84 * implementation of simple visitors that only override a few.
86 class be_visitor
88 public:
89 virtual ~be_visitor ();
91 virtual int visit_decl (be_decl *d);
92 virtual int visit_scope (be_scope *node);
93 virtual int visit_type (be_type *node);
94 virtual int visit_predefined_type (be_predefined_type *node);
95 virtual int visit_module (be_module *node);
96 virtual int visit_interface (be_interface *node);
97 virtual int visit_interface_fwd (be_interface_fwd *node);
98 virtual int visit_valuebox (be_valuebox *node);
99 virtual int visit_valuetype (be_valuetype *node);
100 virtual int visit_valuetype_fwd (be_valuetype_fwd *node);
101 virtual int visit_eventtype (be_eventtype *node);
102 virtual int visit_eventtype_fwd (be_eventtype_fwd *node);
103 virtual int visit_component (be_component *node);
104 virtual int visit_component_fwd (be_component_fwd *node);
105 virtual int visit_template_module (be_template_module *node);
106 virtual int visit_template_module_inst (be_template_module_inst *node);
107 virtual int visit_template_module_ref (be_template_module_ref *node);
108 virtual int visit_param_holder (be_param_holder *node);
109 virtual int visit_porttype (be_porttype *node);
110 virtual int visit_provides (be_provides *node);
111 virtual int visit_uses (be_uses *node);
112 virtual int visit_publishes (be_publishes *node);
113 virtual int visit_emits (be_emits *node);
114 virtual int visit_consumes (be_consumes *node);
115 virtual int visit_extended_port (be_extended_port *node);
116 virtual int visit_mirror_port (be_mirror_port *node);
117 virtual int visit_connector (be_connector *node);
118 virtual int visit_home (be_home *node);
119 virtual int visit_factory (be_factory *node);
120 virtual int visit_finder (be_finder *node);
121 virtual int visit_structure (be_structure *node);
122 virtual int visit_structure_fwd (be_structure_fwd *node);
123 virtual int visit_exception (be_exception *node);
124 virtual int visit_expression (be_expression *node);
125 virtual int visit_enum (be_enum *node);
126 virtual int visit_operation (be_operation *node);
127 virtual int visit_field (be_field *node);
128 virtual int visit_argument (be_argument *node);
129 virtual int visit_attribute (be_attribute *node);
130 virtual int visit_union (be_union *node);
131 virtual int visit_union_fwd (be_union_fwd *node);
132 virtual int visit_union_branch (be_union_branch *node);
133 virtual int visit_union_label (be_union_label *node);
134 virtual int visit_constant (be_constant *node);
135 virtual int visit_enum_val (be_enum_val *node);
136 virtual int visit_array (be_array *node);
137 virtual int visit_sequence (be_sequence *node);
138 virtual int visit_map (be_map *node);
139 virtual int visit_string (be_string *node);
140 virtual int visit_typedef (be_typedef *node);
141 virtual int visit_root (be_root *node);
142 virtual int visit_native (be_native *node);
143 virtual int visit_fixed (be_fixed *node);
145 protected:
146 // Not abstract but we want to force subclassing anyway.
147 be_visitor ();
150 #endif // TAO_BE_VISITOR_H