Encoding_Converter_Factory.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=========================================================================
00004 /**
00005  * @file Encoding_Converter_Factory.h
00006  *
00007  * Encoding_Converter_Factory.h,v 4.1 2006/01/09 15:18:53 elliott_c Exp
00008  *
00009  * This class can be used to create encoding converters of various types.
00010  *
00011  * @author Chad Elliott <elliott_c@ociweb.com>
00012  */
00013 //=========================================================================
00014 
00015 #ifndef ACE_ENCODING_CONVERTER_FACTORY_H
00016 #define ACE_ENCODING_CONVERTER_FACTORY_H
00017 
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "ace/Basic_Types.h"
00021 
00022 #if defined (ACE_USES_WCHAR)
00023 #include "ace/ACE_export.h"
00024 
00025 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00026 
00027 class ACE_Encoding_Converter;
00028 
00029 /** Create an encoding converter based on the source or hint.
00030  * This class allows users to avoid knowing any concrete converter types.
00031  */
00032 class ACE_Export ACE_Encoding_Converter_Factory
00033 {
00034 public:
00035   /// This enum is used to tell what type of converter to create.
00036   enum Encoding_Hint { ACE_UTF_32BE, ACE_UTF_32LE,
00037                        ACE_UTF_16BE, ACE_UTF_16LE,
00038                        ACE_UTF_8, ACE_NONE
00039                      };
00040 
00041   /// Create an encoding converter based on the source.  If a hint is
00042   /// given, it just creates the specified type of converter without looking
00043   /// at the source.
00044   static ACE_Encoding_Converter* create (const ACE_Byte* source,
00045                                          size_t source_size,
00046                                          Encoding_Hint hint = ACE_NONE);
00047 };
00048 
00049 ACE_END_VERSIONED_NAMESPACE_DECL
00050 #endif /* ACE_USES_WCHAR */
00051 
00052 #include /**/ "ace/post.h"
00053 
00054 #endif /* ACE_ENCODING_CONVERTER_FACTORY_H */

Generated on Thu Nov 9 09:41:50 2006 for ACE by doxygen 1.3.6