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,2009 by L.Johnson & J.van der Zijp.  All Rights Reserved.  *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (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                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 *********************************************************************************
00021 * $Id: FXUTF16Codec.h,v 1.15 2009/01/06 13:07:29 fox Exp $                      *
00022 ********************************************************************************/
00023 #ifndef FXUTF16CODEC_H
00024 #define FXUTF16CODEC_H
00025 
00026 #ifndef FXTEXTCODEC_H
00027 #include "FXTextCodec.h"
00028 #endif
00029 
00030 
00031 namespace FX {
00032 
00033 /// Codec for UTF-16BE
00034 class FXAPI FXUTF16BECodec : public FXTextCodec {
00035   FXDECLARE(FXUTF16BECodec)
00036 public:
00037   FXUTF16BECodec(){}
00038   virtual FXint mb2wc(FXwchar& wc,const FXchar* src,FXint nsrc) const;
00039   virtual FXint wc2mb(FXchar* dst,FXint ndst,FXwchar wc) const;
00040   virtual const FXchar* name() const;
00041   virtual const FXchar* mimeName() const;
00042   virtual FXint mibEnum() const;
00043   virtual const FXchar* const* aliases() const;
00044   virtual ~FXUTF16BECodec(){}
00045   };
00046 
00047 
00048 /// Codec for UTF-16LE
00049 class FXAPI FXUTF16LECodec : public FXTextCodec {
00050   FXDECLARE(FXUTF16LECodec)
00051 public:
00052   FXUTF16LECodec(){}
00053   virtual FXint mb2wc(FXwchar& wc,const FXchar* src,FXint nsrc) const;
00054   virtual FXint wc2mb(FXchar* dst,FXint ndst,FXwchar wc) const;
00055   virtual const FXchar* name() const;
00056   virtual const FXchar* mimeName() const;
00057   virtual FXint mibEnum() const;
00058   virtual const FXchar* const* aliases() const;
00059   virtual ~FXUTF16LECodec(){}
00060   };
00061 
00062 
00063 /// Codec for UTF-16
00064 class FXAPI FXUTF16Codec : public FXTextCodec {
00065   FXDECLARE(FXUTF16Codec)
00066 public:
00067   FXUTF16Codec(){}
00068   virtual FXint mb2wc(FXwchar& wc,const FXchar* src,FXint nsrc) const;
00069   virtual FXint mb2utflen(const FXchar* src,FXint nsrc) const;
00070   virtual FXint mb2utf(FXchar* dst,FXint ndst,const FXchar* src,FXint nsrc) const;
00071   virtual FXint wc2mb(FXchar* dst,FXint ndst,FXwchar wc) const;
00072   virtual FXint utf2mblen(const FXchar* src,FXint nsrc) const;
00073   virtual FXint utf2mb(FXchar* dst,FXint ndst,const FXchar* src,FXint nsrc) const;
00074   virtual const FXchar* name() const;
00075   virtual const FXchar* mimeName() const;
00076   virtual FXint mibEnum() const;
00077   virtual const FXchar* const* aliases() const;
00078   virtual ~FXUTF16Codec(){}
00079   };
00080 
00081 }
00082 
00083 #endif
00084 

Copyright © 1997-2009 Jeroen van der Zijp