summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_exception/exception_ci.cpp
blob: 69ffb0d436a966fa08c3e940af03d3d245427b50 (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    exception_ci.cpp
 *
 *  Visitor generating code for Exception in the inline file.
 *
 *  @author Aniruddha Gokhale
 */
//=============================================================================

#include "exception.h"

be_visitor_exception_ci::be_visitor_exception_ci (be_visitor_context *ctx)
  : be_visitor_exception (ctx)
{
}

be_visitor_exception_ci::~be_visitor_exception_ci (void)
{
}

// visit the Exception node and its scope
int be_visitor_exception_ci::visit_exception (be_exception *node)
{
  if (node->cli_inline_gen () || node->imported ())
    {
      return 0;
    }

  // Generate inline code  required of any anonymous types of members.
  if (this->visit_scope (node) == -1)
    {
      ACE_ERROR_RETURN ((LM_ERROR,
                         "(%N:%l) be_visitor_exception::"
                         "visit_exception -"
                         "code for inline failed\n"),
                        -1);
    }

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