3 //=============================================================================
5 * @file Any_Insert_Policy_T.h
7 * @author Johnny Willemsen <jwillemsen@remedy.nl>
9 //=============================================================================
11 #ifndef TAO_ANY_INSERT_POLICY_H
12 #define TAO_ANY_INSERT_POLICY_H
14 #include /**/ "ace/pre.h"
16 #include "tao/UB_String_Argument_T.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Arg_Traits_T.h"
23 #include "tao/Argument.h"
24 #include "tao/AnyTypeCode_Adapter.h"
26 #include "ace/Dynamic_Service.h"
27 #include "ace/Log_Msg.h"
28 #include "tao/debug.h"
29 #include "tao/IFR_Client_Adapter.h"
31 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
36 class Any_Insert_Policy_Stream
39 static inline void any_insert (CORBA::Any
* p
, S
const & x
)
46 class Any_Insert_Policy_AnyTypeCode_Adapter
49 static inline void any_insert (CORBA::Any
* p
, S
const & x
)
51 TAO_AnyTypeCode_Adapter
*adapter
=
52 ACE_Dynamic_Service
<TAO_AnyTypeCode_Adapter
>::instance (
53 "AnyTypeCode_Adapter");
57 adapter
->insert_into_any (p
, x
);
61 TAOLIB_ERROR ((LM_ERROR
,
62 ACE_TEXT ("(%P|%t) %p\n"),
63 ACE_TEXT ("ERROR: unable to find AnyTypeCode Adapter ")));
69 class Any_Insert_Policy_IFR_Client_Adapter
72 static inline void any_insert (CORBA::Any
* p
, S
const & x
)
74 TAO_IFR_Client_Adapter
*adapter
=
75 ACE_Dynamic_Service
<TAO_IFR_Client_Adapter
>::instance (
76 "Concrete_IFR_Client_Adapter");
78 adapter
->interfacedef_any_insert (p
, x
);
83 class Any_Insert_Policy_Noop
86 static inline void any_insert (CORBA::Any
* , S
const &)
92 class Any_Insert_Policy_CORBA_Object
95 static inline void any_insert (CORBA::Any
* , S
const &)
97 if (TAO_debug_level
> 2)
99 TAOLIB_DEBUG ((LM_DEBUG
,
100 "TAO (%P|%t) - Cannot insert a vanilla CORBA Object"
101 " into an Any for returning the return value.\n"));
107 TAO_END_VERSIONED_NAMESPACE_DECL
109 #include /**/ "ace/post.h"
111 #endif /* TAO_ANY_INSERT_POLICY_H */