# Section 8.3:
Code Classes

This section of the Required Library contains definitions of those abstractions and classes which define encodings of glyphs of various kinds. The concept of code conversion and the necessary mappings to do this also naturally falls into this section of the library. Note that encodings which may be used are those registered in the international character code registry in addition to those specified by international standards.

1. Abstract Classes

   1. $CODE_MAPPER - this abstraction models a mapper from/to unicode (ISO/IEC 10646 standard) codes using an externally provided mapping object.
   2. $CODE_CONVERTER - this abstraction models an object capable of converting to/from any known encoding.

2. Immutable Classes

   - SCRIPTS - this is an enumeration of all of the different scripts which are defined in (ISO/IEC 10646.
   - CODE_KINDS - an enumeration of all of the internationally registered character encoding kinds.
   - CHAR_CODE - the encoding of a character in a single code together with its LIBCHARS component (needed when converting from one code to another).
   - CONTROL_CODES - codes which are specified in ISO 6429 as being formatting or other control codes which may be found in a character stream and the interpreting program may take indicated action in respect of the code found.
   - UNICODE - this class provides various classification functions in respect of ISO/IEC 10646 character codes.
   - UCS4 - this is a 'renaming' of the above class for the canonical four octet encoding model.
   - UCS2 - this is a 'renaming' of the above class for the canonical two octet Basic Multi-Lingual Plane (BMP) encoding model.
   - UTF7 - this is a form of code which permits multiple octet codes to be passed over an eight-bit code channel. To be precise, this is the form of character encoding which a portable operating system interface must provide for all entity (eg files, directories, devices) names which may be used by programs executing under that operating system.
   - CASE_MAPLET - this class implements the notion of case conversion (between upper and lower cases) for those scripts which use more than one 'case'.

     The remaining group of immutable classes correspond to codes written to the binary map files which are available internationally. [The format of these files has not yet been standardised!]

   - MAP_PARTS - . This is an enumeration for a code in binary map files.
   - MAP_MODES - (see above) This is another enumeration specifying the 'compression' mode in which a mapping file section has been written. It corresponds to a code found on binary map files.
   - INFO_KINDS - (see above) This enumeration identifies the header components to be found on binary map files.

3. Reference Classes

   1. MAP_FILE - (see above) This is the map file object class.
   2. MAP_HEADER - (see above) This is the map file header which may contain useful textual information - if such was found on the map file.
   3. CODE_MAPPER - an entity which will carry out single conversions from/to a particular encoding and ISO/IEC 10646 (often referred to as Unicode although there is a technical difference between the two specifications - not involving the code bit-patterns)
   4. CODE_CONVERTER - an entity which can convert from any encoding known in the CODE_KINDS enumeration to any other encoding in that list.

| Language Index |  | Library Index

Comments or enquiries should be made to Keith Hopper . Page last modified: Friday, 10 March 2000. |