Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / Dynamic / test_i.cpp
blob540b0e2ebd3828e58cd0e634cb910f3bfa25fcc7
1 #include "test_i.h"
3 Visual_i::Visual_i (CORBA::ORB_ptr orb)
4 : orb_ (CORBA::ORB::_duplicate (orb))
7 // ctor
9 void
10 Visual_i::normal (CORBA::Long arg,
11 CORBA::String_out msg)
13 ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
14 msg = CORBA::string_dup ("DO_NOT_INSULT_MY_INTELLIGENCE");
17 CORBA::Long
18 Visual_i::calculate (CORBA::Long one,
19 CORBA::Long two)
21 ACE_DEBUG ((LM_DEBUG, "Visual::calculate\n"));
22 return (one + two);
25 Test_Interceptors::Visual::VarLenStruct *
26 Visual_i::the_structure (void)
28 Test_Interceptors::Visual::VarLenStruct * s;
30 ACE_NEW_THROW_EX (s,
31 Test_Interceptors::Visual::VarLenStruct,
32 CORBA::NO_MEMORY ());
34 Test_Interceptors::Visual::VarLenStruct_var safe_s = s;
36 s->flag = 135;
37 s->message = CORBA::string_dup ("Oh Captain, my Captain!");
39 return safe_s._retn ();
42 void
43 Visual_i::user (void)
45 ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing Silly\n"));
46 throw Test_Interceptors::Silly ();
49 void
50 Visual_i::system (void)
52 ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
53 throw CORBA::INV_OBJREF ();
56 void
57 Visual_i::shutdown (void)
59 this->orb_->shutdown ();