mapping.sa


Generated by gen_html_sa_files from ICSI. Contact gomes@icsi.berkeley.edu for details
 
------------------------->  GNU Sather - sourcefile  <-------------------------
-- Copyright (C) 2000 by K Hopper, University of Waikato, New Zealand        --
-- This file is part of the GNU Sather library. It is free software; you may --
-- redistribute  and/or modify it under the terms of the GNU Library General --
-- Public  License (LGPL)  as published  by the  Free  Software  Foundation; --
-- either version 2 of the license, or (at your option) any later version.   --
-- This  library  is distributed  in the  hope that it will  be  useful, but --
-- WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See Doc/LGPL for more details.       --
-- The license text is also available from:  Free Software Foundation, Inc., --
-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                     --
-------------->  Please email comments to <bug-sather@gnu.org>  <--------------


abstract class $CODE_MAPPER < $BINARY

abstract class $CODE_MAPPER < $BINARY is -- This abstract class models a code mapper which uses data obtained -- from a file in order to carry out code conversions. -- Version 1.1 Apr 2001. Copyright K Hopper, U of Waikato -- Development History -- ------------------- -- Date Who By Detail -- ---- ------ ------ -- 30 Oct 98 kh Original after a Perl script -- 26 Apr 01 kh Added kind reader for self-consistency. kind : CODE_KINDS ; create( kind : CODE_KINDS ) : SAME ; -- This routine returns an empty mapper object for the code kind -- indicated - which may not be void. create( kind : CODE_KINDS, path : FILE_PATH ) : SAME ; -- This routine creates a new mapper from the contents of the indicated -- file. Path may not be void. from_unicode( ch_code : CHAR_CODE ) : CHAR_CODE ; -- This routine is designed to convert the single code given as a -- unicode code into the encoding used in this mapping table if such a value -- exists. to_unicode( ch_code : CHAR_CODE ) : CHAR_CODE ; -- This routine is designed to convert the single code given into its -- encoded value as a unicode. end ; -- $CODE_MAPPER

abstract class $CODE_CONVERTER

abstract class $CODE_CONVERTER is -- This abstract class models an abstraction which provides code -- conversion services to and from any registered character encoding. -- Version 1.1 Apr 99. Copyright K Hopper, U of Waikato -- Development History -- ------------------- -- Date Who By Detail -- ---- ------ ------ -- 03 Nov 98 kh Original for new library -- 7 Apr 99 kh Revision for V8 of text classes. rune( from : LIBCHARS, val : CHAR ) : RUNE ; -- This routine returns the rune encoding (Unicode) given the value -- character in the indicated encoding. runes( val : STR ) : RUNES ; -- This routine returns the rune (Unicode code value) string which -- corresponds to val which is indicated to be of the given code kind. char( to : CODE_KINDS, val : RUNE ) : CHAR ; -- This routine returns the character encoding in the specified code -- kind given the rune val. It is an error if the given rune contains -- combining codes. If no such code exists then void is returned. str( to : LIBCHARS, val : RUNES ) : STR ; -- This routine returns the character string of the given code kind -- which corresponds to the val argument. If one or more elements cannot -- be mapped then void is returned. code( to : LIBCHARS, val : RUNE ) : CHAR_CODE ; -- This routine returns the character code string of the given code kind -- which corresponds to the val argument. If one or more elements cannot -- be mapped then void is returned. codes( to : LIBCHARS, val : RUNES ) : CODE_STR ; -- This routine returns the character code string of the given code kind -- which corresponds to the val argument. If one or more elements cannot -- be mapped then void is returned. end ; -- $CODE_CONVERTER