home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / i18n / spclmap.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-16  |  2.3 KB  |  70 lines

  1. /*
  2. *****************************************************************************************
  3. *                                                                                       *
  4. * COPYRIGHT:                                                                            *
  5. *   (C) Copyright Taligent, Inc.,  1997                                                 *
  6. *   (C) Copyright International Business Machines Corporation,  1997-1999                    *
  7. *   Licensed Material - Program-Property of IBM - All Rights Reserved.                  *
  8. *   US Government Users Restricted Rights - Use, duplication, or disclosure             *
  9. *   restricted by GSA ADP Schedule Contract with IBM Corp.                              *
  10. *                                                                                       *
  11. *****************************************************************************************
  12. *
  13. * File SPCLMAP.H
  14. *
  15. * SpecialMapping represents exceptions to the normal unicode category mapping.
  16. *
  17. * @package  Text and International
  18. * @category Text Scanning
  19. *
  20. * Modification History:
  21. *
  22. *   Date        Name        Description
  23. *   02/18/97    aliu        Converted from OpenClass.
  24. *****************************************************************************************
  25. */
  26.  
  27. #ifndef SPCLMAP_H
  28. #define SPCLMAP_H
  29.  
  30. #include "utypes.h" // UChar
  31. #include "txtbdat.h"
  32.  
  33. /**
  34.  * This class represents ranges of characters that are exceptions to the normal
  35.  * unicode category mapping.  Characters from the start char to the end char,
  36.  * inclusive, are mapped to the new value.
  37.  */
  38. class SpecialMapping {
  39. public:
  40.     /**
  41.      * Create a special mapping from the single char ch to the value nv.
  42.      */
  43.     SpecialMapping(UChar ch, TextBoundaryData::Type nv) : fStartChar(ch), fEndChar(ch), fNewValue(nv) {}
  44.  
  45.     /**
  46.      * Create a special mapping from the range of chars sch - ech, inclusive, to the value nv.
  47.      */
  48.     SpecialMapping(UChar sch, UChar ech, TextBoundaryData::Type nv) : fStartChar(sch), fEndChar(ech), fNewValue(nv) {}
  49.  
  50.     /**
  51.      * The first character of the range.
  52.      */
  53.     UChar fStartChar;
  54.  
  55.     /**
  56.      * The last character of the range.
  57.      */
  58.     UChar fEndChar;
  59.  
  60.     /**
  61.      * The character mapping to use.
  62.      */
  63.     TextBoundaryData::Type fNewValue;
  64. private:
  65.     SpecialMapping() {}
  66. };
  67.  
  68. #endif // _SPCLMAP
  69. //eof
  70.