Merge pull request #1815 from sonndinh/get_signal_info
[ACE_TAO.git] / TAO / tests / Bug_2805_Regression / ami_test_i.cpp
blob8b5cebc0352fd39b16c06f0e2f4bc266fd86b90a
2 //=============================================================================
3 /**
4 * @file ami_test_i.cpp
6 * Implementation of the AMI Test interface.
8 * @author Alexander Babu Arulanthu <alex@cs.wustl.edu>
9 * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
11 //=============================================================================
14 #include "ami_test_i.h"
15 #include "tao/debug.h"
17 AMI_Test_i::AMI_Test_i (CORBA::ORB_ptr orb,
18 CORBA::Long in_l,
19 const char * in_str,
20 bool check_params)
21 : orb_ (CORBA::ORB::_duplicate (orb)),
22 number_ ((CORBA::Long) 931232),
23 yadda_ ((CORBA::Long) 140474),
24 in_l_ (in_l),
25 in_str_(CORBA::string_dup(in_str)),
26 check_params_(check_params)
30 CORBA::Long
31 AMI_Test_i::foo (CORBA::Long_out out_l,
32 CORBA::Long in_l,
33 const char* in_str)
35 out_l = 931233;
37 //if (TAO_debug_level > 0)
38 ACE_DEBUG ((LM_DEBUG,
39 "%N:%l:(%P:%t):AMI_Test_i::foo: %d %C\n",
40 in_l,
41 in_str));
43 if (in_l == 0)
45 ACE_DEBUG ((LM_DEBUG,
46 "Throwing Exception: A::DidTheRightThing\n"));
47 throw A::DidTheRightThing();
50 if (check_params_)
52 if (in_l_ != in_l || ACE_OS::strcmp(in_str_.in (), in_str) != 0)
54 ACE_ERROR ((LM_ERROR,
55 "ERROR: Parameter corruption on in parameters: %d %d %C %C.\n",
56 in_l_, in_l, in_str_.in (), in_str));
57 return 0;
61 return 931234;
64 void
65 AMI_Test_i::shutdown (void)
67 this->orb_->shutdown (0);
71 CORBA::Long
72 AMI_Test_i::yadda (void)
74 ACE_DEBUG ((LM_DEBUG,
75 "%N:%l:(%P:%t):AMI_Test_i::(get_)yadda\n"));
76 return yadda_;
80 void
81 AMI_Test_i::yadda (CORBA::Long yadda)
83 ACE_DEBUG ((LM_DEBUG,
84 "%N:%l:(%P:%t):AMI_Test_i::(set_)yadda\n"));
85 yadda_ = yadda;
88 void
89 AMI_Test_i::inout_arg_test (char *&)
91 // No action, this operation is to test code generation for INOUT
92 // args in AMI operations.