1tcl::chan::core(n)     Reflected/virtual channel support    tcl::chan::core(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       tcl::chan::core - Basic reflected/virtual channel support
9

SYNOPSIS

11       package require Tcl  8.5
12
13       package require TclOO
14
15       package require tcl::chan::core  ?1?
16
17       ::tcl::chan::core objectName
18
19       objectName initialize thechannel mode
20
21       objectName finalize thechannel
22
23       objectName destroy
24
25______________________________________________________________________________
26

DESCRIPTION

28       The  tcl::chan::core package provides a TclOO class implementing common
29       behaviour needed by virtually every reflected or virtual channel  (ini‐
30       tialization, finalization).
31
32       This  class expects to be used as either superclass of a concrete chan‐
33       nel class, or to be mixed into such a class.
34

CLASS API

36       ::tcl::chan::core objectName
37              This command creates a new channel core object with  an  associ‐
38              ated  global  Tcl command whose name is objectName. This command
39              may be used to invoke  various  operations  on  the  object,  as
40              described in the section for the Instance API.
41

INSTANCE API

43       The  API of channel core instances provides only two methods, both cor‐
44       responding to channel handler  commands  (For  reference  see  TIP  219
45       [http:/tip.tcl.tk/219]). They expect to be called from whichever object
46       instance the channel core was made a part of.
47
48       objectName initialize thechannel mode
49              This method implements standard  behaviour  for  the  initialize
50              method  of  channel  handlers.  Using introspection it finds the
51              handler methods supported by the instance  and  returns  a  list
52              containing their names, as expected by the support for reflected
53              channels in the Tcl core.
54
55              It further remembers the channel handle in an instance  variable
56              for access by sub-classes.
57
58       objectName finalize thechannel
59              This  method  implements  standard  behaviour  for  the finalize
60              method of channel handlers. It simply destroys itself.
61
62       objectName destroy
63              Destroying the channel core instance closes the channel  it  was
64              initialized  for, see the method initialize. When destroyed from
65              within a call of  finalize  this  does  not  happen,  under  the
66              assumption that the channel is being destroyed by Tcl.
67

BUGS, IDEAS, FEEDBACK

69       This  document,  and the package it describes, will undoubtedly contain
70       bugs and other problems.  Please report such in the category  virtchan‐
71       nel  of  the  Tcllib  Trackers  [http://core.tcl.tk/tcllib/reportlist].
72       Please also report any ideas for enhancements you may have  for  either
73       package and/or documentation.
74
75       When proposing code changes, please provide unified diffs, i.e the out‐
76       put of diff -u.
77
78       Note further that  attachments  are  strongly  preferred  over  inlined
79       patches.  Attachments  can  be  made  by  going to the Edit form of the
80       ticket immediately after its creation, and  then  using  the  left-most
81       button in the secondary navigation bar.
82

KEYWORDS

84       reflected channel, tip 219, virtual channel
85

CATEGORY

87       Channels
88
90       Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
91
92
93
94
95tcllib                                 1                    tcl::chan::core(n)
Impressum