Pipal Classes
EnumerateOverlay: EnumerateProc ~ {
overlay: Pipal.Overlay ← NARROW [object];
FOR i:
NAT
IN [0..overlay.size)
DO
IF each[transformation, overlay[i]] THEN RETURN[TRUE];
ENDLOOP;
};
EnumerateIcon: EnumerateProc ~ {
icon: Pipal.Icon ← NARROW [object];
quit ← each[transformation, icon.reference];
};
EnumerateAnnotation: EnumerateProc ~ {
annotation: Pipal.Annotation ← NARROW [object];
quit ← each[transformation, annotation.child];
};
SizeAnnotation: SizeProc = {
size ← BBoxAnnotation[object, []].size;
};
BBoxAnnotation: BBoxProc = {
annotation: Pipal.Annotation ← NARROW [object];
bbox ← BBox[annotation.child, transformation];
IF annotation.key=abutBoxProp
THEN bbox ← BoundingBox[
bbox,
TransformRectangle[transformation, (NARROW [annotation.value, REF Rectangle]^)]
];
};
AbutBoxAnnotation: AbutBoxProc = {
annotation: Pipal.Annotation ← NARROW [object];
abutBox ←
IF annotation.key=abutBoxProp
THEN (NARROW [annotation.value, REF Rectangle]^)
ELSE AbutBox[annotation.child];
};
Pipal Classes
Pipal.PutClassMethod[Pipal.overlayClass, enumerateMethod, NEW [EnumerateProc ← EnumerateOverlay]];
Pipal.PutClassMethod[Pipal.overlayClass, sizeMethod, NEW [SizeProc ← CachedSizeFromEnumerate]];
Pipal.PutClassMethod[Pipal.overlayClass, bboxMethod, NEW [BBoxProc ← CachedBBoxFromEnumerate]];
Pipal.PutClassMethod[Pipal.overlayClass, abutBoxMethod, NEW [AbutBoxProc ← CachedAbutBoxFromEnumerate]];
Pipal.PutClassMethod[Pipal.overlayClass, Pipal.hashMethod, NEW [Pipal.HashProc ← CachedHashByEnumeration]];
Pipal.PutClassMethod[Pipal.overlayClass, Pipal.equalMethod,
NEW [Pipal.EqualProc ← EqualByEnumeration]];
Pipal.PutClassMethod[Pipal.iconClass, enumerateMethod, NEW [EnumerateProc ← EnumerateIcon]];
Pipal.PutClassMethod[Pipal.iconClass, Pipal.hashMethod, NEW [Pipal.HashProc ← HashByEnumeration]];
Pipal.PutClassMethod[Pipal.iconClass, Pipal.equalMethod,
NEW [Pipal.EqualProc ← EqualByEnumeration]];
Pipal.PutClassMethod[Pipal.annotationClass, enumerateMethod, NEW [EnumerateProc ← EnumerateAnnotation]];
Pipal.PutClassMethod[Pipal.annotationClass, sizeMethod, NEW [SizeProc ← SizeAnnotation]];
Pipal.PutClassMethod[Pipal.annotationClass, bboxMethod, NEW [BBoxProc ← BBoxAnnotation]];
Pipal.PutClassMethod[Pipal.annotationClass, abutBoxMethod, NEW [AbutBoxProc ← AbutBoxAnnotation]];
Classes defined in this interface
Pipal.PutClassMethod[transformClass, enumerateMethod, NEW [EnumerateProc ← EnumerateTransform]];
Pipal.PutClassMethod[transformClass, Pipal.describeMethod, NEW [Pipal.DescribeProc ← DescribeTransform]];
Pipal.PutClassMethod[transformClass, Pipal.hashMethod, NEW [Pipal.HashProc ← HashByEnumeration]];
Pipal.PutClassMethod[transformClass, Pipal.equalMethod, NEW [Pipal.EqualProc ← EqualByEnumeration]];
Pipal.PutClassMethod[translationClass, enumerateMethod, NEW [EnumerateProc ← EnumerateTranslation]];
Pipal.PutClassMethod[translationClass, Pipal.describeMethod, NEW [Pipal.DescribeProc ← DescribeTranslation]];
Pipal.PutClassMethod[translationClass, Pipal.hashMethod, NEW [Pipal.HashProc ← HashByEnumeration]];
Pipal.PutClassMethod[translationClass, Pipal.equalMethod, NEW [Pipal.EqualProc ← EqualByEnumeration]];
Pipal.PutClassMethod[orientClass, enumerateMethod, NEW [EnumerateProc ← EnumerateOrient]];
Pipal.PutClassMethod[orientClass, Pipal.describeMethod, NEW [Pipal.DescribeProc ← DescribeOrient]];
Pipal.PutClassMethod[orientClass, Pipal.hashMethod, NEW [Pipal.HashProc ← HashByEnumeration]];
Pipal.PutClassMethod[orientClass, Pipal.equalMethod, NEW [Pipal.EqualProc ← EqualByEnumeration]];
Pipal.PutClassMethod[abutClass, enumerateMethod, NEW [EnumerateProc ← EnumerateAbut]];
Pipal.PutClassMethod[abutClass, Pipal.describeMethod, NEW [Pipal.DescribeProc ← DescribeAbut]];
Pipal.PutClassMethod[abutClass, Pipal.hashMethod, NEW [Pipal.HashProc ← CachedHashByEnumeration]];
Pipal.PutClassMethod[abutClass, Pipal.equalMethod, NEW [Pipal.EqualProc ← EqualByEnumeration]];
Pipal.PutClassMethod[abutClass, sizeMethod, NEW [SizeProc ← CachedSizeFromEnumerate]];
Pipal.PutClassMethod[abutClass, bboxMethod, NEW [BBoxProc ← CachedBBoxFromEnumerate]];
Pipal.PutClassMethod[abutClass, abutBoxMethod, NEW [AbutBoxProc ← CachedAbutBoxFromEnumerate]];