~ubuntu-branches/ubuntu/breezy/ace/breezy

« back to all changes in this revision

Viewing changes to TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ci.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad, Benjamin Montgomery, Adam Conrad
  • Date: 2005-09-18 22:51:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge) (0.1.2 woody)
  • Revision ID: james.westby@ubuntu.com-20050918225138-seav22q6fyylb536
Tags: 5.4.7-3ubuntu1
[ Benjamin Montgomery ]
* Added a patch for amd64 and powerpc that disables the compiler
  option -fvisibility-inlines-hidden

[ Adam Conrad ]
* Added DPATCH_OPTION_CPP=1 to debian/patches/00options to make
  Benjamin's above changes work correctly with dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//
2
 
// cdr_op_ci.cpp,v 1.6 2002/09/28 02:35:42 parsons Exp
3
 
//
4
 
 
5
 
// ================================================================
6
 
//
7
 
// = LIBRARY
8
 
//    TAO IDL
9
 
//
10
 
// = FILENAME
11
 
//    cdr_op_ci.cpp
12
 
//
13
 
// = DESCRIPTION
14
 
//    Visitor generating code for CDR operators for forward
15
 
//    declarations of valuetypes. This uses compiled marshaling.
16
 
//
17
 
// = AUTHOR
18
 
//    Torsten Kuepper based on code from
19
 
//    Aniruddha Gokhale & Carlos O'Ryan (cdr_op_ci.cpp)
20
 
//
21
 
// ================================================================
22
 
 
23
 
ACE_RCSID (be_visitor_valuetype_fwd, 
24
 
           cdr_op_ci, 
25
 
           "cdr_op_ci.cpp,v 1.6 2002/09/28 02:35:42 parsons Exp")
26
 
 
27
 
// ****************************************************************
28
 
// Interface visitor for generating CDR operator declarations in the
29
 
// client header
30
 
// ****************************************************************
31
 
 
32
 
be_visitor_valuetype_fwd_cdr_op_ci::be_visitor_valuetype_fwd_cdr_op_ci (
33
 
    be_visitor_context *ctx
34
 
  )
35
 
  : be_visitor_decl (ctx)
36
 
{
37
 
}
38
 
 
39
 
be_visitor_valuetype_fwd_cdr_op_ci::~be_visitor_valuetype_fwd_cdr_op_ci (
40
 
    void
41
 
  )
42
 
{
43
 
}
44
 
 
45
 
int
46
 
be_visitor_valuetype_fwd_cdr_op_ci::visit_valuetype_fwd (
47
 
    be_valuetype_fwd *node
48
 
  )
49
 
{
50
 
  AST_Interface *fd = node->full_definition ();
51
 
  be_valuetype *bfd = be_valuetype::narrow_from_decl (fd);
52
 
 
53
 
  // Check if it's imported vt or CDR ops already generated.
54
 
  if (node->cli_inline_cdr_op_gen () || node->imported ())
55
 
    {
56
 
      return 0;
57
 
    }
58
 
 
59
 
  // Is we are defined leater then let the real VT to generate
60
 
  // all this stuff.
61
 
  if (bfd->is_defined ())
62
 
    {
63
 
      return 0;
64
 
    }
65
 
 
66
 
  // Generate helper functions declaration.
67
 
  if (bfd->gen_helper_inline () == -1)
68
 
    {
69
 
      ACE_ERROR_RETURN ((LM_ERROR,
70
 
                         "(%N:%l) be_visitor_valuetype_cdr_op_ch::"
71
 
                         "visit_valuetype - "
72
 
                         "codegen for helper functions failed\n"), -1);
73
 
    }
74
 
 
75
 
  TAO_OutStream *os = this->ctx_->stream ();
76
 
 
77
 
  // generate the CDR << and >> operator declarations (prototypes)
78
 
 
79
 
  //@@ Boris: Can I move this to be_valuetype? (as with _var, _out, etc?)
80
 
 
81
 
  *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
82
 
      << "// " << __FILE__ << ":" << __LINE__ 
83
 
      << be_nl << be_nl;
84
 
 
85
 
  //This is just declaration so no ACE_INLINE
86
 
  *os << be_global->stub_export_macro ()
87
 
      << " CORBA::Boolean operator<< (TAO_OutputCDR &, const "
88
 
      << node->full_name () << " *);" << be_nl;
89
 
 
90
 
  *os << be_global->stub_export_macro ()
91
 
      << " CORBA::Boolean operator>> (TAO_InputCDR &, "
92
 
      << node->full_name () << " *&);";
93
 
 
94
 
  // Done with this.
95
 
  node->cli_inline_cdr_op_gen (I_TRUE);
96
 
  return 0;
97
 
}