diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-08 03:54:14 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-08 03:54:14 +0000 |
commit | 05ce2043201881642b53e9889b5b49e20631caba (patch) | |
tree | e0ee1d4cf123b9c7bff910e91a88eb6c67edd41f /TAO/TAO_IDL/be/be_exception.cpp | |
parent | 8fdb10ab4a8a950801cc2f1e73ad306da351ce48 (diff) | |
download | ATCD-05ce2043201881642b53e9889b5b49e20631caba.tar.gz |
ChangeLogTag:Fri Nov 07 21:23:35 1997 Carlos O'Ryan <coryan@MILONGA>
Diffstat (limited to 'TAO/TAO_IDL/be/be_exception.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_exception.cpp | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/TAO/TAO_IDL/be/be_exception.cpp b/TAO/TAO_IDL/be/be_exception.cpp index 9486cbe5a36..b06f60afe3b 100644 --- a/TAO/TAO_IDL/be/be_exception.cpp +++ b/TAO/TAO_IDL/be/be_exception.cpp @@ -1,3 +1,7 @@ +// +// $Id$ +// + #include "idl.h" #include "idl_extern.h" #include "be.h" @@ -68,11 +72,32 @@ be_exception::gen_client_header (void) TAO_OutStream *ch = cg->client_header (); // output stream TAO_NL nl; // end line - ACE_UNUSED_ARG (nl); cg->outstream (ch); ch->indent (); // start from whatever indentation level we were at + ch->gen_ifdef_macro (this->flatname (), "_ptr"); + + ch->indent (); + *ch << "class " << this->local_name () << ";" << nl; + // generate the _ptr declaration + *ch << "typedef " << this->local_name () << " *" + << this->local_name () << "_ptr;" << nl; + ch->gen_endif (); + + ch->gen_ifdef_macro (this->flatname ()); + + ch->indent (); + *ch << "class " << this->local_name () + << " : public virtual CORBA::UserException" << nl; + *ch << "{" << nl + << "public:" << nl; + ch->incr_indent (); + *ch << this->local_name () << " (void);\n"; + ch->decr_indent (); + *ch << "};" << nl << nl; + ch->gen_endif (); + *ch << "static CORBA::TypeCode_ptr " << this->tc_name ()->last_component () << ";\n\n"; @@ -85,6 +110,32 @@ be_exception::gen_client_header (void) int be_exception::gen_client_inline (void) { + if (!this->cli_inline_gen_) + { + TAO_NL nl; // end line + + TAO_CodeGen *cg = TAO_CODEGEN::instance (); + TAO_OutStream *ci = cg->client_inline (); + + *ci << "// *************************************************************" + << nl; + *ci << "// Inline operations for exception " << this->name () << nl; + *ci << "// *************************************************************\n\n"; + + ci->indent (); + *ci << "// default constructor" << nl; + *ci << "ACE_INLINE" << nl; + *ci << this->name () << "::" << this->local_name () << " (void)" << nl; + ci->incr_indent (); + *ci << ": CORBA_UserException (_tc_" + << this->local_name () + << ")\n"; + ci->decr_indent (); + *ci << "{" << nl; + *ci << "}" << nl << nl; + + this->cli_inline_gen_ = I_TRUE; + } return 0; } |