blob: ba97a4d4afa62d17ec3d88751e6b8ddf6f810d3d (
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
|
// $Id$
// ============================================================================
//
// = LIBRARY
// TAO_IDL_BE
//
// = FILENAME
// be_null_return_emitter.cpp
//
// = DESCRIPTION
// Emits 'return x;' for all CORBA types and ACE-supported
// platforms.
//
// = AUTHOR
// Jeff Parsons
//
// ============================================================================
#include "be_null_return_emitter.h"
#include "be_visitor_null_return_value.h"
#include "be_visitor_context.h"
#include "be_helper.h"
#include "be_typedef.h"
#include "be_structure.h"
#include "be_union.h"
ACE_RCSID (be,
be_null_return_emitter,
"$Id$")
be_null_return_emitter::be_null_return_emitter (
be_visitor_context *ctx)
: ctx_ (ctx),
os_ (*ctx->stream ())
{
}
be_null_return_emitter::~be_null_return_emitter (void)
{
}
int
be_null_return_emitter::emit (be_type *node)
{
os_ << "return ";
be_visitor_null_return_value visitor (this->ctx_);
if (node->accept (&visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("be_null_return_emitter::")
ACE_TEXT ("emit(be_decl *) - accept() ")
ACE_TEXT ("failed for %C\n"),
node->full_name ()),
-1);
}
os_ << ";";
return 0;
}
|