scuffed-code/icu4c/source/i18n/spclmap.h
Unknown User aa0b0a88e8 Initial revision
X-SVN-Rev: 2
1999-08-16 21:50:52 +00:00

70 lines
2.3 KiB
C++

/*
*****************************************************************************************
* *
* COPYRIGHT: *
* (C) Copyright Taligent, Inc., 1997 *
* (C) Copyright International Business Machines Corporation, 1997-1999 *
* Licensed Material - Program-Property of IBM - All Rights Reserved. *
* US Government Users Restricted Rights - Use, duplication, or disclosure *
* restricted by GSA ADP Schedule Contract with IBM Corp. *
* *
*****************************************************************************************
*
* File SPCLMAP.H
*
* SpecialMapping represents exceptions to the normal unicode category mapping.
*
* @package Text and International
* @category Text Scanning
*
* Modification History:
*
* Date Name Description
* 02/18/97 aliu Converted from OpenClass.
*****************************************************************************************
*/
#ifndef SPCLMAP_H
#define SPCLMAP_H
#include "utypes.h" // UChar
#include "txtbdat.h"
/**
* This class represents ranges of characters that are exceptions to the normal
* unicode category mapping. Characters from the start char to the end char,
* inclusive, are mapped to the new value.
*/
class SpecialMapping {
public:
/**
* Create a special mapping from the single char ch to the value nv.
*/
SpecialMapping(UChar ch, TextBoundaryData::Type nv) : fStartChar(ch), fEndChar(ch), fNewValue(nv) {}
/**
* Create a special mapping from the range of chars sch - ech, inclusive, to the value nv.
*/
SpecialMapping(UChar sch, UChar ech, TextBoundaryData::Type nv) : fStartChar(sch), fEndChar(ech), fNewValue(nv) {}
/**
* The first character of the range.
*/
UChar fStartChar;
/**
* The last character of the range.
*/
UChar fEndChar;
/**
* The character mapping to use.
*/
TextBoundaryData::Type fNewValue;
private:
SpecialMapping() {}
};
#endif // _SPCLMAP
//eof