blob: dce8faf3a6123f97112eea88b116ff7fdde46644 (
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
|
//
// $Id$
//
#ifndef _BE_VISITOR_INTERFACE_H
#define _BE_VISITOR_INTERFACE_H
#include "be_visitor.h"
// = DESCRIPTION
// Interface code generation is complex, the client stubs require
// two different class and the server also require other two.
// Only onw of them includes whatever nested typedefs, exceptions
// and or structures are defined in the interface.
// To break this complexity a different visitor is used for each
// case.
//
// = NOTE
// Visitors were added recently into the compiler, so some
// code is still generated using the old "state oriented" approach;
// notably only the _collocated class is actually generated using
// the visitor, in the other cases (the interface class and the
// skeleton class) we still call back the old code generation
// methods.
//
class be_visitor_collocated_sh : public be_visitor
{
// = TITLE
// Generate the "collocated" class declaration.
public:
be_visitor_collocated_sh (void);
virtual ~be_visitor_collocated_sh (void);
virtual int visit_interface (be_interface *node);
virtual int visit_operation (be_operation *node);
virtual int visit_attribute (be_attribute *node);
};
class be_visitor_collocated_ss : public be_visitor
{
// = TITLE
// Generate the "collocated" class declaration.
public:
be_visitor_collocated_ss (void);
virtual ~be_visitor_collocated_ss (void);
virtual int visit_interface (be_interface *node);
virtual int visit_operation (be_operation *node);
virtual int visit_argument (be_argument *node);
virtual int visit_attribute (be_attribute *node);
private:
be_interface* current_interface_;
};
#endif // _BE_VISITOR_INTERFACE_H
|