blob: 4f8f6d9844bff86bd30452f7e0e35087c431be6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
//
// $Id$
//
/* -*- c++ -*- */
// ============================================================================
//
// = LIBRARY
// TAO IDL
//
// = FILENAME
// be_visitor.h
//
// = DESCRIPTION
// The abstract visitor class. The concrete classes are responsible for code
// generation.
//
// = AUTHOR
// Copyright 1994-1995 by Sun Microsystems, Inc.
// and
// Carlos O'Ryan, Aniruddha Gokhale
//
// ============================================================================
#if !defined (TAO_BE_VISITOR_H)
#define TAO_BE_VISITOR_H
class be_decl;
class be_scope;
class be_type;
class be_predefined_type;
class be_module;
class be_interface;
class be_interface_fwd;
class be_structure;
class be_exception;
class be_expression;
class be_enum;
class be_operation;
class be_field;
class be_argument;
class be_attribute;
class be_union;
class be_union_branch;
class be_union_label;
class be_constant;
class be_enum_val;
class be_array;
class be_sequence;
class be_string;
class be_typedef;
class be_root;
class be_native;
class be_visitor_context;
class TAO_OutStream;
class be_visitor
{
//
// = TITLE
// Base class for visitors.
//
// = DESCRIPTION
// To implement code generation we use the "Visitor Pattern", this
// is the abstract "Visitor".
// The "visit" methods are not pure virtual to facilitate the
// implementation of simple visitors that only override a few.
//
public:
virtual ~be_visitor (void);
virtual int visit_decl (be_decl *d);
// visit a decl node
virtual int visit_scope (be_scope *node);
// visit the scope
virtual int visit_type (be_type *node);
// visit the type
virtual int visit_predefined_type (be_predefined_type *node);
// visit the predefined type
virtual int visit_module (be_module *node);
// visit module
virtual int visit_interface (be_interface *node);
// visit interface
virtual int visit_interface_fwd (be_interface_fwd *node);
// visit interface_fwd
virtual int visit_structure (be_structure *node);
// visit a structure
virtual int visit_exception (be_exception *node);
// visit exception
virtual int visit_expression (be_expression *node);
// visit expression
virtual int visit_enum (be_enum *node);
// visit an enum
virtual int visit_operation (be_operation *node);
// visit an operation
virtual int visit_field (be_field *node);
// visit a field
virtual int visit_argument (be_argument *node);
// visit argument
virtual int visit_attribute (be_attribute *node);
// visit an attribute
virtual int visit_union (be_union *node);
// visit union
virtual int visit_union_branch (be_union_branch *node);
// visit union branch
virtual int visit_union_label (be_union_label *node);
// visit union label
virtual int visit_constant (be_constant *node);
// visit a constant
virtual int visit_enum_val (be_enum_val *node);
// visit enum val
virtual int visit_array (be_array *node);
// visit an array
virtual int visit_sequence (be_sequence *node);
// visit a sequence
virtual int visit_string (be_string *node);
// visit a string
virtual int visit_typedef (be_typedef *node);
// visit a typedef
virtual int visit_root (be_root *node);
// visit a root
virtual int visit_native (be_native *node);
// visit a native
protected:
be_visitor (void);
// constructor is protected
};
#endif // TAO_BE_VISITOR_H
|