2000-01-18 01:55:52 +00:00
|
|
|
/*
|
|
|
|
**********************************************************************
|
|
|
|
* Copyright (c) 2000, International Business Machines
|
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
**********************************************************************
|
|
|
|
* Date Name Description
|
|
|
|
* 01/17/2000 aliu Ported from Java.
|
|
|
|
**********************************************************************
|
|
|
|
*/
|
|
|
|
#ifndef JAMOHANG_H
|
|
|
|
#define JAMOHANG_H
|
|
|
|
|
|
|
|
#include "unicode/translit.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A transliterator that converts Jamo to Hangul.
|
|
|
|
*
|
|
|
|
* @author Mark Davis
|
2000-06-27 19:00:38 +00:00
|
|
|
* @version $RCSfile: jamohang.h,v $ $Revision: 1.6 $ $Date: 2000/06/27 19:00:38 $
|
2000-01-18 01:55:52 +00:00
|
|
|
*/
|
|
|
|
class U_I18N_API JamoHangulTransliterator : public Transliterator {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ID for this transliterator.
|
|
|
|
*/
|
|
|
|
static const char* _ID;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructs a transliterator.
|
|
|
|
*/
|
|
|
|
JamoHangulTransliterator(UnicodeFilter* adoptedFilter = 0);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Destructor.
|
|
|
|
*/
|
|
|
|
virtual ~JamoHangulTransliterator();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Copy constructor.
|
|
|
|
*/
|
|
|
|
JamoHangulTransliterator(const JamoHangulTransliterator&);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Assignment operator.
|
|
|
|
*/
|
|
|
|
JamoHangulTransliterator& operator=(const JamoHangulTransliterator&);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Transliterator API.
|
|
|
|
*/
|
|
|
|
Transliterator* clone(void) const;
|
|
|
|
|
|
|
|
/**
|
2000-01-18 18:27:27 +00:00
|
|
|
* Implements {@link Transliterator#handleTransliterate}.
|
2000-01-18 01:55:52 +00:00
|
|
|
*/
|
2000-06-27 19:00:38 +00:00
|
|
|
virtual void handleTransliterate(Replaceable& text, UTransPosition& offsets,
|
2000-05-18 22:08:39 +00:00
|
|
|
UBool isIncremental) const;
|
2000-01-18 01:55:52 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2000-01-18 18:43:09 +00:00
|
|
|
static UChar composeHangul(UChar last, UChar ch, int32_t& count);
|
2000-01-18 01:55:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
inline JamoHangulTransliterator::~JamoHangulTransliterator() {}
|
|
|
|
|
|
|
|
#endif
|