Template for translator factory classes. More...
#include <Codeset_Translator_Factory_T.h>
Public Member Functions | |
TAO_Codeset_Translator_Factory_T () | |
virtual | ~TAO_Codeset_Translator_Factory_T () |
int | init (int argc, ACE_TCHAR *argv[]) |
initialize the factory service object. Instantiates the translator. | |
CONV_FRAME::CodeSetId | ncs () const |
ncs returns the translator's native codeset ID. | |
CONV_FRAME::CodeSetId | tcs () const |
tcs returns the translator's transmission codeset ID. | |
virtual void | assign (TAO_InputCDR *) const |
virtual void | assign (TAO_OutputCDR *) const |
Private Attributes | |
NCS_TO_TCS * | translator_ |
Template for translator factory classes.
The template argument is the actual translator class. The factory creates an instance of the translator during initialization. Other than that, the template returns the actual values for the native and translated codeset ids, and performs the translator assignment to the CDR objects as needed.
Definition at line 39 of file Codeset_Translator_Factory_T.h.
TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::TAO_Codeset_Translator_Factory_T | ( | ) |
Definition at line 26 of file Codeset_Translator_Factory_T.cpp.
: translator_(0) { }
TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::~TAO_Codeset_Translator_Factory_T | ( | ) | [virtual] |
Definition at line 32 of file Codeset_Translator_Factory_T.cpp.
{ delete translator_; }
void TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::assign | ( | TAO_InputCDR * | cdr | ) | const [virtual] |
Assign the translator to the input CDR. The inherited assign_i is used to assign either a char or wchar translator, depending on the base type of NCS_TO_TCS. A null input CDR is permitted, in which case assign is a no-op.
Definition at line 68 of file Codeset_Translator_Factory_T.cpp.
{ if (cdr) { this->assign_i(cdr,this->translator_); } }
void TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::assign | ( | TAO_OutputCDR * | cdr | ) | const [virtual] |
Assign the translator to the output CDR. The inherited assign_i is used to assign either a char or wchar translator, depending on the base type of NCS_TO_TCS. A null output CDR is permitted, in which case assign is a no-op.
Definition at line 80 of file Codeset_Translator_Factory_T.cpp.
{ if (cdr) { this->assign_i(cdr,this->translator_); } }
int TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::init | ( | int | argc, | |
ACE_TCHAR * | argv[] | |||
) | [virtual] |
initialize the factory service object. Instantiates the translator.
Reimplemented from TAO_Codeset_Translator_Factory.
Definition at line 39 of file Codeset_Translator_Factory_T.cpp.
{ this->TAO_Codeset_Translator_Factory::init (argc,argv); ACE_NEW_RETURN (translator_,NCS_TO_TCS,-1); if( TAO_debug_level > 0 ) ACE_DEBUG((LM_DEBUG, "TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::init() entered\n")); return 0; }
CONV_FRAME::CodeSetId TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::ncs | ( | void | ) | const |
ncs returns the translator's native codeset ID.
Definition at line 52 of file Codeset_Translator_Factory_T.cpp.
{ return this->translator_->ncs(); }
CONV_FRAME::CodeSetId TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::tcs | ( | ) | const |
tcs returns the translator's transmission codeset ID.
Definition at line 59 of file Codeset_Translator_Factory_T.cpp.
{ return this->translator_->tcs(); }
NCS_TO_TCS* TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::translator_ [private] |
Definition at line 67 of file Codeset_Translator_Factory_T.h.