Association of properties to definitions
This module specifies a set of useful generic PDL patterns.
If such patterns are associated to a property specification
PDL generates additional access functions for that property.
For example the PDL property specification
Size: int [SetGet, SetDiff];
allows to set the
Size property using the functions
SetDiffSize besides the basic
access functions provided by PDL.
The module does not have generic parameters.
It is used by writing
It provides the following PDL patterns:
SetGet functions have same effect as the basic
function. But the value which is set is also returned as result of the call.
SetOnce functions have one value argument like the
functions. The given value is only set if that property is not yet set.
The current value of the property is returned as result of the call.
KReset functions have same effect as the basic
Reset functions. But the key is returned as result of the call.
By that means one can set several properties for one key
using nested calls.
VReset functions have same effect as the basic
But the value which is set is also returned as result of the call.
Trans functions are applicable for
properties of type
They have only a key argument.
TransProp(k) for a property
is recursively applied to the property value
until a key is reached for which the property
is not set. that key is returned.
The property chain must not be cyclic.
GetTypeOf (a, NoKey) == b and
GetTypeOf (b, NoKey) == c
GetTypeOf (c, NoKey) == NoKey, then
TransTypeOf (a) == c.
have two value arguments, like the
The first value argument is set if the property is not yet set.
If the property has a value that differs from the first value argument,
the property is set to the second value argument.
The module also provides comparison functions
CoordLessEqual for source coordinates.