1 /**
2  *  Yudit Unicode Editor Source File
3  *
4  *  GNU Copyright (C) 1997-2006  Gaspar Sinai <gaspar@yudit.org>
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License, version 2,
8  *  dated June 1991. See file COPYYING for details.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19 
20 #ifndef SB_DeShape_h
21 #define SB_DeShape_h
22 
23 #include "stoolkit/SUniMap.h"
24 #include "stoolkit/STypes.h"
25 #include "stoolkit/SString.h"
26 #include "stoolkit/SStringVector.h"
27 #include "stoolkit/sencoder/SBEncoder.h"
28 #include "stoolkit/sencoder/SB_UTF8.h"
29 
30 /**
31  * Chineese text converter (big5)
32  * @author: Gaspar Sinai <gaspar@yudit.org>
33  * @version: 2000-05-12
34  */
35 class SB_DeShape : SBEncoder
36 {
37 public:
38   SB_DeShape ();
39   virtual ~SB_DeShape ();
40 
41   virtual const SString& encode (const SV_UCS4& input);
42   virtual const SV_UCS4& decode (const SString& input);
43 
44   virtual const SStringVector& delimiters ();
45   virtual const SStringVector& delimiters (const SString& sample);
46 
47   bool isOK() const;
48 
49 protected:
50   const SV_UCS4& convert (const SV_UCS4& input);
51   SUniMap   shape;
52   SB_UTF8   interface;
53   bool      ok;
54 };
55 
56 #endif /* SB_DeShape_h */
57