diff options
Diffstat (limited to 'TAO/TAO_IDL/be/be_helper.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_helper.cpp | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp index 5e86db063a8..c8ba868ba4b 100644 --- a/TAO/TAO_IDL/be/be_helper.cpp +++ b/TAO/TAO_IDL/be/be_helper.cpp @@ -21,6 +21,7 @@ #include "be_helper.h" #include "be_codegen.h" +#include "be_extern.h" #include "idl_defines.h" #include "ace/OS_NS_string.h" @@ -57,6 +58,7 @@ static const char copyright[] = TAO_NL::TAO_NL (void) { + ACE_UNUSED_ARG (copyright); } TAO_INDENT::TAO_INDENT (int do_now) @@ -75,6 +77,44 @@ const TAO_INDENT be_idt_nl (1); const TAO_UNINDENT be_uidt; const TAO_UNINDENT be_uidt_nl (1); +TAO_ENV_ARG::TAO_ENV_ARG (bool with_defaults, + bool single, + bool arg, + bool not_used) + : with_defaults_ (with_defaults), + single_ (single), + arg_ (arg), + not_used_ (not_used) +{ +} + +const TAO_ENV_ARG env_decl; +const TAO_ENV_ARG env_dflts (true); +const TAO_ENV_ARG env_sngl (false, true); +const TAO_ENV_ARG env_sngl_dflts (true, true); +const TAO_ENV_ARG env_not (false, false, false, true); +const TAO_ENV_ARG env_sngl_not (false, true, false, true); +const TAO_ENV_ARG env_arg (false, false, true); +const TAO_ENV_ARG env_sngl_arg (false, true, true); + +TAO_ACE_CHECK::TAO_ACE_CHECK (const char *retval, + bool do_return) + : retval_ (retval), + do_return_ (retval != 0 || do_return) +{ +} + +TAO_ACE_TRY_CHECK::TAO_ACE_TRY_CHECK (void) +{ +} + +TAO_ACE_ENDTRY::TAO_ACE_ENDTRY (void) +{ +} + +const TAO_ACE_TRY_CHECK ace_try_check; +const TAO_ACE_ENDTRY ace_endtry; + // Methods of the TAO_OutStream class. TAO_OutStream::TAO_OutStream (void) @@ -459,6 +499,63 @@ TAO_OutStream::operator<< (const TAO_UNINDENT& i) } TAO_OutStream & +TAO_OutStream::operator<< (const TAO_ENV_ARG& i) +{ + if (!be_global->use_raw_throw ()) + { + (*this) << be_nl + << "ACE_ENV_" + << (i.single_ ? "SINGLE_" : "") + << "ARG_" + << (i.arg_ ? "PARAMETER" : "DECL") + << (i.with_defaults_ ? "_WITH_DEFAULTS" : "") + << (i.not_used_ ? "_NOT_USED" : ""); + } + + return *this; +} + +TAO_OutStream & +TAO_OutStream::operator<< (const TAO_ACE_CHECK& i) +{ + if (!be_global->use_raw_throw ()) + { + (*this) << be_nl + << "ACE_CHECK" + << (i.do_return_ ? "_RETURN (" : "") + << (i.retval_ ? i.retval_ : "") + << (i.do_return_ ? ")" : "") + << ";"; + } + + return *this; +} + +TAO_OutStream & +TAO_OutStream::operator<< (const TAO_ACE_TRY_CHECK&) +{ + if (!be_global->use_raw_throw ()) + { + (*this) << be_nl + << "ACE_TRY_CHECK;"; + } + + return *this; +} + +TAO_OutStream & +TAO_OutStream::operator<< (const TAO_ACE_ENDTRY&) +{ + if (!be_global->use_raw_throw ()) + { + (*this) << be_nl + << "ACE_ENDTRY;"; + } + + return *this; +} + +TAO_OutStream & TAO_OutStream::operator<< (Identifier *id) { return this->print (id); |