Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / Dynamic / test_i.cpp
blob600905ee3ce07b1ef5580b9ea39d10d9daea9a1f
1 #include "test_i.h"
3 Visual_i::Visual_i (CORBA::ORB_ptr orb)
4 : orb_ (CORBA::ORB::_duplicate (orb))
8 void
9 Visual_i::normal (CORBA::Long arg,
10 CORBA::String_out msg)
12 ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
13 msg = CORBA::string_dup ("DO_NOT_INSULT_MY_INTELLIGENCE");
16 CORBA::Long
17 Visual_i::calculate (CORBA::Long one,
18 CORBA::Long two)
20 ACE_DEBUG ((LM_DEBUG, "Visual::calculate\n"));
21 return (one + two);
24 Test_Interceptors::Visual::VarLenStruct *
25 Visual_i::the_structure ()
27 Test_Interceptors::Visual::VarLenStruct * s = nullptr;
29 ACE_NEW_THROW_EX (s,
30 Test_Interceptors::Visual::VarLenStruct,
31 CORBA::NO_MEMORY ());
33 Test_Interceptors::Visual::VarLenStruct_var safe_s = s;
35 s->flag = 135;
36 s->message = CORBA::string_dup ("Oh Captain, my Captain!");
38 return safe_s._retn ();
41 void
42 Visual_i::user ()
44 ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing Silly\n"));
45 throw Test_Interceptors::Silly ();
48 void
49 Visual_i::system ()
51 ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
52 throw CORBA::INV_OBJREF ();
55 void
56 Visual_i::shutdown ()
58 this->orb_->shutdown ();