summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_union_fwd/union_fwd_ch.cpp
blob: 455b4fdec48b1362ddf63dabaad2821b2833c363 (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
//
// $Id$
//

// ============================================================================
//
// = LIBRARY
//    TAO IDL
//
// = FILENAME
//    union_fwd_ch.cpp
//
// = DESCRIPTION
//    Visitor generating code for be_union_fwd node in the client header.
//
// = AUTHOR
//    Jeff Parsons
//
// ============================================================================

ACE_RCSID (be_visitor_union_fwd, 
           union_fwd_ch, 
           "$Id$")

be_visitor_union_fwd_ch::be_visitor_union_fwd_ch (
    be_visitor_context *ctx
  )
  : be_visitor_decl (ctx)
{
}

be_visitor_union_fwd_ch::~be_visitor_union_fwd_ch (void)
{
}

// Visit the interface_fwd_ch node and its scope.
int
be_visitor_union_fwd_ch::visit_union_fwd (be_union_fwd *node)
{
  if (node->cli_hdr_gen () || node->imported ())
    {
      return 0;
    }

  TAO_OutStream *os = this->ctx_->stream ();

  *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
      << "// " << __FILE__ << ":" << __LINE__;

  // Generate a forward declaration of the class.
  *os << be_nl << be_nl
      << "class " << node->local_name () << ";";

  node->cli_hdr_gen (I_TRUE);
  return 0;
}