54
43
<!-- constructors -->
60
The <code>Slot</code> constructor creates an empty slot
61
initialized at time 0 with duration 0.
49
The <code>Slot</code> constructor creates an empty slot
50
initialized at time 0 with duration 0.
67
<args>Integer Integer</args>
69
The <code>Slot</code> constructor creates a slot with a time and
70
duration. The first argument is the slot time. The second
71
argument is the slot duration.
56
<args>Integer Integer</args>
58
The <code>Slot</code> constructor creates a slot with a time and
59
duration. The first argument is the slot time. The second
60
argument is the slot duration.
83
The <code>reset</code> method reset the slot to time 0 with
93
The <code>set-time</code> method sets the slot time.
102
The <code>get-time</code> method returns the slot time.
107
<name>set-duration</name>
111
The <code>set-duration</code> method sets the slot duration.
116
<name>get-duration</name>
120
The <code>get-duration</code> method returns the slot duration.
125
<name>set-slot</name>
127
<args>Integer Integer</args>
129
The <code>set-slot</code> method sets the slot time and duration
130
at once. The first argument is the slot time. The second
131
argument is the slot duration.
72
The <code>reset</code> method reset the slot to time 0 with
82
The <code>set-time</code> method sets the slot time.
91
The <code>get-time</code> method returns the slot time.
96
<name>set-duration</name>
100
The <code>set-duration</code> method sets the slot duration.
105
<name>get-duration</name>
109
The <code>get-duration</code> method returns the slot duration.
114
<name>set-slot</name>
116
<args>Integer Integer</args>
118
The <code>set-slot</code> method sets the slot time and duration
119
at once. The first argument is the slot time. The second
120
argument is the slot duration.
163
152
<!-- constructors -->
166
<name>Appointer</name>
169
The <code>Appointer</code> constructor creates a default appointer
170
initialized at time 0. There is no rule installed by the constructor.
155
<name>Appointer</name>
158
The <code>Appointer</code> constructor creates a default appointer
159
initialized at time 0. There is no rule installed by the constructor.
175
<name>Appointer</name>
178
The <code>Appointer</code> constructor creates an appointer with
179
an initial time. The time is set as he starting time to allocate
180
slots. There is no rule installed by the constructor.
164
<name>Appointer</name>
167
The <code>Appointer</code> constructor creates an appointer with
168
an initial time. The time is set as he starting time to allocate
169
slots. There is no rule installed by the constructor.
192
The <code>reset</code> method reset the appointer slot number
193
and daily slot counter. The rules are not touched by this method.
198
<name>set-time</name>
202
The <code>set-time</code> method set the appointer time. During
203
the next operation, the newly allocated slots have their time
204
starting at least at this time.
209
<name>get-time</name>
213
The <code>get-time</code> method returns the current appointer time.
218
<name>set-date</name>
222
The <code>set-date</code> method set the appointer time
223
by converting the date argument to a time.
228
<name>get-date</name>
232
The <code>get-date</code> method returns the current appointer date.
237
<name>get-slot</name>
239
<args>Integer|Integer Integer</args>
241
The <code>get-slot</code> method returns a new slot allocated by
242
the appointer. with one argument the argument is taken as the
243
slot duration. With 2 arguments, the first arguments is the
244
requested slot time and the second argument is the slot
245
duration. The slot allocation algorithm operates by finding the
246
appropriate day and time which satisfies the appointer rules. If
247
the slot cannot be found within one week, the allocation is
248
assumed to have failed.
253
<name>get-slot-number</name>
257
The <code>get-slot-number</code> method returns the total number
258
of slots allocated by the appointer.
263
<name>set-blocked-day</name>
267
The <code>set-blocked-day</code> method sets a regular weekly
268
block day. The method uses the week day index as its
269
argument. Sunday has index 0 and Saturday has index 6. No slot
270
is allocated in a blocked day.
275
<name>set-special-day</name>
277
<args>Integer Integer</args>
279
The <code>set-special-day</code> method sets a special year
280
day. The method uses the year month and the month day index as its
281
arguments. The first argument is the year month which must be in
282
the range of 1 to 12. The second argument is the month day which
283
must be in the range of 1 to 31. No slot is allocated in a
289
<name>set-maximum-slots</name>
293
The <code>set-maximum-slots</code> method sets a daily maximum
294
slots number. When the daily maximum slot number is reached, the
295
slot allocation proceed to the next day.
300
<name>set-valid-block-time</name>
302
<args>Integer Integer</args>
304
The <code>set-valid-block-time</code> method sets a valid block
305
time in which the slot can be allocated. By default, a slot can
306
be allocated anytime during the day. When this rule is set, at
307
least once, the slot is allocated in this block. Multiple valid
308
block time can be defined. The first argument is the valid block
309
time lower bound expressed in seconds from 12PM. The second
310
argument is the valid block time upper bound. All time are
311
expressed in seconds and rounded to a day second which is 84600
312
seconds in 24 hours. For example, a valid block time is from 8AM
313
to 12AM. Another would be from 2PM to 6PM.
181
The <code>reset</code> method reset the appointer slot number
182
and daily slot counter. The rules are not touched by this method.
187
<name>set-time</name>
191
The <code>set-time</code> method set the appointer time. During
192
the next operation, the newly allocated slots have their time
193
starting at least at this time.
198
<name>get-time</name>
202
The <code>get-time</code> method returns the current appointer time.
207
<name>set-date</name>
211
The <code>set-date</code> method set the appointer time
212
by converting the date argument to a time.
217
<name>get-date</name>
221
The <code>get-date</code> method returns the current appointer date.
226
<name>get-slot</name>
228
<args>Integer|Integer Integer</args>
230
The <code>get-slot</code> method returns a new slot allocated by
231
the appointer. with one argument the argument is taken as the
232
slot duration. With 2 arguments, the first arguments is the
233
requested slot time and the second argument is the slot
234
duration. The slot allocation algorithm operates by finding the
235
appropriate day and time which satisfies the appointer rules. If
236
the slot cannot be found within one week, the allocation is
237
assumed to have failed.
242
<name>get-slot-number</name>
246
The <code>get-slot-number</code> method returns the total number
247
of slots allocated by the appointer.
252
<name>set-blocked-day</name>
256
The <code>set-blocked-day</code> method sets a regular weekly
257
block day. The method uses the week day index as its
258
argument. Sunday has index 0 and Saturday has index 6. No slot
259
is allocated in a blocked day.
264
<name>set-special-day</name>
266
<args>Integer Integer</args>
268
The <code>set-special-day</code> method sets a special year
269
day. The method uses the year month and the month day index as its
270
arguments. The first argument is the year month which must be in
271
the range of 1 to 12. The second argument is the month day which
272
must be in the range of 1 to 31. No slot is allocated in a
278
<name>set-maximum-slots</name>
282
The <code>set-maximum-slots</code> method sets a daily maximum
283
slots number. When the daily maximum slot number is reached, the
284
slot allocation proceed to the next day.
289
<name>set-valid-block-time</name>
291
<args>Integer Integer</args>
293
The <code>set-valid-block-time</code> method sets a valid block
294
time in which the slot can be allocated. By default, a slot can
295
be allocated anytime during the day. When this rule is set, at
296
least once, the slot is allocated in this block. Multiple valid
297
block time can be defined. The first argument is the valid block
298
time lower bound expressed in seconds from 12PM. The second
299
argument is the valid block time upper bound. All time are
300
expressed in seconds and rounded to a day second which is 84600
301
seconds in 24 hours. For example, a valid block time is from 8AM
302
to 12AM. Another would be from 2PM to 6PM.
342
331
<!-- constructors -->
345
<name>Assistant</name>
348
The <code>Assistant</code> constructor creates a default assistant.
353
<name>Assistant</name>
356
The <code>Assistant</code> constructor creates a default
362
<name>Assistant</name>
363
<args>String String</args>
365
The <code>Assistant</code> constructor creates a default
366
assistant by name and information. The first argument is the
367
assistant name. the second argument is the assistant information
334
<name>Assistant</name>
337
The <code>Assistant</code> constructor creates a default assistant.
342
<name>Assistant</name>
345
The <code>Assistant</code> constructor creates a default
351
<name>Assistant</name>
352
<args>String String</args>
354
The <code>Assistant</code> constructor creates a default
355
assistant by name and information. The first argument is the
356
assistant name. the second argument is the assistant information
380
The <code>reset</code> method reset the assistant by. All
381
objects attached to the assistant are reset by this method.
386
<name>get-name</name>
390
The <code>get-name</code> method returns the assistant name.
395
<name>get-info</name>
399
The <code>get-info</code> method returns the assistant
405
<name>pushback</name>
409
The <code>pushback</code> method pushbaks a slot in the
410
appointer list. The assistant manages internally an index which
411
is used to select the appointer where the slot is pushed-back.
416
<name>get-slot</name>
418
<args>Integer|Integer Integer</args>
420
The <code>get-slot</code> method returns he next available slot
421
from the appointer list. The assistant manages internally an
422
index which is used to select the appointer from which the slot
423
is obtained. With one argument, the method operates with a slot
424
duration. with 2 arguments, the method operates by time and
425
duration. The time is the minimum time for which the slot is
426
allocated. If the slot cannot be allocated, an exception is
432
<name>add-appointer</name>
434
<args>Appointer</args>
436
The <code>add-appointer</code> method adds an appointer object
442
<name>get-appointer</name>
443
<retn>Appointer</retn>
446
The <code>get-appointer</code> method returns an appointer object
447
by index. If the appointer object cannot be found, an exception
453
<name>length-appointer</name>
457
The <code>length-appointer</code> method returns the number of
458
appointers attached to the assistant.
463
<name>get-slot-number</name>
467
The <code>get-slot-number</code> method returns the total number
468
of slot allocated by the assistant at the time of the call. The
469
number is computed by summing all slot numbers for each appointers.
470
attached to the assistant.
475
<name>get-appointer-time</name>
479
The <code>get-appointer-time</code> method returns the average
480
appointer time for the attached appointers. At the time of the
481
call, each appointer has a time which corresponds to the next
482
slot available time. The average time for all appointers is the
483
result of this method which corresponds to the average time of
484
the next available slot.
369
The <code>reset</code> method reset the assistant by. All
370
objects attached to the assistant are reset by this method.
375
<name>get-name</name>
379
The <code>get-name</code> method returns the assistant name.
384
<name>get-info</name>
388
The <code>get-info</code> method returns the assistant
394
<name>pushback</name>
398
The <code>pushback</code> method pushbaks a slot in the
399
appointer list. The assistant manages internally an index which
400
is used to select the appointer where the slot is pushed-back.
405
<name>get-slot</name>
407
<args>Integer|Integer Integer</args>
409
The <code>get-slot</code> method returns he next available slot
410
from the appointer list. The assistant manages internally an
411
index which is used to select the appointer from which the slot
412
is obtained. With one argument, the method operates with a slot
413
duration. with 2 arguments, the method operates by time and
414
duration. The time is the minimum time for which the slot is
415
allocated. If the slot cannot be allocated, an exception is
421
<name>add-appointer</name>
423
<args>Appointer</args>
425
The <code>add-appointer</code> method adds an appointer object
431
<name>get-appointer</name>
432
<retn>Appointer</retn>
435
The <code>get-appointer</code> method returns an appointer object
436
by index. If the appointer object cannot be found, an exception
442
<name>length-appointer</name>
446
The <code>length-appointer</code> method returns the number of
447
appointers attached to the assistant.
452
<name>get-slot-number</name>
456
The <code>get-slot-number</code> method returns the total number
457
of slot allocated by the assistant at the time of the call. The
458
number is computed by summing all slot numbers for each appointers.
459
attached to the assistant.
464
<name>get-appointer-time</name>
468
The <code>get-appointer-time</code> method returns the average
469
appointer time for the attached appointers. At the time of the
470
call, each appointer has a time which corresponds to the next
471
slot available time. The average time for all appointers is the
472
result of this method which corresponds to the average time of
473
the next available slot.