summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_structure_fwd/structure_fwd_ch.cpp
blob: 6bbe50fb75724c73e91c6e0fc413d81ee423b5c1 (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

//=============================================================================
/**
 *  @file    structure_fwd_ch.cpp
 *
 *  Visitor generating code for be_structure_fwd node in the client header.
 *
 *  @author Jeff Parsons
 */
//=============================================================================

#include "structure_fwd.h"

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

be_visitor_structure_fwd_ch::~be_visitor_structure_fwd_ch ()
{
}

// Visit the interface_fwd_ch node.
int
be_visitor_structure_fwd_ch::visit_structure_fwd (be_structure_fwd *node)
{
  if (node->cli_hdr_gen () || node->imported ())
    {
      return 0;
    }

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

  be_structure *fd =
    dynamic_cast<be_structure*> (node->full_definition ());

  // This will be a no-op if it has already been done for this node.
  fd->gen_common_varout (os);

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