## property-list.api
# Compiled by:
#
src/lib/std/standard.lib# Property lists using Stephen Weeks's implementation.
api Property_List {
Property_List;
make_property_list: Void -> Property_List;
has_properties: Property_List -> Bool;
# return TRUE if the holder has any properties.
clear_property_list: Property_List -> Void;
# remove all properties and flags from the holder
same_property_list: ((Property_List, Property_List)) -> Bool;
# returns TRUE, if two holders are the same
# make_property (get_property_list, make_initial_value)
# creates a new property for values of type and X returns
# functions to get the property, set it, and clear it. The function
# get_property_list is used to fetch the property list field from a
# parent record/whatever and make_initial_value is used to create the initial property value.
# Typically, properties are reference cells, so that they can
# be modified. The difference between peek_fn and get_fn is that
# peek_fn returns NULL when the property has not yet been created,
# whereas get_fn will allot and initialize the property. The
# set_fn function can either be used to initialize an undefined property
# or to override a property's current value.
make_property: (((X -> Property_List), (X -> Y))) -> {
peek_fn: X -> Null_Or(Y),
get_fn: X -> Y,
set_fn: ((X, Y)) -> Void,
clear_fn: X -> Void
};
make_boolean_property: (X -> Property_List) -> {
get_fn: X -> Bool,
set_fn: ((X, Bool)) -> Void
};
};
## COPYRIGHT (c) 1999 Bell Labs, Lucent Technologies.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.