| |
| /pliant/language/type/set/common.pli |
| |
| 1 |
# Copyright Hubert Tonneau hubert.tonneau@pliant.cx | |
| 2 |
# | |
| 3 |
# This program is free software; you can redistribute it and/or | |
| 4 |
# modify it under the terms of the GNU General Public License version 2 | |
| 5 |
# as published by the Free Software Foundation. | |
| 6 |
# | |
| 7 |
# This program is distributed in the hope that it will be useful, | |
| 8 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 9 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 10 |
# GNU General Public License for more details. | |
| 11 |
# | |
| 12 |
# You should have received a copy of the GNU General Public License | |
| 13 |
# version 2 along with this program; if not, write to the Free Software | |
| 14 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
| 15 |
| |
| 16 |
module "/pliant/install/ring1.pli" | |
| 17 |
| |
| 18 |
| |
| 19 |
public | |
| 20 |
gvar Relation 'pliant set types' | |
| 21 |
| |
| 22 |
method t category -> id | |
| 23 |
arg Type t ; arg Str id | |
| 24 |
has_no_side_effect | |
| 25 |
var Pointer:Str p :> ('pliant set types' query addressof:t addressof:t) map Str | |
| 26 |
if addressof:p<>null | |
| 27 |
id := p | |
| 28 |
else | |
| 29 |
id := "" | |
| 30 |
| |
| 31 |
method t key_type -> kt | |
| 32 |
arg Type t ; arg_C Type kt | |
| 33 |
has_no_side_effect | |
| 34 |
kt :> ('pliant set types' query addressof:t null) map Type | |
| 35 |
if addressof:kt=null | |
| 36 |
kt :> Void | |
| 37 |
| |
| 38 |
method t value_type -> dt | |
| 39 |
arg Type t ; arg_C Type dt | |
| 40 |
has_no_side_effect | |
| 41 |
dt :> ('pliant set types' query null addressof:t) map Type | |
| 42 |
if addressof:dt=null | |
| 43 |
dt :> Void | |
| 44 |
| |
| 45 |
export '. category' '. key_type' '. value_type' | |
| 46 |
| |
| |