Main Page
Class Hierarchy
Alphabetical List
Compound List
File List
Compound Members
include
FXUTF16Codec.h
Go to the documentation of this file.
1
/********************************************************************************
2
* *
3
* U T F - 1 6 T e x t C o d e c *
4
* *
5
*********************************************************************************
6
* Copyright (C) 2002,2006 by L.Johnson & J.van der Zijp. All Rights Reserved. *
7
*********************************************************************************
8
* This library is free software; you can redistribute it and/or *
9
* modify it under the terms of the GNU Lesser General Public *
10
* License as published by the Free Software Foundation; either *
11
* version 2.1 of the License, or (at your option) any later version. *
12
* *
13
* This library is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16
* Lesser General Public License for more details. *
17
* *
18
* You should have received a copy of the GNU Lesser General Public *
19
* License along with this library; if not, write to the Free Software *
20
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
21
*********************************************************************************
22
* $Id: FXUTF16Codec.h,v 1.10 2006/01/22 17:58:12 fox Exp $ *
23
********************************************************************************/
24
#ifndef FXUTF16CODEC_H
25
#define FXUTF16CODEC_H
26
27
#ifndef FXTEXTCODEC_H
28
#include "
FXTextCodec.h
"
29
#endif
30
31
32
namespace
FX {
33
34
/// Codec for UTF-16BE
35
class
FXAPI
FXUTF16BECodec
:
public
FXTextCodec
{
36
FXDECLARE
(
FXUTF16BECodec
)
37
public
:
38
FXUTF16BECodec
(){}
39
virtual
FXint
mb2wc(
FXwchar
&
wc
,
const
FXchar
* src,
FXint
nsrc)
const
;
40
virtual
FXint
wc2mb(
FXchar
* dst,
FXint
ndst,
FXwchar
wc
)
const
;
41
virtual
const
FXchar
*
name
()
const
;
42
virtual
const
FXchar
* mimeName()
const
;
43
virtual
FXint
mibEnum()
const
;
44
virtual
const
FXchar
*
const
* aliases()
const
;
45
virtual
~FXUTF16BECodec
(){}
46
};
47
48
49
/// Codec for UTF-16LE
50
class
FXAPI
FXUTF16LECodec
:
public
FXTextCodec
{
51
FXDECLARE
(
FXUTF16LECodec
)
52
public
:
53
FXUTF16LECodec
(){}
54
virtual
FXint
mb2wc(
FXwchar
&
wc
,
const
FXchar
* src,
FXint
nsrc)
const
;
55
virtual
FXint
wc2mb(
FXchar
* dst,
FXint
ndst,
FXwchar
wc
)
const
;
56
virtual
const
FXchar
*
name
()
const
;
57
virtual
const
FXchar
* mimeName()
const
;
58
virtual
FXint
mibEnum()
const
;
59
virtual
const
FXchar
*
const
* aliases()
const
;
60
virtual
~FXUTF16LECodec
(){}
61
};
62
63
64
/// Codec for UTF-16
65
class
FXAPI
FXUTF16Codec
:
public
FXTextCodec
{
66
FXDECLARE
(
FXUTF16Codec
)
67
public
:
68
FXUTF16Codec
(){}
69
virtual
FXint
mb2wc(
FXwchar
&
wc
,
const
FXchar
* src,
FXint
nsrc)
const
;
70
virtual
FXint
mb2utflen(
const
FXchar
* src,
FXint
nsrc)
const
;
71
virtual
FXint
mb2utf(
FXchar
* dst,
FXint
ndst,
const
FXchar
* src,
FXint
nsrc)
const
;
72
virtual
FXint
wc2mb(
FXchar
* dst,
FXint
ndst,
FXwchar
wc
)
const
;
73
virtual
FXint
utf2mblen(
const
FXchar
* src,
FXint
nsrc)
const
;
74
virtual
FXint
utf2mb(
FXchar
* dst,
FXint
ndst,
const
FXchar
* src,
FXint
nsrc)
const
;
75
virtual
const
FXchar
*
name
()
const
;
76
virtual
const
FXchar
* mimeName()
const
;
77
virtual
FXint
mibEnum()
const
;
78
virtual
const
FXchar
*
const
* aliases()
const
;
79
virtual
~FXUTF16Codec
(){}
80
};
81
82
}
83
84
#endif
85
FX::FXUTF16Codec::~FXUTF16Codec
virtual ~FXUTF16Codec()
Definition:
FXUTF16Codec.h:79
FX::FXTextCodec
Abstract base class for a stateless coder/decoder.
Definition:
FXTextCodec.h:38
FX::FXchar
char FXchar
Definition:
fxdefs.h:387
FX::FXUTF16LECodec::~FXUTF16LECodec
virtual ~FXUTF16LECodec()
Definition:
FXUTF16Codec.h:60
FX::FXUTF16Codec
Codec for UTF-16.
Definition:
FXUTF16Codec.h:65
FXAPI
#define FXAPI
Definition:
fxdefs.h:122
FX::FXPath::name
FXString name(const FXString &file)
Return name and extension part of the path name.
FX::FXUTF16BECodec::~FXUTF16BECodec
virtual ~FXUTF16BECodec()
Definition:
FXUTF16Codec.h:45
FX::FXwchar
wchar_t FXwchar
Definition:
fxdefs.h:411
FX::FXint
int FXint
Definition:
fxdefs.h:397
FX::FXUTF16Codec::FXUTF16Codec
FXUTF16Codec()
Definition:
FXUTF16Codec.h:68
FX::wc
FXwchar wc(const FXchar *ptr)
Return wide character from utf8 string at ptr.
FX::FXUTF16BECodec::FXUTF16BECodec
FXUTF16BECodec()
Definition:
FXUTF16Codec.h:38
FX::FXUTF16LECodec::FXUTF16LECodec
FXUTF16LECodec()
Definition:
FXUTF16Codec.h:53
FXDECLARE
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition:
FXObject.h:92
FXTextCodec.h
FX::FXUTF16BECodec
Codec for UTF-16BE.
Definition:
FXUTF16Codec.h:35
FX::FXUTF16LECodec
Codec for UTF-16LE.
Definition:
FXUTF16Codec.h:50
Copyright © 1997-2005 Jeroen van der Zijp