summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be_include/be_visitor_argument/argument.h
blob: 882c8003b4ad269ca293aa4de143f042b7436987 (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$
//

// ============================================================================
//
// = LIBRARY
//    TAO IDL
//
// = FILENAME
//    argument.h
//
// = DESCRIPTION
//    Visitors for generation of code for Arguments
//
// = AUTHOR
//    Aniruddha Gokhale
//
// ============================================================================

#ifndef _BE_VISITOR_ARGUMENT_ARGUMENT_H_
#define _BE_VISITOR_ARGUMENT_ARGUMENT_H_

class be_visitor_args : public be_visitor_decl
{
  //
  // = TITLE
  //   Generates the code for arguments output.
  //
  // = DESCRIPTION
  //   At several stages in the code generation a node of type
  //   "be_operation" is visited, and the code for its arguments must
  //   be generated.
  //   Sometimes the argument declarations must be generated (such as
  //   in the class declaration), other the arguments names (such as
  //   in method invocations).
  //   This class implements some common functionality required across all
  //   argument visitors
  //
public:
  be_visitor_args (be_visitor_context *ctx);
  // constructor

  virtual ~be_visitor_args (void);
  // destructor

  //= helper
  virtual const char *type_name (be_type *type, const char *suffix=0);
  // helper that produces either a nested name for header files or full name
  // for others

  virtual AST_Argument::Direction direction (void);
  // return the direction of the argument node

  virtual int visit_argument (be_argument *node);
  // must be overridden by derived classes
};

#endif /* _BE_VISITOR_ARGUMENT_ARGUMENT_H_ */