Include Paulo Moura's Logtalk OO LP system
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@53 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
22
Logtalk/examples/inheritance/interface.lgt
Normal file
22
Logtalk/examples/inheritance/interface.lgt
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
:- category(interface).
|
||||
|
||||
|
||||
:- public(interface/0).
|
||||
:- mode(interface, one).
|
||||
|
||||
|
||||
interface :-
|
||||
forall(
|
||||
(::current_predicate(Functor/Arity),
|
||||
functor(Pred, Functor, Arity)),
|
||||
(::predicate_property(Pred, Prop), scope(Prop),
|
||||
writeq(Functor/Arity), write(' - '), writeq(Prop), nl)).
|
||||
|
||||
|
||||
scope(public).
|
||||
scope(protected).
|
||||
scope(private).
|
||||
|
||||
|
||||
:- end_category.
|
Reference in New Issue
Block a user