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

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  *  $Id: Encoding.h,v 1.1.1.1 2003/02/21 18:36:32 chad 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 = 0,
00040     UCS4LE = 1,
00041     UCS4_2143 = 2,
00042     UCS4_3412 = 3,
00043     UTF16BE = 4,
00044     UTF16LE = 5,
00045     UTF8 = 6,
00046     OTHER = 7
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 Mon Jun 16 13:23:21 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002