2000-01-11 17:28:49 +00:00
|
|
|
/*
|
|
|
|
**********************************************************************
|
|
|
|
* Copyright (c) 2000, International Business Machines
|
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
**********************************************************************
|
|
|
|
* Date Name Description
|
|
|
|
* 01/11/2000 aliu Creation.
|
|
|
|
**********************************************************************
|
|
|
|
*/
|
|
|
|
#ifndef NULTRANS_H
|
|
|
|
#define NULTRANS_H
|
|
|
|
|
2002-09-20 01:54:48 +00:00
|
|
|
#include "unicode/utypes.h"
|
|
|
|
|
|
|
|
#if !UCONFIG_NO_TRANSLITERATION
|
|
|
|
|
2000-01-11 17:28:49 +00:00
|
|
|
#include "unicode/translit.h"
|
|
|
|
|
2001-10-08 23:26:58 +00:00
|
|
|
U_NAMESPACE_BEGIN
|
|
|
|
|
2000-01-11 17:28:49 +00:00
|
|
|
/**
|
|
|
|
* A transliterator that leaves text unchanged.
|
|
|
|
* @author Alan Liu
|
2002-12-12 00:33:11 +00:00
|
|
|
* @obsolete ICU 2.4. Use transliterator factory methods instead since this class will be removed in that release.
|
2000-01-11 17:28:49 +00:00
|
|
|
*/
|
|
|
|
class U_I18N_API NullTransliterator : public Transliterator {
|
|
|
|
|
2001-03-27 19:35:33 +00:00
|
|
|
public:
|
|
|
|
|
2000-01-11 17:28:49 +00:00
|
|
|
/**
|
|
|
|
* ID for this transliterator.
|
2002-12-12 00:33:11 +00:00
|
|
|
* @obsolete ICU 2.4. Use transliterator factory methods instead since this class will be removed in that release.
|
2000-01-11 17:28:49 +00:00
|
|
|
*/
|
2001-06-20 22:52:03 +00:00
|
|
|
static const UChar ID[]; // public for Transliterator
|
2000-01-11 17:28:49 +00:00
|
|
|
|
2001-08-15 19:06:40 +00:00
|
|
|
/**
|
|
|
|
* ID for this transliterator.
|
2002-12-12 00:33:11 +00:00
|
|
|
* @obsolete ICU 2.4. Use transliterator factory methods instead since this class will be removed in that release.
|
2001-08-15 19:06:40 +00:00
|
|
|
*/
|
|
|
|
static const UChar SHORT_ID[]; // public for Transliterator
|
|
|
|
|
2000-01-11 17:28:49 +00:00
|
|
|
/**
|
|
|
|
* Constructs a transliterator.
|
2002-12-12 00:33:11 +00:00
|
|
|
* @obsolete ICU 2.4. Use transliterator factory methods instead since this class will be removed in that release.
|
2000-01-11 17:28:49 +00:00
|
|
|
*/
|
|
|
|
NullTransliterator();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Destructor.
|
2002-12-12 00:33:11 +00:00
|
|
|
* @obsolete ICU 2.4. Use transliterator factory methods instead since this class will be removed in that release.
|
2000-01-11 17:28:49 +00:00
|
|
|
*/
|
|
|
|
virtual ~NullTransliterator();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Transliterator API.
|
2002-12-12 00:33:11 +00:00
|
|
|
* @obsolete ICU 2.4. Use transliterator factory methods instead since this class will be removed in that release.
|
2000-01-11 17:28:49 +00:00
|
|
|
*/
|
|
|
|
Transliterator* clone(void) const;
|
|
|
|
|
|
|
|
/**
|
2000-01-18 18:27:27 +00:00
|
|
|
* Implements {@link Transliterator#handleTransliterate}.
|
2002-12-12 00:33:11 +00:00
|
|
|
* @obsolete ICU 2.4. Use transliterator factory methods instead since this class will be removed in that release.
|
2000-01-11 17:28:49 +00:00
|
|
|
*/
|
2000-06-27 19:00:38 +00:00
|
|
|
virtual void handleTransliterate(Replaceable& text, UTransPosition& offset,
|
2000-05-18 22:08:39 +00:00
|
|
|
UBool isIncremental) const;
|
2002-06-29 00:04:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ICU "poor man's RTTI", returns a UClassID for the actual class.
|
|
|
|
*
|
|
|
|
* @draft ICU 2.2
|
|
|
|
*/
|
2003-02-06 22:57:35 +00:00
|
|
|
virtual inline UClassID getDynamicClassID() const;
|
2002-06-29 00:04:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ICU "poor man's RTTI", returns a UClassID for this class.
|
|
|
|
*
|
|
|
|
* @draft ICU 2.2
|
|
|
|
*/
|
2003-02-06 22:57:35 +00:00
|
|
|
static inline UClassID getStaticClassID();
|
2002-06-29 00:04:16 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The address of this static class variable serves as this class's ID
|
|
|
|
* for ICU "poor man's RTTI".
|
|
|
|
*/
|
|
|
|
static const char fgClassID;
|
2000-01-11 17:28:49 +00:00
|
|
|
};
|
|
|
|
|
2001-03-27 19:35:33 +00:00
|
|
|
inline NullTransliterator::NullTransliterator() : Transliterator(ID, 0) {}
|
2000-01-11 17:28:49 +00:00
|
|
|
|
|
|
|
inline NullTransliterator::~NullTransliterator() {}
|
|
|
|
|
2003-02-06 22:57:35 +00:00
|
|
|
inline UClassID
|
|
|
|
NullTransliterator::getStaticClassID()
|
|
|
|
{ return (UClassID)&fgClassID; }
|
|
|
|
|
|
|
|
inline UClassID
|
|
|
|
NullTransliterator::getDynamicClassID() const
|
|
|
|
{ return NullTransliterator::getStaticClassID(); }
|
|
|
|
|
2001-10-08 23:26:58 +00:00
|
|
|
U_NAMESPACE_END
|
|
|
|
|
2002-09-20 01:54:48 +00:00
|
|
|
#endif /* #if !UCONFIG_NO_TRANSLITERATION */
|
|
|
|
|
2000-01-11 17:28:49 +00:00
|
|
|
#endif
|