summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be_include/be_visitor_tmplinst/tmplinst_cs.h
blob: 295e6bb032c2600bcd19ada7de9a1705e51c9e79 (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
//=============================================================================
/**
*  @file   be_visitor_tmplinst_cs.h
*
*  $Id$
*
*  This visitor generates explicit template instantiations, guarded so they
*  are seen only by compilers whose platforms require explicit template
*  instantiation.
*
*  @author Jeff Parsons <j.parsons@vanderbilt.edu>
*/
//=============================================================================
#ifndef TAO_BE_VISITOR_TMPLINST_CS_H
#define TAO_BE_VISITOR_TMPLINST_CS_H

#include "tmplinst.h"

/**
 * @class be_visitor_tmplinst_cs
 *
 * @brief Generates explicit template instantiations for the stub.
 */
class be_visitor_tmplinst_cs : public be_visitor_tmplinst
{
public:
  be_visitor_tmplinst_cs (be_visitor_context *ctx);

  virtual ~be_visitor_tmplinst_cs (void);

  virtual int visit_array (be_array *node);

  virtual int visit_attribute (be_attribute *node);

  virtual int visit_enum (be_enum *node);

  virtual int visit_interface (be_interface *node);

  virtual int visit_valuetype (be_valuetype *node);

  virtual int visit_operation (be_operation *node);

  virtual int visit_sequence (be_sequence *node);

  virtual int visit_string (be_string *node);

  virtual int visit_structure (be_structure *node);

  virtual int visit_union (be_union *node);

protected:
  virtual idl_bool this_mode_generated (be_decl *node) const;
  virtual void this_mode_generated (be_decl *node, 
                                    idl_bool val);

  // Generate explicit template instantiations for our _var
  // and _out classes.
  int gen_varout_tmplinst (be_sequence *node,
                           be_type *bt);

  // Generate explicit instantiation for our element type, if
  // it is a managed type.
  void gen_managed_type_tmplinst (be_sequence *node,
                                  be_type *bt);

  // Generate explicit instantiation for the base class type.
  int gen_base_class_tmplinst (be_sequence *node);

  void gen_common_tmplinst (be_type *node,
                            TAO_OutStream *os);
  // Generate explicit template instantiations for structs and unions.
};


#endif // TAO_BE_VISITOR_TMPLINST_CS_H