Logtalk 2.25.1 files.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1357 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura
2005-08-08 12:13:45 +00:00
parent ab97812ec7
commit 80c28e1507
219 changed files with 1380 additions and 1008 deletions

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.25.0
Release 2.25.1
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
=================================================================
@@ -12,7 +12,7 @@ This folder contains examples of public, protected, and private inheritance,
for both prototype-based and class-based hierarchies.
This example defines a category named "predicates" which specifies three
predicates, one public, one protected and one private. This category is
predicates, one public, one protected, and one private. This category is
imported by the root objects: "parent" for the prototype hierarchy and
"root" for the class hierarchy. Each root object have a set of three
descendants, each one using one of the inheritance types.
@@ -36,4 +36,4 @@ The two object hierarchies are organized as follows:
instance3
A second category named "interface", imported by all objects except the
sub-class instances, allows us to query the objercts about their interfaces.
sub-class instances, allows us to query the objects about their interfaces.

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.25.0
Release 2.25.1
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,22 +1,27 @@
/*
This category defines a predicate, interface/0, that prints an object
interface, i.e. predicate names and the corresponding scope properties.
We need to encapsulate the interface/0 predicate in a category instead
of just defining it in a root object in order to be able to list private
object predicates.
*/
:- category(interface).
:- public(interface/0).
:- mode(interface, one).
interface :-
forall(
(::current_predicate(Functor/Arity),
functor(Pred, Functor, Arity)),
(::predicate_property(Pred, Prop), scope_property(Prop),
(::predicate_property(Pred, Prop),
scope_property(Prop), % we are only interested on scope properties
writeq(Functor/Arity), write(' - '), writeq(Prop), nl)).
scope_property(public).
scope_property(protected).
scope_property(private).
:- end_category.

View File

@@ -3,19 +3,5 @@
logtalk_load([
predicates,
interface,
parent,
prototype1,
prototype2,
prototype3,
descendant1,
descendant2,
descendant3,
root,
subclass1,
subclass2,
subclass3,
instance1,
instance2,
instance3])).
prototypes,
classes])).

View File

@@ -1,7 +1,11 @@
/*
This category defines a set of predicates, which are imported by the
roots of both the class-based and the prototype-based hierarchies of
this example
*/
:- category(predicates).
:- public(public/0).
:- mode(public, one).
@@ -11,15 +15,13 @@
:- private(private/0).
:- mode(private, one).
public :-
write('Public predicate declared and defined in category predicates.'), nl.
write('Public predicate declared and defined in category "predicates".'), nl.
protected :-
write('Protected predicate declared and defined in category predicates.'), nl.
write('Protected predicate declared and defined in category "predicates".'), nl.
private :-
write('Private predicate declared and defined in category predicates.'), nl.
write('Private predicate declared and defined in category "predicates".'), nl.
:- end_category.