1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
// constructor for the various MarshalObject classes
ACE_INLINE TAO_MarshalObject::TAO_MarshalObject()
{
}
ACE_INLINE TAO_Marshal_Primitive::TAO_Marshal_Primitive()
{
}
ACE_INLINE TAO_Marshal_Any::TAO_Marshal_Any()
{
}
ACE_INLINE TAO_Marshal_Principal::TAO_Marshal_Principal()
{
}
ACE_INLINE TAO_Marshal_TypeCode::TAO_Marshal_TypeCode()
{
}
ACE_INLINE TAO_Marshal_ObjRef::TAO_Marshal_ObjRef()
{
}
ACE_INLINE TAO_Marshal_Struct::TAO_Marshal_Struct()
{
}
ACE_INLINE TAO_Marshal_Union::TAO_Marshal_Union()
{
}
ACE_INLINE TAO_Marshal_String::TAO_Marshal_String()
{
}
ACE_INLINE TAO_Marshal_Sequence::TAO_Marshal_Sequence()
{
}
ACE_INLINE TAO_Marshal_Array::TAO_Marshal_Array()
{
}
ACE_INLINE TAO_Marshal_Alias::TAO_Marshal_Alias()
{
}
ACE_INLINE TAO_Marshal_Except::TAO_Marshal_Except()
{
}
ACE_INLINE TAO_Marshal_WString::TAO_Marshal_WString()
{
}
//destructor for the MarshalObject class
ACE_INLINE TAO_MarshalObject::~TAO_MarshalObject()
{
}
// the deep_copy methods
// deep_copy for any
ACE_INLINE CORBA_TypeCode::traverse_status
TAO_Marshal_Any::deep_copy(
CORBA_TypeCode_ptr tc,
const void *source,
const void *dest,
CORBA_Environment &env
)
{
(void) new (dest) CORBA_Any (*(CORBA_Any*) source);
return CORBA_TypeCode::TRAVERSE_CONTINUE;
}
// deep_copy for TypeCode
ACE_INLINE CORBA_TypeCode::traverse_status
TAO_Marshal_TypeCode::deep_copy(
CORBA_TypeCode_ptr tc,
const void *source,
const void *dest,
CORBA_Environment &env
)
{
if ((*(CORBA_TypeCode_ptr *) source) != 0)
dest = source;
else
dest = _tc_CORBA_Null;
((CORBA_TypeCode_ptr) dest)->AddRef ();
return CORBA_TypeCode::TRAVERSE_CONTINUE;
}
// deep_copy for ObjRef
ACE_INLINE CORBA_TypeCode::traverse_status
TAO_Marshal_ObjRef::deep_copy(
CORBA_TypeCode_ptr tc,
const void *source,
const void *dest,
CORBA_Environment &env
)
{
*(CORBA_Object_ptr *) dest = CORBA_Object::_duplicate (*(CORBA_Object_ptr *)
source);
return CORBA_TypeCode::TRAVERSE_CONTINUE;
}
// deep_copy for string
ACE_INLINE CORBA_TypeCode::traverse_status
TAO_Marshal_String::deep_copy(
CORBA_TypeCode_ptr tc,
const void *source,
const void *dest,
CORBA_Environment &env
)
{
*(CORBA_String *) dest = CORBA_string_copy (*(CORBA_String *) source);
return CORBA_TypeCode::TRAVERSE_CONTINUE;
}
// deep_copy for wstring
ACE_INLINE CORBA_TypeCode::traverse_status
TAO_Marshal_WString::deep_copy(
CORBA_TypeCode_ptr tc,
const void *source,
const void *dest,
CORBA_Environment &env
)
{
*(CORBA_WString *) dest = CORBA_wstring_copy (*(CORBA_WString *) source);
return CORBA_TypeCode::TRAVERSE_CONTINUE;
}
// *************** deep_free methods ******************
// deep_free for Any
ACE_INLINE CORBA_TypeCode::traverse_status
TAO_Marshal_Any::deep_free(
CORBA_TypeCode_ptr tc,
const void *source,
const void *dest,
CORBA_Environment &env
)
{
((CORBA_Any *) source)->~CORBA_Any ();
return CORBA_TypeCode::TRAVERSE_CONTINUE;
}
// deep_free for TypeCode
ACE_INLINE CORBA_TypeCode::traverse_status
TAO_Marshal_TypeCode::deep_free(
CORBA_TypeCode_ptr tc,
const void *source,
const void *dest,
CORBA_Environment &env
)
{
if ((*(CORBA_TypeCode_ptr *) source) != 0)
(*(CORBA_TypeCode_ptr *) source)->Release ();
return CORBA_TypeCode::TRAVERSE_CONTINUE;
}
// deep_free for Principal
ACE_INLINE CORBA_TypeCode::traverse_status
TAO_Marshal_Principal::deep_free(
CORBA_TypeCode_ptr tc,
const void *value,
const void *dest,
CORBA_Environment &env
)
{
CORBA_release (*(CORBA_Principal_ptr *) value);
return CORBA_TypeCode::TRAVERSE_CONTINUE;
}
// deep_free for ObjRef
ACE_INLINE CORBA_TypeCode::traverse_status
TAO_Marshal_ObjRef::deep_free(
CORBA_TypeCode_ptr tc,
const void *source,
const void *dest,
CORBA_Environment &env
)
{
CORBA_release (*(CORBA_Object_ptr *) source);
return CORBA_TypeCode::TRAVERSE_CONTINUE;
}
// deep_free for string
ACE_INLINE CORBA_TypeCode::traverse_status
TAO_Marshal_String::deep_free(
CORBA_TypeCode_ptr tc,
const void *source,
const void *dest,
CORBA_Environment &env
)
{
CORBA_string_free (*(CORBA_String *) source);
return CORBA_TypeCode::TRAVERSE_CONTINUE;
}
// deep_free for wstring
ACE_INLINE CORBA_TypeCode::traverse_status
TAO_Marshal_WString::deep_free(
CORBA_TypeCode_ptr tc,
const void *source,
const void *dest,
CORBA_Environment &env
)
{
CORBA_wstring_free (*(CORBA_WString *) source);
return CORBA_TypeCode::TRAVERSE_CONTINUE;
}
|