FXTextCodec.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                   U n i c o d e   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: FXTextCodec.h,v 1.30 2006/01/22 17:58:11 fox Exp $                       *
00023 ********************************************************************************/
00024 #ifndef FXTEXTCODEC_H
00025 #define FXTEXTCODEC_H
00026 
00027 #ifndef FXOBJECT_H
00028 #include "FXObject.h"
00029 #endif
00030 
00031 
00032 namespace FX {
00033 
00034 
00038 class FXAPI FXTextCodec : public FXObject {
00039   FXDECLARE_ABSTRACT(FXTextCodec)
00040 public:
00041 
00043   FXTextCodec(){}
00044 
00045 
00047   static FXint utf2wc(FXwchar& wc,const FXchar* src,FXint nsrc);
00048 
00050   static FXint utf2wc(FXwchar& wc,const FXnchar* src,FXint nsrc);
00051 
00053   static FXint utf2wc(FXwchar& wc,const FXwchar* src,FXint nsrc);
00054 
00055 
00057   static FXint wc2utf(FXchar* dst,FXint ndst,FXwchar wc);
00058 
00060   static FXint wc2utf(FXnchar* dst,FXint ndst,FXwchar wc);
00061 
00063   static FXint wc2utf(FXwchar* dst,FXint ndst,FXwchar wc);
00064 
00065 
00067   virtual FXint mb2utflen(const FXchar* src,FXint nsrc) const;
00068 
00070   FXint mb2utflen(const FXString& src) const;
00071 
00073   virtual FXint mb2utf(FXchar* dst,FXint ndst,const FXchar* src,FXint nsrc) const;
00074 
00076   FXint mb2utf(FXchar* dst,FXint ndst,const FXchar* src) const;
00077 
00079   FXint mb2utf(FXchar* dst,FXint ndst,const FXString& src) const;
00080 
00082   FXString mb2utf(const FXchar* src,FXint nsrc) const;
00083 
00085   FXString mb2utf(const FXchar* src) const;
00086 
00088   FXString mb2utf(const FXString& src) const;
00089 
00091   virtual FXint mb2wc(FXwchar& wc,const FXchar* src,FXint nsrc) const;
00092 
00093 
00094 
00096   virtual FXint utf2mblen(const FXchar* src,FXint nsrc) const;
00097 
00099   virtual FXint utf2mblen(const FXString& src) const;
00100 
00102   virtual FXint utf2mb(FXchar* dst,FXint ndst,const FXchar* src,FXint nsrc) const;
00103 
00105   FXint utf2mb(FXchar* dst,FXint ndst,const FXchar* src) const;
00106 
00108   FXint utf2mb(FXchar* dst,FXint ndst,const FXString& src) const;
00109 
00111   FXString utf2mb(const FXchar* src,FXint nsrc) const;
00112 
00114   FXString utf2mb(const FXchar* src) const;
00115 
00117   FXString utf2mb(const FXString& src) const;
00118 
00120   virtual FXint wc2mb(FXchar* dst,FXint ndst,FXwchar wc) const;
00121 
00122 
00126   virtual FXint mibEnum() const = 0;
00127 
00131   virtual const FXchar* name() const = 0;
00132 
00137   virtual const FXchar* mimeName() const = 0;
00138 
00142   virtual const FXchar* const* aliases() const = 0;
00143 
00145   virtual ~FXTextCodec(){}
00146   };
00147 
00148 }
00149 
00150 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:24 2009 for TnFOX by doxygen v1.4.7