Public Member Functions | Private Attributes

TAO_Codeset_Translator_Factory_T< NCS_TO_TCS > Class Template Reference

Template for translator factory classes. More...

#include <Codeset_Translator_Factory_T.h>

Inheritance diagram for TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >:
Inheritance graph
[legend]
Collaboration diagram for TAO_Codeset_Translator_Factory_T< NCS_TO_TCS >:
Collaboration graph
[legend]

List of all members.

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_

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 39 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 26 of file Codeset_Translator_Factory_T.cpp.

                                                                                :
  translator_(0)
{
}

template<class NCS_TO_TCS >
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_;
}


Member Function Documentation

template<class NCS_TO_TCS >
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_);
    }
}

template<class NCS_TO_TCS >
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_);
    }
}

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 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;
}

template<class NCS_TO_TCS >
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();
}

template<class NCS_TO_TCS >
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();
}


Member Data Documentation

template<class NCS_TO_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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines