1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
# tie___TEMPLATE__.tcl --
#
# Tie arrays to persistence engines.
# Replace __TEMPLATE__ with correct name of package.
#
# Copyright (c) ??? FILL IN !!
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: tie_template.txt,v 1.3 2005/09/28 04:51:24 andreas_kupries Exp $
# ### ### ### ######### ######### #########
## Requisites
package require snit
package require tie
# ### ### ### ######### ######### #########
## Implementation
snit::type __TEMPLATE__ {
# ### ### ### ######### ######### #########
## Specials
pragma -hastypemethods no
pragma -hasinfo no
pragma -simpledispatch yes
# ### ### ### ######### ######### #########
## API : Construction & Destruction
constructor {args} {
# Set up data source
return
}
destructor {
# Release resources
return
}
# ### ### ### ######### ######### #########
## API : Data source methods
method get {} {
# Retrieve data source contents and return them
return {}
}
method set {dict} {
# Merge data to data source contents
return {}
}
method unset {{pattern *}} {
# Unset data source elements by glob pattern
return {}
}
method names {} {
# Return list of keys in data source.
return {}
}
method size {} {
# Return number of keys in data source.
return 0
}
method getv {index} {
# Return value at key
return {}
}
method setv {index value} {
# Set key to new value
return
}
method unsetv {index} {
# Unset a key
return
}
# ### ### ### ######### ######### #########
## Internal : Instance data
# ### ### ### ######### ######### #########
## Internal: ...
# ### ### ### ######### ######### #########
}
# ### ### ### ######### ######### #########
## Ready to go
::tie::register __TEMPLATE__ as __TEMPLATE__/shortform
package provide __TEMPLATE__ 1.0
|