Use =default for skeleton copy constructor
[ACE_TAO.git] / TAO / tao / Codeset / Codeset_Translator_Factory_T.cpp
blob62bd93a7821ab418cd03d510c290649903a77449
2 //=============================================================================
3 /**
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>
9 */
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"
17 #include "tao/CDR.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 ()
25 delete translator_;
28 template<class NCS_TO_TCS>
29 int
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"));
36 return 0;
39 // ncs & tcs values set at compile time as a result of instantiating the
40 // template.
41 template<class NCS_TO_TCS>
42 CONV_FRAME::CodeSetId
43 TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::ncs () const
45 return this->translator_->ncs();
48 template<class NCS_TO_TCS>
49 CONV_FRAME::CodeSetId
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>
58 void
59 TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::assign (TAO_InputCDR *cdr) const
61 if (cdr)
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>
70 void
71 TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::assign (TAO_OutputCDR *cdr) const
73 if (cdr)
75 this->assign_i(cdr,this->translator_);
79 TAO_END_VERSIONED_NAMESPACE_DECL
81 #endif /* TAO_CODESET_TRANSLATOR_FACTORY_T_CPP */