| 1 | # tie_log.tcl -- |
|---|
| 2 | # |
|---|
| 3 | # Data source: /dev/null. Just log changes. |
|---|
| 4 | # |
|---|
| 5 | # Copyright (c) 2004 Andreas Kupries <andreas_kupries@users.sourceforge.net> |
|---|
| 6 | # |
|---|
| 7 | # See the file "license.terms" for information on usage and redistribution |
|---|
| 8 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
|---|
| 9 | # |
|---|
| 10 | # RCS: @(#) $Id: tie_log.tcl,v 1.3 2005/09/28 04:51:24 andreas_kupries Exp $ |
|---|
| 11 | |
|---|
| 12 | # ### ### ### ######### ######### ######### |
|---|
| 13 | ## Requisites |
|---|
| 14 | |
|---|
| 15 | package require snit |
|---|
| 16 | package require log |
|---|
| 17 | package require tie |
|---|
| 18 | |
|---|
| 19 | # ### ### ### ######### ######### ######### |
|---|
| 20 | ## Implementation |
|---|
| 21 | |
|---|
| 22 | package require snit |
|---|
| 23 | snit::type ::tie::std::log { |
|---|
| 24 | |
|---|
| 25 | # ### ### ### ######### ######### ######### |
|---|
| 26 | ## Specials |
|---|
| 27 | |
|---|
| 28 | pragma -hastypemethods no |
|---|
| 29 | pragma -hasinfo no |
|---|
| 30 | pragma -simpledispatch yes |
|---|
| 31 | |
|---|
| 32 | # ### ### ### ######### ######### ######### |
|---|
| 33 | ## API : Construction & Destruction |
|---|
| 34 | |
|---|
| 35 | constructor {} { |
|---|
| 36 | ::log::log debug "$self construction" |
|---|
| 37 | return |
|---|
| 38 | } |
|---|
| 39 | |
|---|
| 40 | destructor { |
|---|
| 41 | ::log::log debug "$self destruction" |
|---|
| 42 | return |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| 45 | # ### ### ### ######### ######### ######### |
|---|
| 46 | ## API : Data source methods |
|---|
| 47 | |
|---|
| 48 | method get {} { |
|---|
| 49 | ::log::log debug "$self get (nothing)" |
|---|
| 50 | return {} |
|---|
| 51 | } |
|---|
| 52 | |
|---|
| 53 | method set {dict} { |
|---|
| 54 | ::log::log debug "$self set [list $dict]" |
|---|
| 55 | return |
|---|
| 56 | } |
|---|
| 57 | |
|---|
| 58 | method unset {{pattern *}} { |
|---|
| 59 | ::log::log debug "$self unset $pattern" |
|---|
| 60 | return |
|---|
| 61 | } |
|---|
| 62 | |
|---|
| 63 | method names {} { |
|---|
| 64 | ::log::log debug "$self names (nothing)" |
|---|
| 65 | return {} |
|---|
| 66 | } |
|---|
| 67 | |
|---|
| 68 | method size {} { |
|---|
| 69 | ::log::log debug "$self size (0)" |
|---|
| 70 | return 0 |
|---|
| 71 | } |
|---|
| 72 | |
|---|
| 73 | method getv {index} { |
|---|
| 74 | ::log::log debug "$self get ($index)" |
|---|
| 75 | return {} |
|---|
| 76 | } |
|---|
| 77 | |
|---|
| 78 | method setv {index value} { |
|---|
| 79 | ::log::log debug "$self set ($index) = \[$value\]" |
|---|
| 80 | return |
|---|
| 81 | } |
|---|
| 82 | |
|---|
| 83 | method unsetv {index} { |
|---|
| 84 | ::log::log debug "$self unset ($index)" |
|---|
| 85 | return |
|---|
| 86 | } |
|---|
| 87 | |
|---|
| 88 | # ### ### ### ######### ######### ######### |
|---|
| 89 | } |
|---|
| 90 | |
|---|
| 91 | # ### ### ### ######### ######### ######### |
|---|
| 92 | ## Ready to go |
|---|
| 93 | |
|---|
| 94 | ::tie::register ::tie::std::log as log |
|---|
| 95 | package provide tie::std::log 1.0 |
|---|