1 ## \file tclexample.tcl
8 ## Documented namespace \c ns .
9 # The code is inserted here:
12 ## Documented proc \c ns_proc .
13 # param[in] arg some argument
15 ## Documented var \c ns_var .
18 ## Documented itcl class \c itcl_class .
19 itcl::class itcl_class {
21 constructor {args} {eval $args}
24 ## Documented itcl method \c itcl_method_x .
25 # param[in] arg Argument
26 private method itcl_method_x {arg}
27 ## Documented itcl method \c itcl_method_y .
28 # param[in] arg Argument
29 protected method itcl_method_y {arg} {}
30 ## Documented itcl method \c itcl_method_z .
31 # param[in] arg Argument
32 public method itcl_method_z {arg} {}
33 ## Documented common itcl var \c itcl_Var .
37 variable itcl_var1;#< Documented itcl var \c itcl_var1 .
38 variable itcl_var2;#< Documented itcl var \c itcl_var2 .
40 ## Documented oo class \c oo_class .
41 oo::class create oo_class {
44 constructor {args} {eval $args}
48 ## Documented oo var \c oo_var .
49 # Defined inside class
51 ## \private Documented oo method \c oo_method_x .
52 # param[in] arg Argument
53 method oo_method_x {arg} {}
54 ## \protected Documented oo method \c oo_method_y .
55 # param[in] arg Argument
56 method oo_method_y {arg} {}
57 ## \public Documented oo method \c oo_method_z .
58 # param[in] arg Argument
59 method oo_method_z {arg} {}
64 itcl::body ::ns::itcl_class::itcl_method_x {argx} {
68 oo::define ns::oo_class {
69 ## \public Outside defined variable \c oo_var_out .
74 ## Documented global proc \c glob_proc .
75 # param[in] arg Argument
76 proc glob_proc {arg} {puts $arg}
78 variable glob_var;#< Documented global var \c glob_var\