Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tests / Bug_2356_Regression / ami_test_i.cpp
blob364d105983d68117bb48ae44faf95ad9a84f5fe8
2 //=============================================================================
3 /**
4 * @file ami_test_i.cpp
6 * Implementation of the AMI Test interface.
8 * @author Johnny Willemsen <jwillemsen@remedy.nl>
9 */
10 //=============================================================================
13 #include "ami_test_i.h"
14 #include "tao/debug.h"
16 AMI_Test_i::AMI_Test_i (CORBA::ORB_ptr orb)
17 : orb_ (CORBA::ORB::_duplicate (orb))
21 void
22 AMI_Test_i::foo (CORBA::Long value)
24 if (value == 0)
26 ACE_DEBUG ((LM_DEBUG,
27 "Throwing Exception: A::DidTheRightThing\n"));
28 #if defined(ACE_HAS_WCHAR) || defined(ACE_HAS_XPG4_MULTIBYTE_CHAR)
29 CORBA::WChar const* wstring = L"Hello world";
30 #else
31 CORBA::WChar const empty[] = { 0 };
32 CORBA::WChar const* wstring = empty;
33 #endif
34 throw A::DidTheRightThing(42, wstring);
38 void
39 AMI_Test_i::shutdown ()
41 this->orb_->shutdown (false);