abs_fstrings.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 $FSTRINGS < $STRINGS
abstract class $FSTRINGS < $STRINGS is
-- This abstraction models the concept of a mutable (ie 'fast') string
-- of any kind of element.
-- Version 1.2 Nov 2000. Copyright K Hopper,U of Waikato
-- Development History
-- -------------------
-- Date Who By Detail
-- ---- ------ ------
-- 21 Aug 97 kh Original
-- 8 Apr 99 kh Revised for Version 8 of text classes
-- 28 Nov 00 kh Simplified inheritance.
octets : CARD ;
-- This routine returns the number of storage units in the string.
loc : CARD ;
loc(
nuval : CARD
) ;
-- These are the reader and writer routines for the location where the
-- next insertion (add or push) is to take place.
end ; -- $FSTRINGS
abstract class $FSTRING{ETP} < $FSTRINGS, $FLISTS{ETP}
abstract class $FSTRING{ETP} < $FSTRINGS, $FLISTS{ETP} is
-- This abstraction models the concept of a mutable (ie 'fast') string
-- of the specified kind of element.
-- Version 1.1 Nov 2000. Copyright K Hopper,U of Waikato
-- Development History
-- -------------------
-- Date Who By Detail
-- ---- ------ ------
-- 20 Apr 99 kh Original for Version 8 of text classes
-- 28 Nov 00 kh Simplified inheritance
end ; -- $FSTRING{ETP}
abstract class $FSTRING{ETP < $IS_EQ, STP < $STRING{ETP},
abstract class $FSTRING{ETP < $IS_EQ, STP < $STRING{ETP},
FSTP < $FSTRING{ETP}} < $FSTRING{ETP}, $BINARY is
-- This abstract class specifies those features of fast strings which
-- are to be provided by all fast string classes.
-- Version 1.2 Apr 99. Copyright K Hopper, U of Waikato
-- Development History
-- -------------------
-- Date Who By Detail
-- ---- ------ ------
-- 10 Jan 97 kh Original developed from FSTR
-- 22 Dec 97 kh Include 'filability'
-- 8 Apr 99 kh Revised for Version 8 of text classes
acopy(
str : STP
) ;
-- This is a bit-pattern copy of str into self.
acopy(
fstr : FSTP
) ;
-- This is a bit-pattern copy of the 'fast' string fstr into self.
acopyn(
str : STP,
cnt : CARD
) ;
-- This is a bit-pattern copy of cnt elements from str into self.
acopyn(
fstr : FSTP,
cnt : CARD
) ;
-- This is a bit-pattern copy of cnt elements from the 'fast' string
-- fstr into self.
acopy(
beg : CARD,
src : STP
) ;
-- This routine copies from src to self beginning at the element beg.
acopy(
beg : CARD,
src : FSTP
) ;
-- This routine copies elements from the 'fast' string fsrc to self
-- beginning at the element beg.
plus(
fstr : FSTP
) : SAME ;
-- This routine appends the string fstr to self and then returns self.
plus(
str : STP
) : SAME ;
-- This routine appends the string fstr to self and returns it.
plus(
elem : ETP
) : SAME ;
-- This routine appends the element elem to self and returns self.
end ; -- $FSTRING{ETP, STP, FSTP}
abstract class $FTEXT_STRING{ETP < $IS_EQ} < $FSTRING{ETP}
abstract class $FTEXT_STRING{ETP < $IS_EQ} < $FSTRING{ETP} is
-- This abstract class characterises all forms of string whether binary,
-- text or other. The implementations of this class shall provide immutable
-- semantics!
-- Version 1.1 Nov 2000. Copyright K Hopper, U of Waikato
-- Development History
-- -------------------
-- Date Who By Detail
-- ---- ------ ------
-- 20 Apr 99 kh Modified for Version 8 of text classes.
-- 28 Nov 00 kh Changed inheritance to $FSTRING{ETP}
index_lib : LIBCHARS ;
-- This feature provides a reference to culturally and environmentally
-- dependent characters, codings, routines.
end ; -- $FTEXT_STRING{ETP}
abstract class $FTEXT_STRING{ETP, STP < $TEXT_STRING{ETP},
abstract class $FTEXT_STRING{ETP, STP < $TEXT_STRING{ETP},
FSTP < $FTEXT_STRING{ETP}} < $FTEXT_STRING{ETP} is
-- This abstract class specifies those features of fast strings which
-- are to be provided by text fast string classes.
-- Version 1.1 Nov 2000. Copyright K Hopper, U of Waikato
-- Development History
-- -------------------
-- Date Who By Detail
-- ---- ------ ------
-- 8 Apr 99 kh Original for Version 8 of text classes
-- 28 Nov 00 kh Tidying inheritance
build(
cursor : BIN_CURSOR,
lib : LIBCHARS
) : SAME ;
-- This routine builds the string from the binary string indicated using
-- the encoding and repertoire defined by lib. If there is not an exact
-- number of character codes in the string then void is returned and the
-- cursor has not been moved.
build(
cursor : BIN_CURSOR
) : SAME ;
-- This feature replaces the one inherited from $BINARY since it needs
-- to be specified in terms of the default cultural encoding and repertoire
-- which cannot be referred to in the $BINARY abstraction.
strip : SAME ;
-- This routine 'strips' any number of contiguous line_marks from the
-- end of self -- if present.
plus(
fstr : FSTP
) : SAME ;
-- This routine appends the string fstr to self and then returns self.
plus(
str : STP
) : SAME ;
-- This routine appends the string fstr to self and returns it.
plus(
elem : ETP
) : SAME ;
-- This routine appends the element elem to self and returns self.
elt!(
once start : CARD
) : ETP ;
-- This iter yields the elements of self in order beginning with the
-- character at the given starting index.
elt!(
once start,
once num : CARD
) : ETP ;
-- This iter yields num elements of the string in sequence, starting with
-- the one indexed by start.
code! : CHAR_CODE ;
-- This iter yields each individual character encoding in self
-- in sequence.
code!(
once start_code : CARD
) : CHAR_CODE ;
-- This iter yields each individual character encoding in self
-- in sequence.
end ; -- $FTEXT_STRING{ETP}