root/tags/lgt2311/library/proto_hierarchyp.lgt

Revision 2665, 0.9 KB (checked in by pmoura, 3 years ago)

Improved library hierarchy metohds that return lists of objects in order to avoid duplicated elements (library objects "proto_hierarchy.lgt" and "class_hierarchy.lgt"). Added new methods extension/1 and extensions/1 to the library object "proto_hierarchy.lgt".

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1
2:- protocol(proto_hierarchyp,
3    extends(hierarchyp)).
4
5    :- info([
6        version is 1.1,
7        author is 'Paulo Moura',
8        date is 2006/2/20,
9        comment is 'Prototype hierarchy protocol.']).
10
11    :- public(parent/1).
12    :- mode(parent(?object), zero_or_more).
13    :- info(parent/1, [
14        comment is 'Returns, by backtracking, all object parents.',
15        argnames is ['Parent']]).
16
17    :- public(parents/1).
18    :- mode(parents(-list), one).
19    :- info(parents/1, [
20        comment is 'List of all object parents.',
21        argnames is ['Parents']]).
22
23    :- public(extension/1).
24    :- mode(extension(?object), zero_or_more).
25    :- info(extension/1, [
26        comment is 'Returns, by backtracking, all object direct descendants.',
27        argnames is ['Extension']]).
28
29    :- public(extensions/1).
30    :- mode(extensions(-list), one).
31    :- info(extensions/1, [
32        comment is 'List of all object direct descendants.',
33        argnames is ['Extensions']]).
34
35:- end_protocol.
Note: See TracBrowser for help on using the browser.