Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / tests / Sequence_Unit_Tests / mock_reference.cpp
blob95e4c27373662719577a5c45d237b577a8addbf0
1 /**
2 * @file
4 * @author Carlos O'Ryan <coryan@atdesk.com>
5 */
6 #include "mock_reference.hpp"
8 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
10 call_counter mock_reference::duplicate_calls;
11 call_counter mock_reference::release_calls;
12 call_counter mock_reference::serialize_calls;
13 call_counter mock_reference::deserialize_calls;
14 call_counter mock_reference::marshal_calls;
16 mock_reference::
17 ~mock_reference()
21 mock_reference * mock_reference::
22 allocate(int id)
24 return new mock_reference(id);
27 mock_reference * mock_reference::
28 _nil()
30 return 0;
33 mock_reference * mock_reference::
34 _duplicate(mock_reference * rhs)
36 duplicate_calls();
37 if (rhs == 0)
39 return 0;
41 return new mock_reference(*rhs);
44 void mock_reference::
45 _tao_release(mock_reference * rhs)
47 release_calls();
48 delete rhs;
51 void CORBA::release(mock_reference * r)
53 mock_reference::_tao_release(r);
56 mock_reference *
57 TAO::Objref_Traits<mock_reference>::duplicate (
58 mock_reference_ptr p
61 return mock_reference::_duplicate (p);
64 void
65 TAO::Objref_Traits<mock_reference>::release (
66 mock_reference_ptr p
69 CORBA::release (p);
72 mock_reference_ptr
73 TAO::Objref_Traits<mock_reference>::nil ()
75 return mock_reference::_nil ();
78 CORBA::Boolean
79 TAO::Objref_Traits<mock_reference>::marshal (
80 const mock_reference_ptr,
81 TAO_OutputCDR &
84 mock_reference::marshal_calls ();
85 return true;
88 CORBA::Boolean operator<< (TAO_OutputCDR &, const mock_reference *)
90 mock_reference::serialize_calls ();
91 return true;
93 CORBA::Boolean operator>> (TAO_InputCDR &, mock_reference *&)
95 mock_reference::deserialize_calls ();
96 return true;
99 TAO_END_VERSIONED_NAMESPACE_DECL