2001-11-16 23:51:15 +00:00
|
|
|
/*
|
|
|
|
**********************************************************************
|
|
|
|
* Copyright (C) 2001, International Business Machines
|
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
**********************************************************************
|
|
|
|
* Date Name Description
|
|
|
|
* 05/24/01 aliu Creation.
|
|
|
|
**********************************************************************
|
|
|
|
*/
|
|
|
|
#ifndef TOUPPTRN_H
|
|
|
|
#define TOUPPTRN_H
|
|
|
|
|
2001-12-03 21:43:13 +00:00
|
|
|
#include "unicode/translit.h"
|
2001-11-16 23:51:15 +00:00
|
|
|
#include "unicode/locid.h"
|
|
|
|
|
|
|
|
U_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A transliterator that performs locale-sensitive toUpper()
|
|
|
|
* case mapping.
|
|
|
|
* @author Alan Liu
|
|
|
|
*/
|
2001-11-30 00:57:29 +00:00
|
|
|
class U_I18N_API UppercaseTransliterator : public Transliterator {
|
2001-11-16 23:51:15 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructs a transliterator.
|
|
|
|
*/
|
2001-11-30 00:57:29 +00:00
|
|
|
UppercaseTransliterator(const Locale& loc = Locale::getDefault());
|
2001-11-16 23:51:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Destructor.
|
|
|
|
*/
|
|
|
|
virtual ~UppercaseTransliterator();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Copy constructor.
|
|
|
|
*/
|
|
|
|
UppercaseTransliterator(const UppercaseTransliterator&);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Assignment operator.
|
|
|
|
*/
|
|
|
|
UppercaseTransliterator& operator=(const UppercaseTransliterator&);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Transliterator API.
|
|
|
|
*/
|
|
|
|
Transliterator* clone(void) const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2001-11-30 00:57:29 +00:00
|
|
|
* Implements {@link Transliterator#handleTransliterate}.
|
2001-11-16 23:51:15 +00:00
|
|
|
*/
|
2001-11-30 00:57:29 +00:00
|
|
|
virtual void handleTransliterate(Replaceable& text,
|
|
|
|
UTransPosition& offsets,
|
|
|
|
UBool isIncremental) const;
|
2001-11-16 23:51:15 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
Locale loc;
|
2001-11-30 00:57:29 +00:00
|
|
|
UChar* buffer;
|
2001-11-16 23:51:15 +00:00
|
|
|
static const char _ID[];
|
|
|
|
};
|
|
|
|
|
|
|
|
U_NAMESPACE_END
|
|
|
|
|
|
|
|
#endif
|