Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / Alt_Mapping / alt_mapping_i.cpp
blobb6c0de213b79fd1fbe71239c364ebc8c1f6c637b
2 //=============================================================================
3 /**
4 * @file alt_mapping_i.cpp
6 * @author Jeff Parsons
7 */
8 //=============================================================================
11 #include "alt_mapping_i.h"
13 #include "tao/debug.h"
14 #include "ace/OS_NS_stdio.h"
15 #include "ace/OS_NS_wchar.h"
16 #include "ace/OS_NS_string.h"
18 Alt_Mapping_i::Alt_Mapping_i (CORBA::ORB_ptr orb)
19 : orb_ (CORBA::ORB::_duplicate (orb))
23 Alt_Mapping_i::~Alt_Mapping_i ()
27 // test unbounded strings. For return and out types, we return duplicates of
28 // the in string. For the inout, we append the same string to itself and send
29 // it back
30 std::string
31 Alt_Mapping_i::test_unbounded_string (const std::string s1,
32 std::string &s2,
33 std::string &s3)
35 std::string retstr = s1;
36 s3 = s1;
37 s2 = s1 + s1;
38 return retstr;
41 // test for struct sequences
42 Alt_Mapping::StructSeq
43 Alt_Mapping_i::test_struct_sequence (
44 const Alt_Mapping::StructSeq & s1,
45 Alt_Mapping::StructSeq & s2,
46 Alt_Mapping::StructSeq & s3)
48 // We copy the "in" sequences into all the inout, out and return sequences.
50 // now copy all elements of s1 into the others using the assignment operator
51 s2 = s1;
52 s3 = s1;
53 return s1;
56 void
57 Alt_Mapping_i::shutdown ()
59 this->orb_->shutdown ();