summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be
diff options
context:
space:
mode:
authorgokhale <asgokhale@users.noreply.github.com>1998-10-20 15:23:33 +0000
committergokhale <asgokhale@users.noreply.github.com>1998-10-20 15:23:33 +0000
commitc0edd715bc2680861d4fe89d2f2b00a045cf0b2e (patch)
tree9489dc98bd642248230ec6b2899d4a72d39a5fda /TAO/TAO_IDL/be
parentdf5cb0d477215fffab79e453ce1d3339ce65e35a (diff)
downloadATCD-c0edd715bc2680861d4fe89d2f2b00a045cf0b2e.tar.gz
*** empty log message ***
Diffstat (limited to 'TAO/TAO_IDL/be')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_root/cdr_op.cpp12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_root/root.cpp50
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typedef/any_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typedef/any_op_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp8
34 files changed, 93 insertions, 71 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp
index f0b06de755e..15237b1baf9 100644
--- a/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp
@@ -48,7 +48,7 @@ be_visitor_array_any_op_ch::visit_array (be_array *node)
if (node->cli_hdr_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp
index 57eb89c29a5..c1517048953 100644
--- a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp
@@ -49,7 +49,7 @@ be_visitor_array_any_op_cs::visit_array (be_array *node)
if (node->cli_stub_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
// Any <<= and >>= operators
diff --git a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp
index 2706e25c018..5c32a4dfe7b 100644
--- a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp
@@ -48,7 +48,7 @@ be_visitor_array_cdr_op_ch::visit_array (be_array *node)
if (node->cli_hdr_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the CDR << and >> operator declarations
*os << "CORBA::Boolean " << idl_global->export_macro ()
diff --git a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp
index f4b78d3e14f..9810f6381fd 100644
--- a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp
@@ -54,7 +54,8 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node)
}
else
{
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
+
be_type *bt; // base type of the array
if (node->cli_stub_cdr_op_gen () || node->imported ())
@@ -78,7 +79,7 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node)
// set the sub state as generating code for the output operator
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_OUTPUT);
- *os << "inline CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
<< "const " << node->name () << "_forany &_tao_array)" << be_nl
<< "{" << be_idt_nl;
@@ -95,7 +96,7 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node)
// set the sub state as generating code for the input operator
os->indent ();
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_INPUT);
- *os << "inline CORBA::Boolean operator>> (TAO_InputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, "
<< node->name () << "_forany &_tao_array)" << be_nl
<< "{" << be_idt_nl;
if (bt->accept (this) == -1)
diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp
index 5e79530c2f1..46b3c3013ed 100644
--- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp
@@ -47,7 +47,7 @@ be_visitor_enum_any_op_ch::visit_enum (be_enum *node)
if (node->cli_hdr_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operators
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp
index 5f1ff5c75a5..0434e60667f 100644
--- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp
@@ -48,7 +48,7 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node)
if (node->cli_stub_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
// Any <<= and >>= operators
diff --git a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp
index 0eec4fe9db9..7c35d00c706 100644
--- a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp
@@ -47,7 +47,8 @@ be_visitor_enum_cdr_op_ch::visit_enum (be_enum *node)
if (node->cli_hdr_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
+
// generate the CDR << and >> operators
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp
index 13597bffca6..882f9b3019b 100644
--- a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp
@@ -48,17 +48,18 @@ be_visitor_enum_cdr_op_cs::visit_enum (be_enum *node)
if (node->cli_stub_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
+
// generate CDR << and >> operators
os->indent ();
- *os << "inline CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
<< "const " << node->name () << " &_tao_enumval)" << be_nl
<< "{" << be_idt_nl
<< "return strm.write_ulong ((CORBA::ULong) _tao_enumval);" << be_uidt_nl
<< "}\n\n";
- *os << "inline CORBA::Boolean operator>> (TAO_InputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, "
<< node->name () << " &_tao_enumval)" << be_nl
<< "{" << be_idt_nl
<< "CORBA::ULong _tao_temp;" << be_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp
index f444cc73f35..d0c16445b30 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp
@@ -47,7 +47,7 @@ be_visitor_exception_any_op_ch::visit_exception (be_exception *node)
if (node->cli_hdr_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp
index 8f79aeefe9d..e3a1e857e10 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp
@@ -48,7 +48,7 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node)
if (node->cli_stub_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
// Any <<= and >>= operators
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp
index 41a1b7d3846..1910de4e68e 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp
@@ -47,7 +47,7 @@ be_visitor_exception_cdr_op_ch::visit_exception (be_exception *node)
if (node->cli_hdr_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Cdr <<= and >>= operator declarations
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp
index 228d373fe06..ab7055faf79 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp
@@ -48,11 +48,11 @@ be_visitor_exception_cdr_op_cs::visit_exception (be_exception *node)
if (node->cli_stub_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// set the sub state as generating code for the output operator
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_OUTPUT);
- *os << "inline CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
<< "const " << node->name () << " &_tao_aggregate)" << be_nl
<< "{" << be_idt_nl;
// do we have any members?
@@ -95,7 +95,7 @@ be_visitor_exception_cdr_op_cs::visit_exception (be_exception *node)
// set the substate as generating code for the input operator
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_INPUT);
- *os << "inline CORBA::Boolean operator>> (TAO_InputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, "
<< node->name () << " &_tao_aggregate)" << be_nl
<< "{" << be_idt_nl;
// retrieve the repository ID and compare with what we have
@@ -152,7 +152,7 @@ be_visitor_exception_cdr_op_cs::visit_exception (be_exception *node)
int
be_visitor_exception_cdr_op_cs::post_process (be_decl *bd)
{
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
if (!this->last_node (bd))
{
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp
index edf9ef073be..c80d1932af6 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp
@@ -48,7 +48,7 @@ be_visitor_interface_any_op_ch::visit_interface (be_interface *node)
if (node->cli_hdr_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp
index c06122bb3fd..0fb0e6da5f2 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp
@@ -49,7 +49,7 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node)
if (node->cli_stub_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
// Any <<= and >>= operators
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp
index 73ed62d13b7..7b4d88f71ca 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp
@@ -47,7 +47,7 @@ be_visitor_interface_cdr_op_ch::visit_interface (be_interface *node)
if (node->cli_hdr_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the CDR << and >> operator declarations
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp
index 0b046e455e3..8dbda7af1fe 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp
@@ -48,11 +48,11 @@ be_visitor_interface_cdr_op_cs::visit_interface (be_interface *node)
if (node->cli_stub_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// set the sub state as generating code for the output operator
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_OUTPUT);
- *os << "inline CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
<< "const " << node->name () << "_ptr _tao_objref)" << be_nl
<< "{" << be_idt_nl;
// hand over the encoding to the TAO's internal engine
@@ -80,7 +80,7 @@ be_visitor_interface_cdr_op_cs::visit_interface (be_interface *node)
// set the substate as generating code for the input operator
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_INPUT);
- *os << "inline CORBA::Boolean operator>> (TAO_InputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, "
<< node->name () << "_ptr &_tao_objref)" << be_nl
<< "{" << be_idt_nl;
// hand over to the TAO's internal marshaling engine
diff --git a/TAO/TAO_IDL/be/be_visitor_root/cdr_op.cpp b/TAO/TAO_IDL/be/be_visitor_root/cdr_op.cpp
index a7af7e9cebf..08ee3748b79 100644
--- a/TAO/TAO_IDL/be/be_visitor_root/cdr_op.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_root/cdr_op.cpp
@@ -45,6 +45,13 @@ be_visitor_root_cdr_op::~be_visitor_root_cdr_op (void)
int
be_visitor_root_cdr_op::visit_root (be_root *node)
{
+ TAO_OutStream *os = this->ctx_->stream ();
+
+ if (this->ctx_->state () == TAO_CodeGen::TAO_ROOT_CDR_OP_CH)
+ {
+ *os << "#ifndef __ACE_INLINE__\n\n";
+ }
+
// all we have to do is to visit the scope and generate code
if (this->visit_scope (node) == -1)
{
@@ -53,5 +60,10 @@ be_visitor_root_cdr_op::visit_root (be_root *node)
"codegen for scope failed\n"), -1);
}
+ if (this->ctx_->state () == TAO_CodeGen::TAO_ROOT_CDR_OP_CH)
+ {
+ *os << "#endif /* __ACE_INLINE__ */\n\n";
+ }
+
return 0;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_root/root.cpp b/TAO/TAO_IDL/be/be_visitor_root/root.cpp
index 0f063a6f715..020b90304f2 100644
--- a/TAO/TAO_IDL/be/be_visitor_root/root.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_root/root.cpp
@@ -70,6 +70,7 @@ int be_visitor_root::visit_root (be_root *node)
//
// XXXASG - this part of the code may be conditionally generated because at
// times it is not necessary to have these operators at all. TO-DO.
+ be_visitor *visitor;
be_visitor_context ctx (*this->ctx_);
switch (this->ctx_->state ())
@@ -86,6 +87,7 @@ int be_visitor_root::visit_root (be_root *node)
return 0;
case TAO_CodeGen::TAO_ROOT_CI:
+ break;
case TAO_CodeGen::TAO_ROOT_SI:
return 0; // nothing to be done
case TAO_CodeGen::TAO_ROOT_SS:
@@ -101,28 +103,32 @@ int be_visitor_root::visit_root (be_root *node)
}
}
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
+ // *ASG* - this is a tempoaray hack soln so that our CDR operators get
+ // generated in the *.i file rather than the *.cpp file
+ if (this->ctx_->state () != TAO_CodeGen::TAO_ROOT_CI)
+ {
+ visitor = tao_cg->make_visitor (&ctx);
+ if (!visitor)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_root::"
+ "visit_root - "
+ "NUL visitor\n"
+ ), -1);
+ }
+
+ // generate the <<= and >>= operators for all the user-defined data types in
+ // the outermost scope
+ if (node->accept (visitor) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) be_visitor_root::"
- "visit_root - "
- "NUL visitor\n"
- ), -1);
+ "visit_root - "
+ "failed to generate Any operators\n"
+ ), -1);
+ }
+ delete visitor;
}
-
- // generate the <<= and >>= operators for all the user-defined data types in
- // the outermost scope
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_root - "
- "failed to generate Any operators\n"
- ), -1);
- }
- delete visitor;
-
// make one more pass over the entire tree and generate the CDR << and >>
// operators for compiled marshaling. Again, this code can be conditionally
@@ -134,11 +140,11 @@ int be_visitor_root::visit_root (be_root *node)
case TAO_CodeGen::TAO_ROOT_CH:
ctx.state (TAO_CodeGen::TAO_ROOT_CDR_OP_CH);
break;
- case TAO_CodeGen::TAO_ROOT_CS:
+ case TAO_CodeGen::TAO_ROOT_CI:
ctx.state (TAO_CodeGen::TAO_ROOT_CDR_OP_CS);
break;
case TAO_CodeGen::TAO_ROOT_SH:
- case TAO_CodeGen::TAO_ROOT_CI:
+ case TAO_CodeGen::TAO_ROOT_CS:
case TAO_CodeGen::TAO_ROOT_SI:
case TAO_CodeGen::TAO_ROOT_SS:
return 0; // nothing to be done
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp
index 622c5a566ba..f1223cd7642 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp
@@ -47,7 +47,7 @@ be_visitor_sequence_any_op_ch::visit_sequence (be_sequence *node)
if (node->cli_hdr_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operators
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
index dbd0d07badf..7664480dd73 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
@@ -48,7 +48,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
if (node->cli_stub_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// Any <<= and >>= operators
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp
index 11e3e211a36..e689f79f608 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp
@@ -47,7 +47,7 @@ be_visitor_sequence_cdr_op_ch::visit_sequence (be_sequence *node)
if (node->cli_hdr_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the CDR << and >> operator declarations
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp
index 033c259751a..3618cdc7754 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp
@@ -54,7 +54,8 @@ be_visitor_sequence_cdr_op_cs::visit_sequence (be_sequence *node)
}
else
{
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
+
be_type *bt; // base type of the sequence
if (node->cli_stub_cdr_op_gen () || node->imported ())
@@ -78,7 +79,7 @@ be_visitor_sequence_cdr_op_cs::visit_sequence (be_sequence *node)
// set the sub state as generating code for the output operator
this->ctx_->sub_state (TAO_CodeGen::TAO_CDR_OUTPUT);
- *os << "inline CORBA::Boolean operator<< (" << be_idt << be_idt_nl
+ *os << "ACE_INLINE CORBA::Boolean operator<< (" << be_idt << be_idt_nl
<< "TAO_OutputCDR &strm," << be_nl
<< "const " << node->name ()
<< " &_tao_sequence" << be_uidt_nl
@@ -105,7 +106,7 @@ be_visitor_sequence_cdr_op_cs::visit_sequence (be_sequence *node)
// set the sub state as generating code for the input operator
os->indent ();
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_INPUT);
- *os << "inline CORBA::Boolean operator>> (TAO_InputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, "
<< node->name () << " &_tao_sequence)" << be_nl
<< "{" << be_idt_nl;
// first retrieve the length and adjust the sequence length accordingly
diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp
index e3fa722bef5..34b3f3210d3 100644
--- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp
@@ -47,7 +47,7 @@ be_visitor_structure_any_op_ch::visit_structure (be_structure *node)
if (node->cli_hdr_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp
index 641a8f19600..28eff7fed0d 100644
--- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp
@@ -48,7 +48,7 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node)
if (node->cli_stub_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
// Any <<= and >>= operators
diff --git a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp
index b81eff78ef1..337601a11d5 100644
--- a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp
@@ -47,7 +47,7 @@ be_visitor_structure_cdr_op_ch::visit_structure (be_structure *node)
if (node->cli_hdr_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the CDR << and >> operator declarations
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp
index 3f836c3e8a7..3c03ee6483e 100644
--- a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp
@@ -48,11 +48,11 @@ be_visitor_structure_cdr_op_cs::visit_structure (be_structure *node)
if (node->cli_stub_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// set the sub state as generating code for the output operator
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_OUTPUT);
- *os << "inline CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
<< "const " << node->name () << " &_tao_aggregate)" << be_nl
<< "{" << be_idt_nl
<< "if (" << be_idt_nl;
@@ -74,7 +74,7 @@ be_visitor_structure_cdr_op_cs::visit_structure (be_structure *node)
// set the substate as generating code for the input operator
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_INPUT);
- *os << "inline CORBA::Boolean operator>> (TAO_InputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, "
<< node->name () << " &_tao_aggregate)" << be_nl
<< "{" << be_idt_nl
<< "if (" << be_idt_nl;
@@ -112,7 +112,7 @@ be_visitor_structure_cdr_op_cs::visit_structure (be_structure *node)
int
be_visitor_structure_cdr_op_cs::post_process (be_decl *bd)
{
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
if (!this->last_node (bd))
{
diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/any_op_ch.cpp
index 1ce2a21d9c0..fc3d8b8c094 100644
--- a/TAO/TAO_IDL/be/be_visitor_typedef/any_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typedef/any_op_ch.cpp
@@ -47,7 +47,7 @@ be_visitor_typedef_any_op_ch::visit_typedef (be_typedef *node)
if (node->cli_hdr_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
// Any <<= and >>= operators
diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/any_op_cs.cpp
index 87d7215633d..e9a731a8dba 100644
--- a/TAO/TAO_IDL/be/be_visitor_typedef/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typedef/any_op_cs.cpp
@@ -48,7 +48,7 @@ be_visitor_typedef_any_op_cs::visit_typedef (be_typedef *node)
if (node->cli_stub_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
// Any <<= and >>= operators
diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_ch.cpp
index d269c48d875..1e12f1a28ec 100644
--- a/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_ch.cpp
@@ -47,7 +47,7 @@ be_visitor_typedef_cdr_op_ch::visit_typedef (be_typedef *node)
if (node->cli_hdr_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the CDR << and >> operator declarations
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_cs.cpp
index 26cbbb1f957..cd44a42ad35 100644
--- a/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_cs.cpp
@@ -48,7 +48,7 @@ be_visitor_typedef_cdr_op_cs::visit_typedef (be_typedef *node)
if (node->cli_stub_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the CDR << and >> operator impls
diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp
index 2f46f76a34f..f743a905db8 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp
@@ -47,7 +47,7 @@ be_visitor_union_any_op_ch::visit_union (be_union *node)
if (node->cli_hdr_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp
index 03c153b0dbe..0ec7a3d4ddf 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp
@@ -48,7 +48,7 @@ be_visitor_union_any_op_cs::visit_union (be_union *node)
if (node->cli_stub_any_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the Any <<= and >>= operator declarations
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp
index e1768bb6b58..2e970cebac2 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp
@@ -47,7 +47,7 @@ be_visitor_union_cdr_op_ch::visit_union (be_union *node)
if (node->cli_hdr_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_header ();
+ TAO_OutStream *os = this->ctx_->stream ();
// generate the CDR << and >> operator declarations
os->indent ();
diff --git a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp
index 5ba0ef27a19..48fdbbf9fc8 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp
@@ -48,11 +48,11 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node)
if (node->cli_stub_cdr_op_gen () || node->imported ())
return 0;
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
// set the sub state as generating code for the output operator
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_OUTPUT);
- *os << "inline CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
<< "const " << node->name () << " &_tao_union)" << be_nl
<< "{" << be_idt_nl
<< "return 1;" << be_uidt_nl
@@ -78,7 +78,7 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node)
// set the substate as generating code for the input operator
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_INPUT);
- *os << "inline CORBA::Boolean operator>> (TAO_InputCDR &strm, "
+ *os << "ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, "
<< node->name () << " &_tao_union)" << be_nl
<< "{" << be_idt_nl
<< "return 1;" << be_uidt_nl
@@ -121,7 +121,7 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node)
int
be_visitor_union_cdr_op_cs::post_process (be_decl *bd)
{
- TAO_OutStream *os = tao_cg->client_stubs ();
+ TAO_OutStream *os = this->ctx_->stream ();
if (!this->last_node (bd))
{