1 #include "tao/DynamicInterface/DII_Arguments.h"
2 #include "tao/AnyTypeCode/NVList.h"
3 #include "tao/AnyTypeCode/Any_Impl.h"
4 #include "tao/AnyTypeCode/DynamicC.h"
5 #include "tao/Exception.h"
8 #if !defined (__ACE_INLINE__)
9 # include "tao/DynamicInterface/DII_Arguments.inl"
10 #endif /* ! __ACE_INLINE__ */
12 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
17 NamedValue_Argument::demarshal (TAO_InputCDR
&cdr
)
21 if (this->x_
!=0 && this->x_
->value ()->impl ())
23 this->x_
->value ()->impl ()->_tao_decode (cdr
);
26 catch (const ::CORBA::Exception
&)
31 this->byte_order_
= cdr
.byte_order ();
37 NamedValue_Argument::interceptor_value (CORBA::Any
*any
) const
39 (*any
) <<= *this->x_
->value ();
42 // ========================================================================
45 NVList_Argument::marshal (TAO_OutputCDR
&cdr
)
49 this->x_
->_tao_encode (cdr
, CORBA::ARG_IN
| CORBA::ARG_INOUT
);
51 catch (const ::CORBA::Exception
&)
60 NVList_Argument::demarshal (TAO_InputCDR
&cdr
)
64 // Now, get all the "return", "out", and "inout" parameters
65 // from the response message body ... return parameter is
66 // first, the rest are in the order defined in the IDL spec
67 // (which is also the order that DII users are required to
70 this->x_
->_tao_incoming_cdr (
72 CORBA::ARG_OUT
| CORBA::ARG_INOUT
,
73 this->lazy_evaluation_
);
75 catch (const ::CORBA::Exception
&)
84 NVList_Argument::interceptor_paramlist (Dynamic::ParameterList
*lst
)
86 CORBA::ULong
const len
= this->x_
->count ();
89 for (CORBA::ULong i
= 0; i
< len
; ++i
)
91 if (!this->x_
->item (i
)->value ())
94 (*lst
)[i
].argument
.replace (this->x_
->item (i
)->value ()->impl ());
96 switch (this->x_
->item (i
)->flags ())
100 (*lst
)[i
].mode
= CORBA::PARAM_IN
;
103 case CORBA::ARG_INOUT
:
105 (*lst
)[i
].mode
= CORBA::PARAM_INOUT
;
110 (*lst
)[i
].mode
= CORBA::PARAM_OUT
;
120 TAO_END_VERSIONED_NAMESPACE_DECL