gendescr.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 $ANCHORED_FMT < $FMT
abstract class $ANCHORED_FMT < $FMT is
-- This abstract class models a value which requires an anchored format
-- text representation.
-- Version 1.1 Mar 99. Copyright K Hopper, U of Waikato
-- Development History
-- -------------------
-- Date Who By Detail
-- ---- ------ ------
-- 11 Feb 99 kh Original after FMT/DESCR confusion
-- 29 Mar 99 kh Revised for V8 of text classes
fmt(
descr : ANCHORED_DESCR,
lib : LIBCHARS
) : STR ;
-- This routine formats those representations which require simple
-- layout only, using the given repertoire and encoding.
fmt(
descr : ANCHORED_DESCR
) : STR ;
-- This routine formats those representations which require simple
-- layout only, using a default repertoire and encoding.
end ; -- $ANCHORED_FMT
abstract class $ANCHORED_DESCR < $VAL_DESCR
abstract class $ANCHORED_DESCR < $VAL_DESCR is
-- This abstract class models the concept of a format which has an
-- anchored position around which a value will be placed when rendering.
-- Version 1.0 Sep 98. Copyright K Hopper, U of Waikato
-- Development History
-- -------------------
-- Date Who By Detail
-- ---- ------ ------
-- 7 Sep 98 kh Original after Modula-2 library.
filler : CHAR_CODE ;
leading : CARD ;
trailing : CARD ;
width : CARD ;
end ; -- $ANCHORED_DESCR
class ANCHORED_DESCR < $ANCHORED_DESCR
class ANCHORED_DESCR < $ANCHORED_DESCR is
-- This class implements an anchored format description for use when
-- rendering a value to text.
-- Version 1.0 Sep 98. Copyright K Hopper, U of Waikato
-- Development History
-- -------------------
-- Date Who By Detail
-- ---- ------ ------
-- 7 Sep 98 kh Original after Modula-2 library.
readonly attr filler : CHAR_CODE ;
readonly attr leading : CARD ;
readonly attr trailing : CARD ;
readonly attr width : CARD ;
create(
fill : CHAR_CODE,
lead,
trail : CARD
) : SAME is
-- This is the single routine in this class. It returns a newly created
-- object for use when carrying out anchored formatting.
me : SAME := new ;
me.filler := fill ;
me.leading := lead ;
me.trailing := trail ;
me.width := lead + trail ;
return me
end ;
end ; -- ANCHORED_DESCR