Codeset_IBM1047.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Codeset_IBM1047.h
00006  *
00007  *  $Id: Codeset_IBM1047.h 81388 2008-04-23 14:02:05Z johnnyw $
00008  *
00009  *  Declares the arrays required to convert between ISO8859 (aka
00010  *  Latin/1) and IBM1047 (aka EBCDIC).
00011  *
00012  *  @author Jim Rogers (jrogers@viasoft.com)
00013  */
00014 //=============================================================================
00015 
00016 
00017 #ifndef ACE_CODESET_IMB1047_H
00018 #define ACE_CODESET_IMB1047_H
00019 #include /**/ "ace/pre.h"
00020 
00021 #include /**/ "ace/config-all.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #if defined (ACE_HAS_EBCDIC)
00028 
00029 #include "ace/CDR_Stream.h"
00030 
00031 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00032 
00033 // ****************************************************************
00034 
00035 /**
00036  * @class ACE_IBM1047_ISO8859
00037  *
00038  * @brief Codeset translation specialization.
00039  *
00040  * This class performs the codeset translation:
00041  *   - Native:        IBM_1047 (i.e. EBCDIC)
00042  *   - Stream:        ISO-8859 (i.e. Latin/1)
00043  */
00044 class ACE_Export ACE_IBM1047_ISO8859 : public ACE_Char_Codeset_Translator
00045 {
00046 public:
00047   /// A do nothing constructor.
00048   ACE_IBM1047_ISO8859 (void);
00049 
00050   /// Virtual destruction
00051   virtual ~ACE_IBM1047_ISO8859 (void);
00052 
00053   // = Documented in $ACE_ROOT/ace/CDR_Stream.h
00054   virtual ACE_CDR::Boolean read_char (ACE_InputCDR &,
00055                                       ACE_CDR::Char &);
00056   virtual ACE_CDR::Boolean read_string (ACE_InputCDR &,
00057                                         ACE_CDR::Char *&);
00058   virtual ACE_CDR::Boolean read_char_array (ACE_InputCDR &,
00059                                             ACE_CDR::Char *,
00060                                             ACE_CDR::ULong);
00061   virtual ACE_CDR::Boolean write_char (ACE_OutputCDR &,
00062                                        ACE_CDR::Char);
00063   virtual ACE_CDR::Boolean write_string (ACE_OutputCDR &,
00064                                          ACE_CDR::ULong,
00065                                          const ACE_CDR::Char *);
00066   virtual ACE_CDR::Boolean write_char_array (ACE_OutputCDR &,
00067                                              const ACE_CDR::Char *,
00068                                              ACE_CDR::ULong);
00069 
00070   /// Return the native codeset ID as defined in the OSF code and character
00071   /// set registry, 0x10020417
00072   virtual ACE_CDR::ULong ncs ();
00073   /// Return the translated codeset ID as defined in the OSF code and character
00074   /// set registry, 0x00010001
00075   virtual ACE_CDR::ULong tcs ();
00076 };
00077 
00078 /**
00079  * @class ACE_ISO8859_IBM1047
00080  *
00081  * @brief Codeset translation specialization.
00082  *
00083  * This class performs the codeset translation:
00084  *   - Native:        ISO-8859 (i.e. Latin/1)
00085  *   - Stream:        IBM-1047 (i.e. EBCDIC)
00086  */
00087 class ACE_Export ACE_ISO8859_IBM1047 : public ACE_Char_Codeset_Translator
00088 {
00089 public:
00090   /// A do nothing constructor.
00091   ACE_ISO8859_IBM1047 (void);
00092 
00093   /// Virtual destruction
00094   virtual ~ACE_ISO8859_IBM1047 (void);
00095 
00096   // = Documented in $ACE_ROOT/ace/CDR_Stream.h
00097   virtual ACE_CDR::Boolean read_char (ACE_InputCDR &,
00098                                       ACE_CDR::Char &);
00099   virtual ACE_CDR::Boolean read_string (ACE_InputCDR &,
00100                                         ACE_CDR::Char *&);
00101   virtual ACE_CDR::Boolean read_char_array (ACE_InputCDR &,
00102                                             ACE_CDR::Char *,
00103                                             ACE_CDR::ULong);
00104   virtual ACE_CDR::Boolean write_char (ACE_OutputCDR &,
00105                                        ACE_CDR::Char);
00106   virtual ACE_CDR::Boolean write_string (ACE_OutputCDR &,
00107                                          ACE_CDR::ULong,
00108                                          const ACE_CDR::Char *);
00109   virtual ACE_CDR::Boolean write_char_array (ACE_OutputCDR &,
00110                                              const ACE_CDR::Char *,
00111                                              ACE_CDR::ULong);
00112 
00113   /// Return the native codeset ID as defined in the OSF code and character
00114   /// set registry, 0x00010001
00115   virtual ACE_CDR::ULong ncs ();
00116   /// Return the translated codeset ID as defined in the OSF code and character
00117   /// set registry, 0x10020417
00118   virtual ACE_CDR::ULong tcs ();
00119 };
00120 
00121 ACE_END_VERSIONED_NAMESPACE_DECL
00122 
00123 #endif /* ACE_EBCDIC */
00124 
00125 #include /**/ "ace/post.h"
00126 
00127 #endif /* ACE_CODESET_IMB1047_H */

Generated on Tue Feb 2 17:18:38 2010 for ACE by  doxygen 1.4.7