summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_interface/ami_interface_ch.cpp
blob: 4498273fb2654c442387fb65bab2e4072a100d00 (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
//
// $Id$
//

// ============================================================================
//
// = LIBRARY
//    TAO IDL
//
// = FILENAME
//    ami_interface_ch.cpp
//
// = DESCRIPTION
//    Visitor generating code for AMI Interfaces in the client header
//
// = AUTHOR
//    Aniruddha Gokhale,
//    Michael Kircher
//
// ============================================================================

#include        "idl.h"
#include        "idl_extern.h"
#include        "be.h"

#include "be_visitor_interface.h"

ACE_RCSID(be_visitor_interface, ami_interface_ch, "$Id$")


// ******************************************************
// Interface visitor for client header
// ******************************************************

be_visitor_ami_interface_ch::be_visitor_ami_interface_ch (be_visitor_context *ctx)
  : be_visitor_interface (ctx)
{
}

be_visitor_ami_interface_ch::~be_visitor_ami_interface_ch (void)
{
}

int
be_visitor_ami_interface_ch::visit_interface (be_interface *node)
{
  TAO_OutStream *os; // output stream

  if (!node->cli_hdr_gen () && !node->imported ()) // not already generated and
                                                   // not imported
    {
      // Grab the stream.
      os = this->ctx_->stream ();

      os->indent (); // start with whatever indentation level we are at

      // forward declaration
      *os << "class AMI_" << node->local_name () << "Handler;" << be_nl;

      // generate the _ptr declaration
      *os << "typedef AMI_" << node->local_name () 
          << "Handler *AMI_" << node->local_name ()
          << "Handler_ptr;" << be_nl << be_nl;

    }

  return 0;
}