GCC Code Coverage Report


Directory: ./
File: tests/echoSK.cc
Date: 2025-05-26 15:04:55
Exec Total Coverage
Lines: 20 106 18.9%
Functions: 8 28 28.6%
Branches: 6 82 7.3%

Line Branch Exec Source
1 // This file is generated by omniidl (C++ backend) - omniORB_4_3. Do not edit.
2
3 #include "echo.hh"
4 #include <omniORB4/IOP_S.h>
5 #include <omniORB4/IOP_C.h>
6 #include <omniORB4/callDescriptor.h>
7 #include <omniORB4/callHandle.h>
8 #include <omniORB4/objTracker.h>
9
10
11 OMNI_USING_NAMESPACE(omni)
12
13 OMNI_MAYBE_UNUSED static const char* _0RL_library_version = omniORB_4_3;
14
15
16
17 ✗ Echo_ptr Echo_Helper::_nil() {
18 ✗ return ::Echo::_nil();
19 }
20
21 ✗ ::CORBA::Boolean Echo_Helper::is_nil(::Echo_ptr p) {
22 ✗ return ::CORBA::is_nil(p);
23
24 }
25
26 ✗ void Echo_Helper::release(::Echo_ptr p) {
27 ✗ ::CORBA::release(p);
28 ✗ }
29
30 ✗ void Echo_Helper::marshalObjRef(::Echo_ptr obj, cdrStream& s) {
31 ✗ ::Echo::_marshalObjRef(obj, s);
32 ✗ }
33
34 ✗ Echo_ptr Echo_Helper::unmarshalObjRef(cdrStream& s) {
35 ✗ return ::Echo::_unmarshalObjRef(s);
36 }
37
38 ✗ void Echo_Helper::duplicate(::Echo_ptr obj) {
39 ✗ if (obj && !obj->_NP_is_nil()) omni::duplicateObjRef(obj);
40 ✗ }
41
42 Echo_ptr
43 ✗ Echo::_duplicate(::Echo_ptr obj)
44 {
45 ✗ if (obj && !obj->_NP_is_nil()) omni::duplicateObjRef(obj);
46 ✗ return obj;
47 }
48
49 Echo_ptr
50 ✗ Echo::_narrow(::CORBA::Object_ptr obj)
51 {
52 ✗ if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
53 ✗ _ptr_type e = (_ptr_type) obj->_PR_getobj()->_realNarrow(_PD_repoId);
54 ✗ return e ? e : _nil();
55 }
56
57
58 Echo_ptr
59 ✗ Echo::_unchecked_narrow(::CORBA::Object_ptr obj)
60 {
61 ✗ if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
62 ✗ _ptr_type e = (_ptr_type) obj->_PR_getobj()->_uncheckedNarrow(_PD_repoId);
63 ✗ return e ? e : _nil();
64 }
65
66 Echo_ptr
67 ✗ Echo::_nil()
68 {
69 #ifdef OMNI_UNLOADABLE_STUBS
70 static _objref_Echo _the_nil_obj;
71 return &_the_nil_obj;
72 #else
73 static _objref_Echo* _the_nil_ptr = 0;
74 ✗ if (!_the_nil_ptr) {
75 ✗ omni::nilRefLock().lock();
76 ✗ if (!_the_nil_ptr) {
77 ✗ _the_nil_ptr = new _objref_Echo;
78 ✗ registerNilCorbaObject(_the_nil_ptr);
79 }
80 ✗ omni::nilRefLock().unlock();
81 }
82 ✗ return _the_nil_ptr;
83 #endif
84 }
85
86 const char* Echo::_PD_repoId = "IDL:Echo:1.0";
87
88
89 4 _objref_Echo::~_objref_Echo() {
90
91 4 }
92
93
94 2 _objref_Echo::_objref_Echo(omniIOR* ior, omniIdentity* id) :
95
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
2 omniObjRef(::Echo::_PD_repoId, ior, id, 1)
96
97
98 {
99 2 _PR_setobj(this);
100 2 }
101
102 void*
103 1 _objref_Echo::_ptrToObjRef(const char* id)
104 {
105
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 if (id == ::Echo::_PD_repoId)
106 1 return (::Echo_ptr) this;
107
108 ✗ if (id == ::CORBA::Object::_PD_repoId)
109 ✗ return (::CORBA::Object_ptr) this;
110
111 ✗ if (omni::strMatch(id, ::Echo::_PD_repoId))
112 ✗ return (::Echo_ptr) this;
113
114 ✗ if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
115 ✗ return (::CORBA::Object_ptr) this;
116
117 ✗ return 0;
118 }
119
120
121 //
122 // Code for Echo::echoString
123
124 // Proxy call descriptor class. Mangled signature:
125 // _cstring_i_cstring
126 class _0RL_cd_01531d3e51c81a80_00000000
127 : public omniCallDescriptor
128 {
129 public:
130 ✗ inline _0RL_cd_01531d3e51c81a80_00000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
131 ✗ : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
132 {
133
134 ✗ }
135
136 void marshalArguments(cdrStream&);
137 void unmarshalArguments(cdrStream&);
138
139 void unmarshalReturnedValues(cdrStream&);
140 void marshalReturnedValues(cdrStream&);
141
142
143 static const char* const _user_exns[];
144
145 ::CORBA::String_var arg_0_;
146 const char* arg_0;
147 ::CORBA::String_var result;
148 };
149
150 ✗ void _0RL_cd_01531d3e51c81a80_00000000::marshalArguments(cdrStream& _n)
151 {
152 ✗ _n.marshalString(arg_0,0);
153
154 ✗ }
155
156 ✗ void _0RL_cd_01531d3e51c81a80_00000000::unmarshalArguments(cdrStream& _n)
157 {
158 ✗ arg_0_ = _n.unmarshalString(0);
159 ✗ arg_0 = arg_0_.in();
160
161 ✗ }
162
163 ✗ void _0RL_cd_01531d3e51c81a80_00000000::marshalReturnedValues(cdrStream& _n)
164 {
165 ✗ _n.marshalString(result,0);
166
167 ✗ }
168
169 ✗ void _0RL_cd_01531d3e51c81a80_00000000::unmarshalReturnedValues(cdrStream& _n)
170 {
171 ✗ result = _n.unmarshalString(0);
172
173 ✗ }
174
175 const char* const _0RL_cd_01531d3e51c81a80_00000000::_user_exns[] = {
176 0
177 };
178
179 // Local call call-back function.
180 static void
181 ✗ _0RL_lcfn_01531d3e51c81a80_10000000(omniCallDescriptor* cd, omniServant* svnt)
182 {
183 ✗ _0RL_cd_01531d3e51c81a80_00000000* tcd = (_0RL_cd_01531d3e51c81a80_00000000*)cd;
184 ✗ _impl_Echo* impl = (_impl_Echo*) svnt->_ptrToInterface(Echo::_PD_repoId);
185 ✗ tcd->result = impl->echoString(tcd->arg_0);
186
187
188 ✗ }
189
190 ✗ char* _objref_Echo::echoString(const char* mesg)
191 {
192 ✗ _0RL_cd_01531d3e51c81a80_00000000 _call_desc(_0RL_lcfn_01531d3e51c81a80_10000000, "echoString", 11);
193 ✗ _call_desc.arg_0 = mesg;
194
195 ✗ _invoke(_call_desc);
196 ✗ return _call_desc.result._retn();
197
198
199 ✗ }
200
201 2 _pof_Echo::~_pof_Echo() {}
202
203
204 omniObjRef*
205 1 _pof_Echo::newObjRef(omniIOR* ior, omniIdentity* id)
206 {
207
2/6
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
1 return new ::_objref_Echo(ior, id);
208 }
209
210
211 ::CORBA::Boolean
212 1 _pof_Echo::is_a(const char* id) const
213 {
214
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 if (omni::ptrStrMatch(id, ::Echo::_PD_repoId))
215 1 return 1;
216
217 ✗ return 0;
218 }
219
220 const _pof_Echo _the_pof_Echo;
221
222 ✗ _impl_Echo::~_impl_Echo() {}
223
224
225 ::CORBA::Boolean
226 ✗ _impl_Echo::_dispatch(omniCallHandle& _handle)
227 {
228 ✗ const char* op = _handle.operation_name();
229
230 ✗ if (omni::strMatch(op, "echoString")) {
231
232 ✗ _0RL_cd_01531d3e51c81a80_00000000 _call_desc(_0RL_lcfn_01531d3e51c81a80_10000000, "echoString", 11, 1);
233
234 ✗ _handle.upcall(this,_call_desc);
235 ✗ return 1;
236 ✗ }
237
238
239 ✗ return 0;
240 }
241
242 void*
243 1 _impl_Echo::_ptrToInterface(const char* id)
244 {
245
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 if (id == ::Echo::_PD_repoId)
246 1 return (::_impl_Echo*) this;
247
248 ✗ if (id == ::CORBA::Object::_PD_repoId)
249 ✗ return (void*) 1;
250
251 ✗ if (omni::strMatch(id, ::Echo::_PD_repoId))
252 ✗ return (::_impl_Echo*) this;
253
254 ✗ if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
255 ✗ return (void*) 1;
256 ✗ return 0;
257 }
258
259 const char*
260 1 _impl_Echo::_mostDerivedRepoId()
261 {
262 1 return ::Echo::_PD_repoId;
263 }
264
265 ✗ POA_Echo::~POA_Echo() {}
266
267