3 //=============================================================================
7 * Classes that marshal various IDL data types.
9 * @author Aniruddha S. Gokhale
11 //=============================================================================
17 #include /**/ "ace/pre.h"
19 #include "tao/Basic_Types.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include "tao/AnyTypeCode/TAO_AnyTypeCode_Export.h"
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
32 typedef TypeCode
*TypeCode_ptr
;
38 // = Forward declarations.
39 class TAO_Marshal_Object
;
40 class TAO_Marshal_Primitive
;
41 class TAO_Marshal_Any
;
42 class TAO_Marshal_TypeCode
;
43 class TAO_Marshal_Principal
;
44 class TAO_Marshal_ObjRef
;
45 class TAO_Marshal_Struct
;
46 class TAO_Marshal_Union
;
47 class TAO_Marshal_String
;
48 class TAO_Marshal_Sequence
;
49 class TAO_Marshal_Array
;
50 class TAO_Marshal_Alias
;
51 class TAO_Marshal_Except
;
52 class TAO_Marshal_WString
;
53 class TAO_Marshal_Value
;
65 * @class TAO_Marshal_Object
67 * @brief TAO_Marshal_Object
69 * The Marshaling object that provides a common interface to the
70 * CDR object for marshaling different IDL data types
71 * Provides a set of virtual methods for appending and skipping
72 * data over a CDR stream.
74 class TAO_AnyTypeCode_Export TAO_Marshal_Object
78 TAO_Marshal_Object ();
81 virtual ~TAO_Marshal_Object ();
83 /// skip entry point, it allocates the right kind of Marshal_Object
84 /// and invokes skip on it.
85 static TAO::traverse_status
perform_skip (CORBA::TypeCode_ptr tc
,
86 TAO_InputCDR
*context
);
89 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
90 TAO_InputCDR
*context
) = 0;
92 /// append entry point, it allocates the right kind of Marshal_Object
93 /// and invokes skip on it.
94 static TAO::traverse_status
perform_append (CORBA::TypeCode_ptr tc
,
99 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
101 TAO_OutputCDR
*dest
) = 0;
105 * @class TAO_Marshal_Primitive:
107 * @brief TAO_Marshal_Primitive
109 * marshaling primitives
111 class TAO_AnyTypeCode_Export TAO_Marshal_Primitive
: public TAO_Marshal_Object
114 TAO_Marshal_Primitive ();
117 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
118 TAO_InputCDR
*context
);
121 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
123 TAO_OutputCDR
*dest
);
127 * @class TAO_Marshal_Any:
129 * @brief TAO_Marshal_Any
133 class TAO_AnyTypeCode_Export TAO_Marshal_Any
: public TAO_Marshal_Object
139 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
140 TAO_InputCDR
*context
);
143 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
145 TAO_OutputCDR
*dest
);
149 * @class TAO_Marshal_TypeCode
151 * @brief TAO_Marshal_TypeCode
155 class TAO_AnyTypeCode_Export TAO_Marshal_TypeCode
: public TAO_Marshal_Object
158 TAO_Marshal_TypeCode ();
161 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
162 TAO_InputCDR
*context
);
165 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
167 TAO_OutputCDR
*dest
);
171 * @class TAO_Marshal_Principal
173 * @brief TAO_Marshal_Principal
175 * marshal a principal
177 class TAO_AnyTypeCode_Export TAO_Marshal_Principal
: public TAO_Marshal_Object
180 TAO_Marshal_Principal ();
183 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
184 TAO_InputCDR
*context
);
187 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
189 TAO_OutputCDR
*dest
);
193 * @class TAO_Marshal_ObjRef
195 * @brief TAO_Marshal_ObjRef
197 * marshal an object reference
199 class TAO_AnyTypeCode_Export TAO_Marshal_ObjRef
: public TAO_Marshal_Object
202 TAO_Marshal_ObjRef ();
205 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
206 TAO_InputCDR
*context
);
209 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
211 TAO_OutputCDR
*dest
);
215 * @class TAO_Marshal_Struct
217 * @brief TAO_Marshal_Struct
221 class TAO_AnyTypeCode_Export TAO_Marshal_Struct
: public TAO_Marshal_Object
224 TAO_Marshal_Struct ();
227 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
228 TAO_InputCDR
*context
);
231 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
233 TAO_OutputCDR
*dest
);
237 * @class TAO_Marshal_Union
239 * @brief TAO_Marshal_Union
243 class TAO_AnyTypeCode_Export TAO_Marshal_Union
: public TAO_Marshal_Object
246 TAO_Marshal_Union ();
249 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
250 TAO_InputCDR
*context
);
253 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
255 TAO_OutputCDR
*dest
);
259 * @class TAO_Marshal_String
261 * @brief TAO_Marshal_String
265 class TAO_AnyTypeCode_Export TAO_Marshal_String
: public TAO_Marshal_Object
268 TAO_Marshal_String ();
271 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
272 TAO_InputCDR
*context
);
275 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
277 TAO_OutputCDR
*dest
);
281 * @class TAO_Marshal_Sequence
283 * @brief TAO_Marshal_Sequence
287 class TAO_AnyTypeCode_Export TAO_Marshal_Sequence
: public TAO_Marshal_Object
290 TAO_Marshal_Sequence ();
293 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
294 TAO_InputCDR
*context
);
297 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
299 TAO_OutputCDR
*dest
);
303 * @class TAO_Marshal_Array
305 * @brief TAO_Marshal_Array
309 class TAO_AnyTypeCode_Export TAO_Marshal_Array
: public TAO_Marshal_Object
312 TAO_Marshal_Array ();
315 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
316 TAO_InputCDR
*context
);
319 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
321 TAO_OutputCDR
*dest
);
325 * @class TAO_Marshal_Alias
327 * @brief TAO_Marshal_Alias
331 class TAO_AnyTypeCode_Export TAO_Marshal_Alias
: public TAO_Marshal_Object
334 TAO_Marshal_Alias ();
337 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
338 TAO_InputCDR
*context
);
341 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
343 TAO_OutputCDR
*dest
);
347 * @class TAO_Marshal_Except
349 * @brief TAO_Marshal_Except
351 * marshal an exception
353 class TAO_AnyTypeCode_Export TAO_Marshal_Except
: public TAO_Marshal_Object
356 TAO_Marshal_Except ();
359 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
360 TAO_InputCDR
*context
);
363 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
365 TAO_OutputCDR
*dest
);
369 * @class TAO_Marshal_WString
371 * @brief TAO_Marshal_WString
373 * marshal a wide string
375 class TAO_AnyTypeCode_Export TAO_Marshal_WString
: public TAO_Marshal_Object
378 TAO_Marshal_WString ();
381 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
382 TAO_InputCDR
*context
);
385 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
387 TAO_OutputCDR
*dest
);
391 * @class TAO_Marshal_Value
393 * @brief TAO_Marshal_Value
395 * marshal a valuetype
397 class TAO_AnyTypeCode_Export TAO_Marshal_Value
: public TAO_Marshal_Object
400 TAO_Marshal_Value ();
403 virtual TAO::traverse_status
skip (CORBA::TypeCode_ptr tc
,
404 TAO_InputCDR
*context
);
407 virtual TAO::traverse_status
append (CORBA::TypeCode_ptr tc
,
409 TAO_OutputCDR
*dest
);
412 CORBA::Boolean nested_processing_
;
415 TAO_END_VERSIONED_NAMESPACE_DECL
417 #if defined (__ACE_INLINE__)
418 # include "tao/AnyTypeCode/Marshal.inl"
419 #endif /* __ACE_INLINE__ */
421 #include /**/ "ace/post.h"
422 #endif /* TAO_MARSHAL_H */