summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be_include/be_visitor_operation/argument_marshal.h
blob: 2a4802db35105936d986d4a8f4a79b812a2c15e2 (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
//
// $Id$
//

// ============================================================================
//
// = LIBRARY
//    TAO IDL
//
// = FILENAME
//    argument_marshal.h
//
// = DESCRIPTION
//    Visitor for generating code for IDL operations. This is a visitor for
//    passing arguments to the CDR operators in a compiled marshaling
//    stub/skeleton
//
// = AUTHOR
//    Aniruddha Gokhale
//
// ============================================================================

#ifndef _BE_VISITOR_OPERATION_ARGUMENT_MARSHAL_H_
#define _BE_VISITOR_OPERATION_ARGUMENT_MARSHAL_H_

// ************************************************************
// generic operation visitor for docall, upcall, pre/post
// ************************************************************

class be_compiled_visitor_operation_argument_marshal
  : public be_visitor_operation_argument
{
  //
  // = TITLE
  //   be_compiled_visitor_operation_argument_marshal
  //
  // = DESCRIPTION
  //   This is a visitor to generate a variable declaration of an operation
  //   return type
  //
public:
  be_compiled_visitor_operation_argument_marshal (be_visitor_context *ctx);
  // constructor

  ~be_compiled_visitor_operation_argument_marshal (void);
  // destructor

  virtual int pre_process (be_decl *bd);
  // stuff to o/p before each element of the scope is handled

  virtual int post_process (be_decl *bd);
  // stuff to o/p after each element of the scope is handled

  enum LAST_ARG_PRINTED
  {
    TAO_ARG_NONE,
    TAO_ARG_IN,
    TAO_ARG_INOUT,
    TAO_ARG_OUT
  };

private:
  LAST_ARG_PRINTED last_arg_printed_;
};

// ****************************************************************

class be_visitor_compiled_args_decl : public be_visitor_scope
{
  //
  // = TITLE
  //   be_visitor_compiled_args_decl
  //
  // = DESCRIPTION
  //   This is a visitor to generate variables declarations in the
  //   compiled marshaling stubs.
  //
public:
  be_visitor_compiled_args_decl (be_visitor_context *ctx);
  // constructor

  int visit_array (be_array *node);
  int visit_typedef (be_typedef *node);
  int visit_argument (be_argument *node);
  int visit_operation (be_operation *node);
};

#endif /* _BE_VISITOR_OPERATION_ARGUMENT_MARSHAL_H_ */