Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXUTF16Codec.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                      U T F - 1 6  T e x t   C o d e c                         *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2002,2006 by L.Johnson & J.van der Zijp.  All Rights Reserved.  *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (at your option) any later version.            *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************
00022 * $Id: FXUTF16Codec.h,v 1.10 2006/01/22 17:58:12 fox Exp $                       *
00023 ********************************************************************************/
00024 #ifndef FXUTF16CODEC_H
00025 #define FXUTF16CODEC_H
00026 
00027 #ifndef FXTEXTCODEC_H
00028 #include "FXTextCodec.h"
00029 #endif
00030 
00031 
00032 namespace FX {
00033 
00034 /// Codec for UTF-16BE
00035 class FXAPI FXUTF16BECodec : public FXTextCodec {
00036   FXDECLARE(FXUTF16BECodec)
00037 public:
00038   FXUTF16BECodec(){}
00039   virtual FXint mb2wc(FXwchar& wc,const FXchar* src,FXint nsrc) const;
00040   virtual FXint wc2mb(FXchar* dst,FXint ndst,FXwchar wc) const;
00041   virtual const FXchar* name() const;
00042   virtual const FXchar* mimeName() const;
00043   virtual FXint mibEnum() const;
00044   virtual const FXchar* const* aliases() const;
00045   virtual ~FXUTF16BECodec(){}
00046   };
00047 
00048 
00049 /// Codec for UTF-16LE
00050 class FXAPI FXUTF16LECodec : public FXTextCodec {
00051   FXDECLARE(FXUTF16LECodec)
00052 public:
00053   FXUTF16LECodec(){}
00054   virtual FXint mb2wc(FXwchar& wc,const FXchar* src,FXint nsrc) const;
00055   virtual FXint wc2mb(FXchar* dst,FXint ndst,FXwchar wc) const;
00056   virtual const FXchar* name() const;
00057   virtual const FXchar* mimeName() const;
00058   virtual FXint mibEnum() const;
00059   virtual const FXchar* const* aliases() const;
00060   virtual ~FXUTF16LECodec(){}
00061   };
00062 
00063 
00064 /// Codec for UTF-16
00065 class FXAPI FXUTF16Codec : public FXTextCodec {
00066   FXDECLARE(FXUTF16Codec)
00067 public:
00068   FXUTF16Codec(){}
00069   virtual FXint mb2wc(FXwchar& wc,const FXchar* src,FXint nsrc) const;
00070   virtual FXint mb2utflen(const FXchar* src,FXint nsrc) const;
00071   virtual FXint mb2utf(FXchar* dst,FXint ndst,const FXchar* src,FXint nsrc) const;
00072   virtual FXint wc2mb(FXchar* dst,FXint ndst,FXwchar wc) const;
00073   virtual FXint utf2mblen(const FXchar* src,FXint nsrc) const;
00074   virtual FXint utf2mb(FXchar* dst,FXint ndst,const FXchar* src,FXint nsrc) const;
00075   virtual const FXchar* name() const;
00076   virtual const FXchar* mimeName() const;
00077   virtual FXint mibEnum() const;
00078   virtual const FXchar* const* aliases() const;
00079   virtual ~FXUTF16Codec(){}
00080   };
00081 
00082 }
00083 
00084 #endif
00085 

Copyright © 1997-2005 Jeroen van der Zijp