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

Codeset_Translator_Factory_T.cpp

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: Codeset_Translator_Factory_T.cpp,v 1.1.8.1 2003/04/10 14:04:03 phil Exp $
00003 
00004 // ============================================================================
00005 //
00006 // = LIBRARY
00007 //    TAO/tao
00008 //
00009 // = FILENAME
00010 //    Codeset_Translator_Factory_T.cpp
00011 //
00012 // = DESCRIPTION
00013 //    The template for creating a particular instance of a codeset translator
00014 //
00015 // = AUTHORS
00016 //    Phil Mesnier <mesnier_p@ociweb.com>
00017 //
00018 // ============================================================================
00019 #ifndef TAO_CODESET_TRANSLATOR_FACTORY_T_CPP
00020 #define TAO_CODESET_TRANSLATOR_FACTORY_T_CPP
00021 
00022 #include "tao/Codeset_Translator_Factory_T.h"
00023 #include "tao/debug.h"
00024 #include "tao/CDR.h"
00025 
00026 template<class NCS_TO_TCS>
00027 TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::TAO_Codeset_Translator_Factory_T () :
00028   translator_(0)
00029 {
00030 }
00031 
00032 template<class NCS_TO_TCS>
00033 TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::~TAO_Codeset_Translator_Factory_T ()
00034 {
00035   delete translator_;
00036 }
00037 
00038 template<class NCS_TO_TCS>
00039 int
00040 TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::init (int argc, ACE_TCHAR* argv[])
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 }
00048 
00049 // ncs & tcs values set at compile time as a result of instantiating the
00050 // template.
00051 template<class NCS_TO_TCS>
00052 CONV_FRAME::CodeSetId
00053 TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::ncs () const
00054 {
00055   return this->translator_->ncs();
00056 }
00057 
00058 template<class NCS_TO_TCS>
00059 CONV_FRAME::CodeSetId
00060 TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::tcs () const
00061 {
00062   return this->translator_->tcs();
00063 }
00064 
00065 // Assign either a reference to teh existing translator or a new translator
00066 // for input CDR streams
00067 template<class NCS_TO_TCS>
00068 void
00069 TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::assign (TAO_InputCDR *cdr) const
00070 {
00071   if (cdr)
00072     {
00073       this->assign_i(cdr,this->translator_);
00074     }
00075 }
00076 
00077 // Assign either a reference to teh existing translator or a new translator
00078 // for input CDR streams
00079 template<class NCS_TO_TCS>
00080 void
00081 TAO_Codeset_Translator_Factory_T<NCS_TO_TCS>::assign (TAO_OutputCDR *cdr) const
00082 {
00083   if (cdr)
00084     {
00085       this->assign_i(cdr,this->translator_);
00086     }
00087 }
00088 
00089 #endif /* TAO_CODESET_TRANSLATOR_FACTORY_T_CPP */
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 
00100 

Generated on Mon Jun 16 13:48:05 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002