summaryrefslogtreecommitdiff
path: root/ACE/TAO/TAO_IDL/be_include/be_visitor_home/home_ex_idl.h
blob: d47d19c42c8b26f98f0c7161aa46f820594c612f (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
//
// $Id$
//
/* -*- c++ -*- */
// ============================================================================
//
// = LIBRARY
//    TAO_IDL_BE
//
// = FILENAME
//    home_ex_idl.h
//
// = DESCRIPTION
//    Concrete visitor for the Home node.
//    Provides code generation for homes in the CIAO executor IDL
//
// = AUTHOR
//    Jeff Parsons
//
// ============================================================================

#ifndef _BE_HOME_HOME_EX_IDL_H_
#define _BE_HOME_HOME_EX_IDL_H_

class be_visitor_home_ex_idl : public be_visitor_scope
{
  //
  // = TITLE
  //   be_visitor_home_ex_idl
  //
  // = DESCRIPTION
  //   This is a concrete visitor to generate the 
  //   CIAO executor IDL for home.
  //
  //
public:
  be_visitor_home_ex_idl (be_visitor_context *ctx);

  ~be_visitor_home_ex_idl (void);

  virtual int visit_home (be_home *node);
  
  /// To regenerate attribute & operation declarations.
  virtual int visit_attribute (be_attribute *node);
  virtual int visit_operation (be_operation *node);
  virtual int visit_argument (be_argument *node);
  
  /// To regenerate the name of an anonymous type.
  /// Anonymous arrays are not allowed.
  virtual int visit_sequence (be_sequence *node);
  virtual int visit_string (be_string *node);
  
private:
  void gen_nesting_open (AST_Decl *node);
  void gen_nesting_close (AST_Decl *node);
  
  void gen_implicit (void);
  void gen_explicit (void);
  void gen_derived (void);
  
  void gen_supported (void);
  
  void gen_exception_list (UTL_ExceptList *exceptions,
                           const char *prefix = "",
                           bool init_op = false);
                           
  void gen_factories (void);
  void gen_finders (void);
  void gen_init_ops (AST_Home::INIT_LIST & list);
                     
  void gen_home_executor (void);
  
  /// The CCM preproc visitor changed the scoped name and the
  /// defined_in() for the home's members to the implied
  /// *Explicit interface, which isn't a problem unless
  /// they include exceptions raised by a contained operation.
  /// factory or finder. So we restore the members just in case.
  void restore_scope (void);
                           
private:
  be_home *node_;
  TAO_OutStream &os_;
};

#endif /* _BE_HOME_HOME_EX_IDL_H_ */