OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [itcl/] [tests/] [old/] [toasters/] [SmartToaster.tcl] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# ----------------------------------------------------------------------
2
#  PURPOSE:  Class definition for handling "smart" toasters via
3
#            [incr Tcl].  A "smart" toaster is a toaster that
4
#            automatically cleans itself when the crumb tray is full.
5
#
6
#   AUTHOR:  Michael J. McLennan       Phone: (610)712-2842
7
#            AT&T Bell Laboratories   E-mail: michael.mclennan@att.com
8
#
9
#      RCS:  $Id: SmartToaster.tcl,v 1.1.1.1 2002-01-16 10:24:47 markom Exp $
10
# ----------------------------------------------------------------------
11
#               Copyright (c) 1993  AT&T Bell Laboratories
12
# ======================================================================
13
# Permission to use, copy, modify, and distribute this software and its
14
# documentation for any purpose and without fee is hereby granted,
15
# provided that the above copyright notice appear in all copies and that
16
# both that the copyright notice and warranty disclaimer appear in
17
# supporting documentation, and that the names of AT&T Bell Laboratories
18
# any of their entities not be used in advertising or publicity
19
# pertaining to distribution of the software without specific, written
20
# prior permission.
21
#
22
# AT&T disclaims all warranties with regard to this software, including
23
# all implied warranties of merchantability and fitness.  In no event
24
# shall AT&T be liable for any special, indirect or consequential
25
# damages or any damages whatsoever resulting from loss of use, data or
26
# profits, whether in an action of contract, negligence or other
27
# tortuous action, arising out of or in connection with the use or
28
# performance of this software.
29
# ======================================================================
30
 
31
itcl_class SmartToaster {
32
        inherit Toaster
33
 
34
        method toast {nslices} {
35
                if {$crumbs >= [expr $maxcrumbs-10]} {
36
                        clean
37
                }
38
                return [Toaster::toast $nslices]
39
        }
40
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.