Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_Codeset_Translator_Factory_T Class Template Reference

Template for translator factory classes. More...

#include <Codeset_Translator_Factory_T.h>

Inheritance diagram for TAO_Codeset_Translator_Factory_T:

Inheritance graph
[legend]
Collaboration diagram for TAO_Codeset_Translator_Factory_T:

Collaboration graph
[legend]
List of all members.

Public Methods

 TAO_Codeset_Translator_Factory_T ()
 ~TAO_Codeset_Translator_Factory_T ()
int init (int argc, ACE_TCHAR *argv[])
 initialize the factory service object. Instantiates the translator. More...

CONV_FRAME::CodeSetId ncs () const
 ncs returns the translator's native codeset ID. More...

CONV_FRAME::CodeSetId tcs () const
 tcs returns the translator's transmission codeset ID. More...

virtual void assign (TAO_InputCDR *) const
 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. More...

virtual void assign (TAO_OutputCDR *) const
 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. More...


Private Attributes

NCS_TO_TCS * translator_

Detailed Description

template<class NCS_TO_TCS>
class TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >

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 35 of file Codeset_Translator_Factory_T.h.


Constructor & Destructor Documentation

template<class NCS_TO_TCS>
TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::TAO_Codeset_Translator_Factory_T  
 

Definition at line 27 of file Codeset_Translator_Factory_T.cpp.

00027                                                                                 :
00028   translator_(0)
00029 {
00030 }

template<class NCS_TO_TCS>
TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::~TAO_Codeset_Translator_Factory_T  
 

Definition at line 33 of file Codeset_Translator_Factory_T.cpp.

References translator_.

00034 {
00035   delete translator_;
00036 }


Member Function Documentation

template<class NCS_TO_TCS>
void TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::assign TAO_OutputCDR   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.

Implements TAO_Codeset_Translator_Factory.

Definition at line 81 of file Codeset_Translator_Factory_T.cpp.

References TAO_Codeset_Translator_Factory::assign_i.

00082 {
00083   if (cdr)
00084     {
00085       this->assign_i(cdr,this->translator_);
00086     }
00087 }

template<class NCS_TO_TCS>
void TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::assign TAO_InputCDR   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.

Implements TAO_Codeset_Translator_Factory.

Definition at line 69 of file Codeset_Translator_Factory_T.cpp.

References TAO_Codeset_Translator_Factory::assign_i.

00070 {
00071   if (cdr)
00072     {
00073       this->assign_i(cdr,this->translator_);
00074     }
00075 }

template<class NCS_TO_TCS>
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 40 of file Codeset_Translator_Factory_T.cpp.

References ACE_DEBUG, ACE_NEW_RETURN, ACE_TCHAR, TAO_Codeset_Translator_Factory::init, LM_DEBUG, and translator_.

00041 {
00042   this->TAO_Codeset_Translator_Factory::init (argc,argv);
00043   ACE_NEW_RETURN (translator_,NCS_TO_TCS,-1);
00044   if( TAO_debug_level > 0 )
00045     ACE_DEBUG((LM_DEBUG, "TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::init() entered\n"));
00046   return 0;
00047 }

template<class NCS_TO_TCS>
CONV_FRAME::CodeSetId TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::ncs   const [virtual]
 

ncs returns the translator's native codeset ID.

Implements TAO_Codeset_Translator_Factory.

Definition at line 53 of file Codeset_Translator_Factory_T.cpp.

References translator_.

00054 {
00055   return this->translator_->ncs();
00056 }

template<class NCS_TO_TCS>
CONV_FRAME::CodeSetId TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >::tcs   const [virtual]
 

tcs returns the translator's transmission codeset ID.

Implements TAO_Codeset_Translator_Factory.

Definition at line 60 of file Codeset_Translator_Factory_T.cpp.

References translator_.

00061 {
00062   return this->translator_->tcs();
00063 }


Member Data Documentation

template<class NCS_TO_TCS>
NCS_TO_TCS* TAO_Codeset_Translator_Factory_T::translator_ [private]
 

Definition at line 63 of file Codeset_Translator_Factory_T.h.

Referenced by init, ncs, tcs, and ~TAO_Codeset_Translator_Factory_T.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:09:19 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002