Encoding.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Encoding.h
00006  *
00007  * This file provides utility functions to determine the encoding of a file
00008  * or a byte stream automatically.
00009  *
00010  *  Encoding.h,v 1.3 2003/07/19 19:04:10 dhinton Exp
00011  *
00012  *  @author Krishnakumar B <kitty@cs.wustl.edu>
00013  */
00014 //=============================================================================
00015 
00016 #ifndef _ACEXML_ENCODING_H
00017 #define _ACEXML_ENCODING_H
00018 
00019 #include /**/ "ace/pre.h"
00020 #include "ACEXML/common/ACEXML_Export.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 #pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 #include "ACEXML/common/XML_Types.h"
00027 
00028 /**
00029  * @class ACEXML_Encoding Encoding.h "ACEXML/common/Encoding.h"
00030  *
00031  * @brief ACEXML_Encoding
00032  *
00033  * Wrapper class for determining the encoding of a file or a byte stream.
00034  */
00035 class ACEXML_Export ACEXML_Encoding
00036 {
00037 public:
00038   enum {
00039     UCS4BE,
00040     UCS4LE,
00041     UCS4_2143,
00042     UCS4_3412,
00043     UTF16BE,
00044     UTF16LE,
00045     UTF8,
00046     OTHER
00047   } ENCODING;
00048 
00049   static const ACEXML_Char* encoding_names_[8];
00050 
00051   static const ACEXML_UTF8 byte_order_mark_[][4];
00052 
00053   static const ACEXML_UTF8 magic_values_[][4];
00054 
00055   static const ACEXML_Char* get_encoding (const char* input);
00056 
00057 };
00058 
00059 #include /**/ "ace/post.h"
00060 
00061 #endif /* _ACEXML_ENCODING_H */

Generated on Thu Nov 9 11:45:36 2006 for ACEXML by doxygen 1.3.6