summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be_include/be_visitor_operation/operation_ss.h
blob: 1b73adb8edd2f52e1f3d4a40b984a27f64aa02bd (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
//
// $Id$
//

// ============================================================================
//
// = LIBRARY
//    TAO IDL
//
// = FILENAME
//    operation_ss.h
//
// = DESCRIPTION
//    Visitor for generating code for IDL operations in server skeletons
//
// = AUTHOR
//    Aniruddha Gokhale
//
// ============================================================================

#ifndef _BE_VISITOR_OPERATION_OPERATION_SS_H_
#define _BE_VISITOR_OPERATION_OPERATION_SS_H_

// ************************************************************
// Operation visitor for server skeletons
// ************************************************************

class be_visitor_operation_ss : public be_visitor_operation
{
  //
  // = TITLE
  //   be_visitor_operation_ss
  //
  // = DESCRIPTION
  //   This is a concrete visitor to generate the server skeletons for operation
  //
  //
public:
  be_visitor_operation_ss (be_visitor_context *ctx);
  // constructor

  ~be_visitor_operation_ss (void);
  // destructor

  virtual int visit_operation (be_operation *node);
  // visit operation. We provide code for this method in the derived class

  virtual int visit_argument (be_argument *node);
  // visit argument to generate ParamData entries

  // template methods

  virtual int gen_pre_skel_info (be_operation *node);
  // generate any pre skeleton code info

  virtual int gen_demarshal_params (be_operation *node, 
                                    be_type *bt);
  // generate code for demarshaling incoming parameters

  virtual int gen_marshal_params (be_operation *node, 
                                  be_type *bt);
  // generate code for marshaling outgoing parameters

  // = helper
  virtual int post_process (be_decl *);
  // stuff to output after every member of the scope is handled

  virtual int gen_raise_exception (be_type *,
                                   const char *excep,
                                   const char *status,
                                   const char *env);
  // helper that generates code for raising an exception

  virtual int gen_check_exception (be_type *, const char *env);
  // helper that generates code for checking for an exception

  virtual int gen_check_interceptor_exception (be_type *, const char *env);
  // helper that generates code for checking for an exception within
  // an interceptor try block.

  virtual const char *compute_operation_name (be_operation *node);
  // Compute the servant operation name to invoke.  Notice that
  // this method _does_ include the double-quotes.

private:
  char *operation_name_;
};

#endif /* _BE_VISITOR_OPERATION_OPERATION_SS_H_ */