Logtalk 2.26.2 files.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1487 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura
2005-12-24 18:07:41 +00:00
parent 9f1b358c04
commit 3455276aa2
55 changed files with 6535 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
:- object(forms).
:- info([
version is 1.0,
date is 2005/5/8,
author is 'Example by LPA; adapted to Logtalk by Paulo Moura.',
comment is 'General attributes & methods for all forms.']).
:- public(print/0).
:- info(print/0, [
comment is 'Print the complete timetable from the pupil viewpoint.']).
print :-
nl, write('FORM TIMETABLE...'), nl, nl,
forall(extends_object(Form, form), Form::print), nl.
:- end_object.
:- object(form).
:- info([
version is 1.0,
date is 2005/5/8,
author is 'Example by LPA; adapted to Logtalk by Paulo Moura.',
comment is 'General attributes & methods for all forms.']).
:- public(print/0).
:- info(print/0, [
comment is 'Print the complete timetable from the pupil viewpoint.']).
:- public(print_period/1).
:- info(print_period/1, [
comment is 'Print the pupil timetable for a specific period.',
argnames is ['Period']]).
print :-
self(Self),
write('FORM: '), write(Self), nl,
forall(extends_object(Period, period), Period::print_form(Self)), nl.
print_period(Period) :-
self(Self),
timetable::filled_entry(Self, Period, Teacher, Subject),
!,
write(Self), write(': '),
write(Teacher), write(' teaches '),
write(Subject), nl.
print_period(_) :-
self(Self),
write(Self), write(': '), nl.
:- end_object.
:- object(first_year,
extends(form)).
:- end_object.
:- object(second_year,
extends(form)).
:- end_object.
:- object(third_year,
extends(form)).
:- end_object.
:- object(fourth_year,
extends(form)).
:- end_object.