diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-11-07 20:00:54 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-11-07 20:00:54 +0000 |
commit | 446f72582d9080654d2ec45ebf0abc9c4cc84b9b (patch) | |
tree | 82cd21339a489a191de433cbca39e477d209504d /TAO/TAO_IDL | |
parent | e54f1d0eb50446691d49bdac2999285e41ec77fa (diff) | |
download | ATCD-446f72582d9080654d2ec45ebf0abc9c4cc84b9b.tar.gz |
Tue Nov 7 20:00:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp | 97 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp | 2 |
2 files changed, 50 insertions, 49 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp index 376e6244a6a..4c3d9d8a4af 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp @@ -49,7 +49,7 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) os->indent (); - // Generate stub code required of any anonymous types of members. + // Generate stub code required of any anonymous types of members. if (this->visit_scope (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, @@ -59,6 +59,53 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) -1); } + be_visitor_context ctx (*this->ctx_); + + // Constructor taking all members. It exists only if there are any + // members. + if (node->member_count () > 0) + { + // Generate the signature. + ctx.state (TAO_CodeGen::TAO_EXCEPTION_CTOR_CS); + be_visitor_exception_ctor ec_visitor (&ctx); + + if (node->accept (&ec_visitor) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_exception::" + "visit_exception - " + "codegen for ctor failed\n"), + -1); + } + + *os << be_idt_nl + << ": ::CORBA::UserException (" + << be_idt << be_idt << be_idt_nl + << "\"" << node->repoID () << "\"," << be_nl + << "\"" << node->local_name () << "\"" << be_uidt_nl + << ")" << be_uidt << be_uidt << be_uidt_nl; + *os << "{" << be_idt; + + // Assign each individual member. We need yet another state. + ctx = *this->ctx_; + + // Indicate that the special ctor is being generated. + ctx.exception (true); + + be_visitor_exception_ctor_assign eca_visitor (&ctx); + + if (node->accept (&eca_visitor) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_exception_cs::" + "visit_exception -" + "codegen for scope failed\n"), + -1); + } + + *os << be_uidt_nl << "}" << be_nl << be_nl; + } + *os << be_nl << be_nl << "// TAO_IDL - Generated from " << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; @@ -87,7 +134,7 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) << ")" << be_uidt << be_uidt << be_uidt_nl; *os << "{"; - be_visitor_context ctx (*this->ctx_); + ctx = *this->ctx_; if (node->nmembers () > 0) { @@ -275,52 +322,6 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) *os << "}" << be_nl << be_nl; } - // Constructor taking all members. It exists only if there are any - // members. - if (node->member_count () > 0) - { - // Generate the signature. - ctx = *this->ctx_; - ctx.state (TAO_CodeGen::TAO_EXCEPTION_CTOR_CS); - be_visitor_exception_ctor ec_visitor (&ctx); - - if (node->accept (&ec_visitor) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_exception::" - "visit_exception - " - "codegen for ctor failed\n"), - -1); - } - - *os << be_idt_nl - << ": ::CORBA::UserException (" - << be_idt << be_idt << be_idt_nl - << "\"" << node->repoID () << "\"," << be_nl - << "\"" << node->local_name () << "\"" << be_uidt_nl - << ")" << be_uidt << be_uidt << be_uidt_nl; - *os << "{" << be_idt; - - // Assign each individual member. We need yet another state. - ctx = *this->ctx_; - - // Indicate that the special ctor is being generated. - ctx.exception (1); - - be_visitor_exception_ctor_assign eca_visitor (&ctx); - - if (node->accept (&eca_visitor) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_exception_cs::" - "visit_exception -" - "codegen for scope failed\n"), - -1); - } - - *os << be_uidt_nl << "}" << be_nl << be_nl; - } - // Switch streams to the *A.cpp file if we are using this option. if (be_global->gen_anyop_files ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp index 8e577ec39bf..121fe9b64f1 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp @@ -279,7 +279,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node) << ")" << be_uidt_nl << "{" << be_idt_nl << "::CORBA::ValueBase *base = 0;" << be_nl - << "::CORBA::Boolean retval =" << be_idt_nl + << "::CORBA::Boolean const retval =" << be_idt_nl << "::CORBA::ValueBase::_tao_unmarshal_pre (" << be_idt << be_idt_nl << "strm," << be_nl << "base," << be_nl |