2 //=============================================================================
4 * @file Codeset_Translator_Factory_T.cpp
6 * The template for creating a particular instance of a codeset translator
8 * @author Phil Mesnier <mesnier_p@ociweb.com>
10 //=============================================================================
12 #ifndef TAO_CODESET_TRANSLATOR_FACTORY_T_CPP
13 #define TAO_CODESET_TRANSLATOR_FACTORY_T_CPP
15 #include "tao/Codeset/Codeset_Translator_Factory_T.h"
16 #include "tao/debug.h"
18 #include "ace/Log_Msg.h"
20 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
22 template<class NCS_TO_TCS
>
23 TAO_Codeset_Translator_Factory_T
<NCS_TO_TCS
>::~TAO_Codeset_Translator_Factory_T ()
28 template<class NCS_TO_TCS
>
30 TAO_Codeset_Translator_Factory_T
<NCS_TO_TCS
>::init (int argc
, ACE_TCHAR
* argv
[])
32 this->TAO_Codeset_Translator_Factory::init (argc
,argv
);
33 ACE_NEW_RETURN (translator_
,NCS_TO_TCS
,-1);
34 if( TAO_debug_level
> 0 )
35 TAOLIB_DEBUG((LM_DEBUG
, "TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::init() entered\n"));
39 // ncs & tcs values set at compile time as a result of instantiating the
41 template<class NCS_TO_TCS
>
43 TAO_Codeset_Translator_Factory_T
<NCS_TO_TCS
>::ncs () const
45 return this->translator_
->ncs();
48 template<class NCS_TO_TCS
>
50 TAO_Codeset_Translator_Factory_T
<NCS_TO_TCS
>::tcs () const
52 return this->translator_
->tcs();
55 // Assign either a reference to teh existing translator or a new translator
56 // for input CDR streams
57 template<class NCS_TO_TCS
>
59 TAO_Codeset_Translator_Factory_T
<NCS_TO_TCS
>::assign (TAO_InputCDR
*cdr
) const
63 this->assign_i(cdr
,this->translator_
);
67 // Assign either a reference to teh existing translator or a new translator
68 // for input CDR streams
69 template<class NCS_TO_TCS
>
71 TAO_Codeset_Translator_Factory_T
<NCS_TO_TCS
>::assign (TAO_OutputCDR
*cdr
) const
75 this->assign_i(cdr
,this->translator_
);
79 TAO_END_VERSIONED_NAMESPACE_DECL
81 #endif /* TAO_CODESET_TRANSLATOR_FACTORY_T_CPP */