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

XML_Types.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    XML_Types.h
00006  *
00007  * This file collects the type definitions for data types
00008  * used in ACE XML parser.
00009  *
00010  *  $Id: XML_Types.h,v 1.1.1.1 2003/02/21 18:36:32 chad Exp $
00011  *
00012  *  @author Nanbor Wang <nanbor@cs.wustl.edu>
00013  */
00014 //=============================================================================
00015 
00016 #ifndef _ACEXML_XML_TYPES_H_
00017 #define _ACEXML_XML_TYPES_H_
00018 
00019 #include "ace/pre.h"
00020 #include "ace/OS.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 #pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 #include "ace/SString.h"
00027 
00028 # if defined (ACE_HAS_WCHAR) && (ACE_SIZEOF_WCHAR == 2)
00029 typedef wchar_t ACEXML_UTF16;
00030 # else
00031 typedef ACE_USHORT16 ACEXML_UTF16;
00032 # endif /* ACE_HAS_WCHAR && ACE_SIZEOF_WCHAR == 2 */
00033 
00034 # if defined (ACE_HAS_WCHAR) && (ACE_SIZEOF_WCHAR == 4)
00035 typedef wchar_t ACEXML_UCS4;
00036 # else
00037 typedef ACE_UINT32 ACEXML_UCS4;
00038 # endif /* ACE_HAS_WCHAR && ACE_SIZEOF_WCHAR == 4 */
00039 
00040 typedef char ACEXML_UTF8;
00041 
00042 /**
00043  * @typedef ACEXML_Char
00044  * ACEXML_Char only maps to ACEXML_UTF16 when ACE_USES_WCHAR is defined.
00045  * Here we assume sizeof (wchar_t) is always 2 bytes.
00046  *
00047  * Default XML strings will use UTF-8 encoding.  We would like to use
00048  * the string classes in standard C++ Library here.  But they are not
00049  * very portable yet (as far as I know,) and I'll just use ACE_CString
00050  * for now, unless UNICODE support is turned on.  Notice that you
00051  * should never convert strings between ACE_CString and ACE_WString
00052  * using the built-in conversion functions as they only perform simple
00053  * copy without any encoding conversion.
00054  */
00055 # if defined (ACE_USES_WCHAR)
00056 typedef ACEXML_UTF16 ACEXML_Char;
00057 typedef ACE_WString ACEXML_String;
00058 # else
00059 typedef ACEXML_UTF8 ACEXML_Char;
00060 typedef ACE_CString ACEXML_String;
00061 # endif /* ACE_USES_WCHAR */
00062 
00063 # if (!defined (ACEXML_HAS_INLINE) && defined (__ACE_INLINE__)) ||  (ACEXML_HAS_INLINE == 1)
00064 #   define __ACEXML_INLINE__ inline
00065 # else
00066 #   if defined (__ACEXML_INLINE__)
00067 #     undef __ACEXML_INLINE__
00068 #   endif /* __ACEXML_INLINE__ */
00069 # endif /* (!ACEXML_HAS_INLINE) && (__ACE_INLINE__) || (ACEXML_HAS_INLINE == 1) */
00070 
00071 # if defined (__ACEXML_INLINE__)
00072 #   define ACEXML_INLINE inline
00073 # else
00074 #   define ACEXML_INLINE
00075 # endif /* __ACEXML_INLINE */
00076 
00077 
00078 #include "ace/post.h"
00079 
00080 #endif /* _ACEXML_XML_TYPE_H_ */

Generated on Mon Jun 16 13:23:28 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002