summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be_include/be_visitor_module.h
blob: 0a1f64a4496143dfe721d5322aa51f4722657700 (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
/* -*- c++ -*- */
//
// $Id$
//

// ============================================================================
//
// = LIBRARY
//    TAO IDL
//
// = FILENAME
//    be_visitor_module.h
//
// = DESCRIPTION
//    Concrete visitor for the Module class
//
// = AUTHOR
//    Aniruddha Gokhale
//
// ============================================================================

#if !defined (TAO_BE_VISITOR_MODULE_H)
#define TAO_BE_VISITOR_MODULE_H

#include "be_visitor.h"
#include "be_visitor_scope.h"

class be_visitor_module : public be_visitor_scope
{
  //
  // = TITLE
  //   be_visitor_module
  //
  // = DESCRIPTION
  //   This is a concrete visitor for module that abstracts all common tasks
  //

public:
  be_visitor_module (be_visitor_context *ctx);
  // constructor

  ~be_visitor_module (void);
  // destructor

  // =visit methods on all elements syntactically valid in a Module scope

  virtual int visit_constant (be_constant *node);
  // visit a constant

  virtual int visit_enum (be_enum *node);
  // visit an enum

  virtual int visit_exception (be_exception *node);
  // visit an exception

  virtual int visit_interface (be_interface *node);
  // visit an interface

  virtual int visit_interface_fwd (be_interface_fwd *node);
  // visit an interface

  virtual int visit_module (be_module *node);
  // visit a module

  virtual int visit_structure (be_structure *node);
  // visit a structure

  virtual int visit_union (be_union *node);
  // visit a union

  virtual int visit_typedef (be_typedef *node);
  // visit the typedef node

};

// we need derived module visitors for the client and server header files. For
// the others, they use the default module visitor

class be_visitor_module_ch : public be_visitor_module
{
  //
  // = TITLE
  //   be_visitor_module_ch
  //
  // = DESCRIPTION
  //   This is a concrete visitor to generate the client header for module
  //
  //
public:
  be_visitor_module_ch (be_visitor_context *ctx);
  // constructor

  ~be_visitor_module_ch (void);
  // destructor

  virtual int visit_module (be_module *node);
  // visit module. We provide code for this method in the derived class

};

class be_visitor_module_sh : public be_visitor_module
{
  //
  // = TITLE
  //   be_visitor_module_sh
  //
  // = DESCRIPTION
  //   This is a concrete visitor to generate the server header for module
  //
  //
public:
  be_visitor_module_sh (be_visitor_context *ctx);
  // constructor

  ~be_visitor_module_sh (void);
  // destructor

  virtual int visit_module (be_module *node);
  // visit module. We provide code for this method in the derived class

};


#endif // TAO_BE_VISITOR_MODULE_H