summaryrefslogtreecommitdiff
path: root/modules/TAO/TAO_IDL/be_include/be_visitor_reifying.h
blob: ceed34503e67b4ee757bd0e3f99c905b5f4a4e57 (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
//
// $Id$
//

/* -*- c++ -*- */
// ============================================================================
//
// = LIBRARY
//    TAO IDL
//
// = FILENAME
//    be_visitor_reifying.h
//
// = DESCRIPTION
//    This visitor visits a be_param_holder, finds the corresponding
//    template argument, looks up or creates the type, and stores
//    it for retrieval and use in the template module
//    instantiation visitor
//
// = AUTHOR
//    Jeff Parsons
//
// ============================================================================

#ifndef TAO_BE_VISITOR_REIFYING_H
#define TAO_BE_VISITOR_REIFYING_H

#include "be_visitor_decl.h"

class AST_Decl;

class be_param_holder;

class be_visitor_reifying : public be_visitor_decl
{
  //
  // = TITLE
  //   be_visitor_reifying
  //
  // = DESCRIPTION
  //   Reifies a template argument that has been substituted for
  //   a template parameter reference. Complete reification may
  //   include further reification, for example of array
  //   dimensions, or creating a copy of the template argument
  //   node (if it is itself defined inside a template module)
  //   for addition to the scope of the template module
  //   instantiation.
  //
public:
  be_visitor_reifying (be_visitor_context *ctx);

  virtual ~be_visitor_reifying (void);
  
  AST_Decl *reified_node (void) const;

  virtual int visit_interface (be_interface *node);
  virtual int visit_array (be_array *node);
  virtual int visit_sequence (be_sequence *node);
  virtual int visit_predefined_type (be_predefined_type *node);
  virtual int visit_constant (be_constant *node);
  virtual int visit_param_holder (be_param_holder *node);
  
private:
  bool declared_in_template_module (AST_Decl *d);
  
private:
  AST_Decl *reified_node_;
};

#endif // TAO_BE_VISITOR_REIFYING_H