Index: ChangeLog
===================================================================
diff -u -r46f02e4868e118466d888b35d6b281b3f2ba31ac -r4dd2595d98574faaac87f5dd33b542516fdff5df
--- ChangeLog (.../ChangeLog) (revision 46f02e4868e118466d888b35d6b281b3f2ba31ac)
+++ ChangeLog (.../ChangeLog) (revision 4dd2595d98574faaac87f5dd33b542516fdff5df)
@@ -1,4 +1,78 @@
-2007-09-00:
Examples:
- Serializer all -ignoreVarsRE {^::o1::.*text.*$|^::o2::x$}
- Serializer all - ignore obj1 obj2 ... Examples:
+
+
-
- Examples:
- Serializer deepSerialize ::a::b::c -map {::a::b ::x::y}
-
- Serializer deepSerialize ::a::b::c -map {::a::b [self]}
-
- Serializer deepSerialize ::a::b::c -map {::a::b::c ${var}}
+
+ Examples:
+
+
+
+
+
+
+ Examples:
+
+
+
+
+
+ Example:
+
Package/File Information
- Package provided: xotcl::store::jufgdbm 0.81
+ No package provided/required
- Package required: xotcl::store::juf_gdbm
- Package required: xotcl::store
-
-
Filename:
./library/store/JufGdbmStorage.xotcl
Index: doc/MemStorage-xotcl.html
===================================================================
diff -u -rc72f9f638677608fab1502cd696c8f2d6b2952f9 -r4dd2595d98574faaac87f5dd33b542516fdff5df
--- doc/MemStorage-xotcl.html (.../MemStorage-xotcl.html) (revision c72f9f638677608fab1502cd696c8f2d6b2952f9)
+++ doc/MemStorage-xotcl.html (.../MemStorage-xotcl.html) (revision 4dd2595d98574faaac87f5dd33b542516fdff5df)
@@ -3,6 +3,7 @@
Package/File Information
- Package provided: xotcl::store::mem 0.84
+ No package provided/required
- Package required: xotcl::store 0.84
-
Filename:
./library/store/MemStorage.xotcl
Index: doc/MultiStorage-xotcl.html
===================================================================
diff -u -rc72f9f638677608fab1502cd696c8f2d6b2952f9 -r4dd2595d98574faaac87f5dd33b542516fdff5df
--- doc/MultiStorage-xotcl.html (.../MultiStorage-xotcl.html) (revision c72f9f638677608fab1502cd696c8f2d6b2952f9)
+++ doc/MultiStorage-xotcl.html (.../MultiStorage-xotcl.html) (revision 4dd2595d98574faaac87f5dd33b542516fdff5df)
@@ -3,6 +3,7 @@
Package/File Information
- Package provided: xotcl::store::multi 0.9
+ No package provided/required
- Package required: xotcl::store 0.84
-
Filename:
./library/store/MultiStorage.xotcl
Index: doc/Persistence-xotcl.html
===================================================================
diff -u -rc72f9f638677608fab1502cd696c8f2d6b2952f9 -r4dd2595d98574faaac87f5dd33b542516fdff5df
--- doc/Persistence-xotcl.html (.../Persistence-xotcl.html) (revision c72f9f638677608fab1502cd696c8f2d6b2952f9)
+++ doc/Persistence-xotcl.html (.../Persistence-xotcl.html) (revision 4dd2595d98574faaac87f5dd33b542516fdff5df)
@@ -3,6 +3,7 @@
Package/File Information
- Package provided: xotcl::store::persistence 0.8
+ No package provided/required
- Package required: xotcl::trace
- Package required: xotcl::package
-
- Package required: xotcl::mixinStrategy
-
- Package required: xotcl::store
-
-
Defined Objects/Classes:
- Persistent store for XOTcl objects with Eager and Lazy persistence.
- Take a look at "persistenceExample.xotcl" for exmaple of usage.
-
+ Persistent store for XOTcl objects with Eager and Lazy persistence.
+ Take a look at "persistenceExample.xotcl" for exmaple of usage.
+
@@ -92,18 +85,18 @@
- A persistent store requires a persistent manager. The persistent
- manager implements the Storage interface via storage mixin. With
- the parameter "dbPackage" we can specify which storage will be used.
- The persistent manager than tries to load the package
- "xotcl::${dbPackage}Storage". Default is Sdbm.
+ A persistent store requires a persistent manager. The persistent
+ manager implements the Storage interface via storage mixin. With
+ the parameter "dbPackage" we can specify which storage will be used.
+ The persistent manager than tries to load the package
+ "xotcl::${dbPackage}Storage". Default is Sdbm.
- Example:
-
@@ -125,13 +118,13 @@
- PersistenceMgr pmgr -persistenceDir . -persistenceFile example-db
-
+ Example:
+
+ PersistenceMgr pmgr -persistenceDir . -persistenceFile example-db
+
-
+
- Superclass or mixin class for all persistent objects. Normally
- subclasses are used as mixins or instmixins on object, like:
-
@@ -159,13 +152,13 @@
- o mixin Persistent=Eager
- p mixin Persistent=Lazy
-
-
+ Superclass or mixin class for all persistent objects. Normally
+ subclasses are used as mixins or instmixins on object, like:
+
+ o mixin Persistent=Eager
+ p mixin Persistent=Lazy
+
+
- Specify which persistence manager to use for [self] object, like:
-
@@ -183,8 +176,8 @@
- o persistenceMgr pmgr
-
- Each persistent object must have a persistence manager specified,
- before vars can be made persistent.
-
+ Specify which persistence manager to use for [self] object, like:
+
+ o persistenceMgr pmgr
+
+ Each persistent object must have a persistence manager specified,
+ before vars can be made persistent.
+
- Returns list of persistent vars.
-
+ Returns list of persistent vars.
+
@@ -211,14 +204,14 @@
- Make a list of object variables persistent. If a persistent
- DB exists, the values are read from this DB, overwriting the current value.
- E.g.:
-
@@ -245,10 +238,10 @@
- o persistent {x y}
-
+ Make a list of object variables persistent. If a persistent
+ DB exists, the values are read from this DB, overwriting the current value.
+ E.g.:
+
+ o persistent {x y}
+
-
+
- Initialize all data in the list as empty strings,
- if they do not exist yet, and then make them persistent
- using the 'persistent' method
-
+ Initialize all data in the list as empty strings,
+ if they do not exist yet, and then make them persistent
+ using the 'persistent' method
+
@@ -275,8 +268,8 @@
- Make a list of object variables not persistent.
-
+ Make a list of object variables not persistent.
+
@@ -294,8 +287,8 @@
- Build a Tcl script of "set ..." statements reflecting the current situation in the database.
-
+ Build a Tcl script of "set ..." statements reflecting the current situation in the database.
+
@@ -319,8 +312,8 @@
- Eager persistence strategy. Store everything at the same moment to the database
-
+ Eager persistence strategy. Store everything at the same moment to the database
+
@@ -342,8 +335,8 @@
- Lazy persistence strategy. Store everything on object destroy (or program termination.
-
+ Lazy persistence strategy. Store everything on object destroy (or program termination).
+
Index: doc/Script-xotcl.html
===================================================================
diff -u -rc72f9f638677608fab1502cd696c8f2d6b2952f9 -r4dd2595d98574faaac87f5dd33b542516fdff5df
--- doc/Script-xotcl.html (.../Script-xotcl.html) (revision c72f9f638677608fab1502cd696c8f2d6b2952f9)
+++ doc/Script-xotcl.html (.../Script-xotcl.html) (revision 4dd2595d98574faaac87f5dd33b542516fdff5df)
@@ -3,6 +3,7 @@
Package/File Information
- Package provided: xotcl::script 0.9
+ No package provided/required
Defined Objects/Classes:
@@ -39,9 +40,9 @@
- A small package to instantiate an object, that
- represents a script.
-
+ A small package to instantiate an object, that
+ represents a script.
+
@@ -63,14 +64,14 @@
- An object of type Script becomes automatically the command
- line arguments evaluated as "-" method calls during creation, e.g.
-
Index: doc/Serializer-xotcl.html
===================================================================
diff -u -rc72f9f638677608fab1502cd696c8f2d6b2952f9 -r4dd2595d98574faaac87f5dd33b542516fdff5df
--- doc/Serializer-xotcl.html (.../Serializer-xotcl.html) (revision c72f9f638677608fab1502cd696c8f2d6b2952f9)
+++ doc/Serializer-xotcl.html (.../Serializer-xotcl.html) (revision 4dd2595d98574faaac87f5dd33b542516fdff5df)
@@ -3,6 +3,7 @@
- Script s -set r 5
-
- and a call with cmd-line "-set v 6" of the script, results in an
- object s with two vars set: r to 5, and v to 6.
-
+ An object of type Script becomes automatically the command
+ line arguments evaluated as "-" method calls during creation, e.g.
+
+ Script s -set r 5
+
+ and a call with cmd-line "-set v 6" of the script, results in an
+ object s with two vars set: r to 5, and v to 6.
+
Package/File Information
- Package required: XOTcl 1.0
+ No package provided/required
- Package provided: xotcl::serializer 0.4
-
Defined Objects/Classes:
@@ -53,7 +52,7 @@
- Gustaf Neumann, Gustaf.Neumann@wu-wien.ac.at
+ Gustaf Neumann, Gustaf.Neumann@wu-wien.ac.at
@@ -62,7 +61,7 @@
Date:
- $Date: 2004/07/02 11:22:31 $
+ $Date: 2007/10/05 09:06:00 $
@@ -74,7 +73,7 @@
Class: Serializer
Procs/Instprocs:
- all, deepSerialize, serialize.
+ all, deepSerialize, exportMethods, methodSerialize, serialize.
Instprocs
@@ -101,8 +100,8 @@
- Serialize the specified object or class.
-
+ Serialize the specified object or class.
+
@@ -111,7 +110,7 @@
@@ -150,18 +149,18 @@
Object or Class with all currently defined methods,
- variables, invariants, filters and mixins
+ variables, invariants, filters and mixins
- Serialize all objects and classes that are currently
- defined (except the specified omissions and the current
- Serializer object).
-
- Serializer all -ignoreVarsRE {::b$}
- do not serialize any instance variable named b (of any object)
- do not serialize any variable of c1 whose name contains
- the string "text" and do not serialze the variable x of o2
- do not serizalze the specified objects
-
+ Serialize all objects and classes that are currently
+ defined (except the specified omissions and the current
+ Serializer object).
+
+ Serializer all -ignoreVarsRE {::b$}
+ Do not serialize any instance variable named b (of any object).Serializer all -ignoreVarsRE {^::o1::.*text.*$|^::o2::x$}
+ Do not serialize any variable of c1 whose name contains
+ the string "text" and do not serialze the variable x of o2.Serializer all -ignore obj1 obj2 ...
+ do not serizalze the specified objects
+
@@ -223,30 +222,30 @@
- Serialize object with all child objects (deep operation)
- except the specified omissions. For the description of
- ignore and igonoreVarsRE see
- Serizalizer all. map can be used
- in addition to provide pairs of old-string and new-string
- (like in the tcl command string map). This option
- can be used to regenerate the serialized object under a different
- object or under an different name, or to translate relative
- object names in the serialized code.
- Serialize the object c which is a child of a::b;
- the object will be reinitialized as object ::x::y::c,
- all references ::a::b will be replaced by ::x::y.
- The serizalized object can be reinstantiated under some current object,
- under which the script is evaluated.
- The serizalized object will be reinstantiated under a name specified
- by the variable var in the recreation context.
-
+ Serialize object with all child objects (deep operation)
+ except the specified omissions. For the description of
+ ignore and igonoreVarsRE see
+ Serizalizer all. map can be used
+ in addition to provide pairs of old-string and new-string
+ (like in the tcl command string map). This option
+ can be used to regenerate the serialized object under a different
+ object or under an different name, or to translate relative
+ object names in the serialized code.Serializer deepSerialize ::a::b::c -map {::a::b ::x::y}
+ Serialize the object c which is a child of a::b;
+ the object will be reinitialized as object ::x::y::c,
+ all references ::a::b will be replaced by ::x::y.Serializer deepSerialize ::a::b::c -map {::a::b [self]}
+ The serizalized object can be reinstantiated under some current object,
+ under which the script is evaluated.Serializer deepSerialize ::a::b::c -map {::a::b::c ${var}}
+ The serizalized object will be reinstantiated under a name specified
+ by the variable var in the recreation context.
+
@@ -259,6 +258,113 @@
+
+
+
+
+
+ Arguments:
+
+
+ object: object or class
+
+
+
+
+
+
+
+ method: name of method
+
+
+
+
+
+
+
+
+ prefix: either empty or 'inst' (latter for instprocs)
+
+
+
+
+ Description:
+
+
+
+ Serialize the specified method. In order to serialize
+ an instproc, prefix should be 'inst'; to serialze
+ procs, it should be empty.
+ Serializer methodSerialize Serializer deepSerialize ""
+ This command serializes the proc deepSerialize
+ of the Class Serializer.Serializer methodSerialize Serializer serialize inst
+ This command serializes the instproc serialize
+ of the Class Serializer.
+
+
+ Return:
+
+
+ Script, which can be used to recreate the specified method
+
+
+
+
+
+
+
+ Arguments:
+
+
+ list: list of methods of the form 'object proc|instproc methodname'
+
+
+
+
+ Description:
+
+
+
+ This method can be used to specify methods that should be
+ exported in every Serializer all. The rationale
+ behind this is that the serializer does not serialize objects
+ from the ::xotcl:: namespace, which is used for XOTcl internals
+ and volatile objects. It is however often useful to define
+ methods on ::xotcl::Class or ::xotcl::Objects, which should
+ be exported. One can export procs, instprocs, forward and instforward
+ Serializer exportMethods {
+ ::xotcl::Object instproc __split_arguments
+ ::xotcl::Object instproc __make_doc
+ ::xotcl::Object instproc ad_proc
+ ::xotcl::Class instproc ad_instproc
+ ::xotcl::Object forward expr
+ }
+
+
- self computes callstack related information. + XOTcl contains the following predefined primitives (Tcl commands): +
- my someMethod is a short form for [self] someMethod and can only be +
+- next executes the "next" method on the precedence - order and return with the result. -
+ next+
+
+
+
+ + + +
+ Description: + | +
+
+ A slot is a meta-object that manages property-changes of
+ objects. A property is either an attribute or a role of an
+ relation (e.g. in system slots).
+ The predefined system slots are class,
+ superclass, mixin, instmixin,
+ filter, instfilter. These slots appear
+ as methods of Object or Class.
+
+ The slots provide a common query and setting interface. + Every multivalued slot provides e.g. a method add + to add a value to the list of values, and a method delete + which removes it. See for example the documentation of the slot + mixin. + + Parameters:+
For more details, consult the + tutorial. + + |
+
+ + + +
+ Description: + | +
+
+ Attribute slots are used to manage the setting and querying
+ of instance variables.
+
+ Parameters: +
Example of a class definition with three attribute slots: ++ Class Person -slots { + Attribute name + Attribute salary -default 0 + Attribute projects -default {} -multivalued true + } + Person p1 -name "John Doe" ++ + The slot parameters default, initcmd and + valuecmd have to be used mutually exclusively. + For more details, consult the + tutorial. + + + |
+
@@ -137,7 +314,7 @@
Heritage: Object
Procs/Instprocs:
- __unknown, alloc, create, info, instdestroy, instfilter, instfilterappend, instfilterguard, instinvar, instmixin, instmixinappend, instparametercmd, instproc, insttclcmd, new, parameter, parameterclass, recreate, superclass, unknown, volatile.
+ __unknown, allinstances, alloc, create, info, instdestroy, instfilter, instfilterguard, instforward, instinvar, instmixin, instparametercmd, instproc, new, parameter, parameterclass, recreate, superclass, unknown.
@@ -174,7 +351,7 @@ | - ?args?: arguments passed to the new class after creation + ?args?: arguments passed during creation | - Allocate memory for a new XOTcl object or class. create uses - alloc to allocate memory. But create also - calls init and evaluates '-' arguments as method calls. - In seldom cases the programmer may want to suppress the - create - mechanism and just allocate memory. Then alloc can - be used. + Allocate (create) an uninitialized object or class. Typically, alloc + is called automatically by create + to allocate an uninitialized object or class. + In contrast to alloc, create also + initializes and configures the object. + The method alloc can be used by a programmer who may want to + create uninitialized objects/classes. | @@ -199,12 +376,39 @@ Return:- new class name + fully qualified name of created instance |
+ Description: + | ++ + Compute all immediate and indirect instances of a class + + | +
+ Return: + | ++ fully qualified list of instances + | +
In the default XOTcl definition, the create method + is called implicitly by the unknown method of the metaclass + Class, when a class (meta-class) is called with an unknown + method. E.g. the following two commands are equivalent - Finally the constructor init is called on the object - with all arguments up to the first '-' arg.
+
+ Car herby -color red + Car create herby -color red- The create method is called implicitly through the - unknown - mechanism when a class (meta-class) is called with an unknown - method. E.g. the following two commands are equivalent - -
Car herby -color red - Car create herby -color red- When a users may want to call the constructor init before other '-' methods, one can specify '-init' explicitly in the left to right order of the '-' method. Init is called always only once. - e.g.:
Class Car -init -superclass Vehicle+ e.g.: + +
Class Car -init -superclass Vehicle+ + See also: recreate @@ -271,7 +481,7 @@ Return:
Arguments: | - filterList: list of methods that should be registered as filters + ?args?: instfilter specification | - Specifies the list of filters registered for the class. - instfilter overwrites all previous setting. - Filters must be available on the class or its heritage - order. Filters may also reside on the meta-class of the class. - - Filter list may contain filter guards. Then the - filter is composed of two list elements: {filtername filterguard}. + If $args is one argument, it specifies a list of + instfilters to + be set. Every filter must be an XOTcl proc/instproc within + the object scope. + If $args it has more argument, the first one specifies the + action. Possible values are assign, get, + add or delete, it modifies the current + settings as indicated. For more details, check the + tutorial. | @@ -480,34 +708,45 @@ Return:- empty string + if $args return empty current instfilters, otherwise empty |
Arguments: | - filterList: name of the new instfilter + filterName: filter name of a registered filter |
+ + | ++ guard: set of conditions to execute the filter + | +
Description: | - Convenience method that appends an instfilter to the existing filters of the class. + Add conditions to guard a filter registration point. The filter + is only executed, if the guards are true. Otherwise we ignore the + filter. If no guards are given, we always execute the filter. |
Arguments: | - filtername: filter name of a registered filter + methodName: name of forwarder method |
- guard: set of conditions to execute the filter + ?options?: -objscope, -methodprefix string, -default names, -earlybinding, -verbose | |
+ + | ++ ?callee?: named of the called command or object + | +
+ + | ++ ?args?: arguments + | +
Description: |
- Add conditions to guard a filter registration point. The filter
- is only executed, if the guards are true. Otherwise we ignore the
- filter. If no guards are given, we always execute the filter.
-
+ Register a method for the instances of a class (similar to an instproc)
+ for forwarding calls to a callee (target Tcl command,
+ other object).
+ When the forwarder method is called, the actual arguments
+ of the invocation are appended to the specified arguments. In callee an
+ arguments certain substitutions can take place:
+
|
Return: | - empty string + empty |
Arguments: | - instmixinList: list of classes that should be registered as instmixins + ?args?: instmixin specification | - Specifies the list of instmixins (per-class mixins) for the class. - Note that the registration of a per-mixin-class does not invoke - automatically the constructors of the registered class. - The method instmixin overwrites any previous settings. + If $args is one argument, it specifies a list of instmixins to + be set. Every instmixin must be a defined class. + If $args has more argument, the first one specifies the + action. Possible values are assign, get, + add or delete, it modifies the current + settings as indicated. For more details, check the + tutorial. | @@ -640,48 +938,12 @@ Return:- empty string + if $args empty return current instmixins, otherwise empty |
- Arguments: - | -- mixinList: name of the new instmixin - | -
- Description: - | -- - Convenience method that appends an instmixin to the existing mixins of the class. - - | -
- Return: - | -- empty string - | -
+ Class C + C instparametercmd x + C c1 -x 100 + puts [c1 x]@@ -730,6 +993,7 @@ instproc name + ?non-pos-args? args body ?preAssertion? @@ -748,6 +1012,14 @@
- Arguments: - | -- name: cmd to be execute in obj scope - | -
- Description: - | -- - Create a method 'name' that is evaluated as a tcl command in the - scope of the object. E.g. 'Object insttclcmd vwait' creates - an instproc vwait on Object that executes Tcl's vwait in the - scope of the object. That is local vars of the object are accessible - to that vwait. (Used to circumvent, for instance, the TCL_GLOBAL_ONLY - flag of vwait in Tcl.) - - | -
- Return: - | -- empty string - | -
Http new+
+ HTTP newcreates ::xotcl::__#0, a subsequent call creates ::xotcl::__#1, ...
+@@ -962,26 +1196,20 @@ Set the parameter class. The parameter class specifies how parameters are stored and maintained internally. Per default, a method "default" is called, - to set the parameter with a default value. - - I.e., -Class Car -parameter {{doors 4} color} - Car herby -doors 2 -color green -+ Car herby -doors 2 -color green
+ to set the parameter with a default value. I.e., +is a short form for -Class Car -parameter { {doors 4} - } -+ }
+For specialized parameter classes other methods can be called, e.g.Class Car -parameter { {doors -default 4} - } -+ }
- {doors -default 3 -updateWidget car} -+
{doors -default 3 -updateWidget car}@@ -1026,11 +1254,27 @@
The method recreate does not need to call alloc + but calls instead cleanup + to reset to the object (or class) to its initial state (e.g. remove variables, child objects, + for classes remove instaces, etc.). Then it performs the standard initialization + for the object or class. + +
If recreate is overloaded and the default recreate method is called via next, + the pre-part + (before next) contains its old state of the object, + while during the part after next the + object is cleaned up. +
To ease recreation of classes, see ::xotcl::configure softrecreate. + + See also: create
+ ClassName create ClassName ?args?-
ClassName create ClassName ?args?- Unknown can be overloaded in user-defined subclasses of class. @@ -1126,45 +1372,6 @@
- Arguments: - | -- : - | -
- Description: - | -- - This method is used to specify that the object - should be deleted automatically, when the current - tcl-proc/object-proc/instproc is left. Example - set x [Object new -volatile] - - | -
- Return: - | -- empty string - | -
+ This method is called on mixin/instmixin definition calls,
+ istype, ismixin, class, superclass and parameterclass
@@ -1222,7 +1432,7 @@
Class: Class
Procs/Instprocs:
- abstract, append, array, autoname, check, class, cleanup, configure, copy, destroy, eval, exists, extractConfigureArg, filter, filterappend, filterguard, filtersearch, getExitHandler, hasclass, incr, info, instvar, invar, isclass, ismetaclass, ismixin, isobject, istype, lappend, mixin, mixinappend, move, noinit, parametercmd, proc, procsearch, requireNamespace, set, setExitHandler, trace, unset, uplevel, upvar, vwait.
+ abstract, append, array, autoname, check, class, cleanup, configure, contains, copy, destroy, eval, exists, extractConfigureArg, filter, filterguard, filtersearch, forward, getExitHandler, hasclass, incr, info, init, instvar, invar, isclass, ismetaclass, ismixin, isobject, istype, lappend, mixin, move, noinit, parametercmd, proc, procsearch, requireNamespace, set, setExitHandler, subst, trace, unset, uplevel, upvar, volatile, vwait.
@@ -1244,7 +1454,7 @@
abstract
methtype
- methname
+ methodName
arglist
| Resets an object or class into an initial state, as after construction. - Called during recreation process by the method 'recreate' + Called during recreation process by the method recreate. |
- Calls the '-' methods. I.e. evaluates arguments and calls
- everything starting with '-' (and not having a digit a
- second char) as a method. Every list element until the next '-'
- is interpreted as a method argument. configure is called
- before the constructor during initialization and recreation.
- E.g. Object o -set x 4- here: - o configure -set x 4- is executed. + Calls the '-' (dash) methods. This method evaluates its argument list + and calls everything starting with '-' (followed by an alpha character) + as a method. Every list element until the next '-' is interpreted as an + argument of the called method. XOTcl supports argument lists with a variable + number of arguments. If an argument of a method called this way starts + with a "-", the call can be placed safely + into a list (e.g. "Class c [list -strangearg -a-] -simplearg 2") to avoid + the interpretation of "a-" as a method. + The method configure is called automatically by + the default create and recreate methods after + the default values are set. ++ In the following example, the variable set is called via + configure before init: + Object o -set x 4+ The method configure can be called with the + dash-notation at arbitrary times: + o configure -set x 4+ + |
+
+ ||||
+ Return: + | ++ number of the skipped first arguments + | +
+ Arguments: + | ++ ?-withnew?: Option to overload new to create new objects within + the specified object. Per default, this option is turned on. + | +||||||||||||||||||||||||||||
+ + | ++ ?-object?: object, in which the new objects should be created. + The default is the object, for which contains>/tt> was called. + | +||||||||||||||||||||||||||||
+ + | ++ ?-class?: In combination with option -object: If the specified + object does not exist, create it from the specified class. The default + is ::xotcl::Object + | +||||||||||||||||||||||||||||
+ + | ++ cmd: Tcl command to create multiple objects + | +||||||||||||||||||||||||||||
+ Description: + | +
+
+ This method can be used to create nested object structures
+ with little syntactic overhead. The method changes the namespace
+ to the specified object and creates objects there.
+ Optionally, a different object scope can be specified and
+ creating new objects in the specified scope can be turned off.
+ The following command creates a three rectangles, containing some
+ points.
++ Class Point -parameter {{x 100} {y 300}} + Class Rectangle -parameter {color} + + Rectangle r0 -color pink -contains { + Rectangle r1 -color red -contains { + Point x1 -x 1 -y 2 + Point x2 -x 1 -y 2 + } + Rectangle r2 -color green -contains { + Point x1 + Point x2 + } + } ++ The resulting object structure looks like in the folloing + example (simplified). + + ::r0 + ::r0::r1 + ::r0::r1::x1 + ::r0::r1::x2 + ::r0::r2 + ::r0::r2::x1 + ::r0::r2::x2 + |
- name: Name of the Configure Argument to be extracted (should start with '-') + name: Name of the configure argument to be extracted (should start with '-') | |||||||||||||||||||||||||||
Arguments: | - filterList: list of methods that should be registered as filters + ?args?: filter specification | - Specifies the list of filters registered for the class. - filter overwrites all previous setting. - Filters must be available on the class or its heritage - order. Filters may also reside on the meta-class of the class. - - Filter list may contain filter guards. Then the - filter is composed of two list elements: {filtername filterguard}. + If $args is one argument, it specifies a list of filters to + be set. Every filter must be an XOTcl proc/instproc within + the object scope. + If $args it has more argument, the first one specifies the + action. Possible values are assign, get, + add or delete, it modifies the current + settings as indicated. For more details, check the + tutorial. | @@ -1866,34 +2184,45 @@ Return:- empty string + if $args return empty current filters, otherwise empty |
Arguments: | - filterList: name of the new filter + filterName: filter name of a registered filter |
+ + | ++ guard: set of conditions to execute the filter + | +
Description: | - Convenience method that appends a filter to the existing filters of the object. + Add conditions to guard a filter registration point. The filter + is only executed, if the guards are true. Otherwise we ignore the + filter. If no guards are given, we always execute the filter. | - empty string + an empty string |
Arguments: | - filtername: filter name of a registered filter + methodName: filter method name |
- - | -- guard: set of conditions to execute the filter - | -
Description: | - Add conditions to guard a filter registration point. The filter - is only executed, if the guards are true. Otherwise we ignore the - filter. If no guards are given, we always execute the filter. + Search a full qualified method name that + is currently registered as a filter. Return a list of the + proc qualifier format: + 'objName|className proc|instproc methodName'. | - an empty string + full qualified name, if filter is found, otherwise an empty string |
Arguments: | - methodName: filter method name + methodName: name of forwarder method |
+ + | ++ ?options?: -objscope, -methodprefix string, -default names, -earlybinding, -verbose + | +
+ + | ++ ?callee?: named of the called command or object + | +
+ + | ++ ?args?: arguments + | +
Description: |
- Search a full qualified method name that
- is currently registered as a filter. Return a list of the
- proc qualifier format:
- 'objName|classname proc|instproc methodName'.
-
+ Register an object specific method (similar to a proc) for forwarding calls to
+ a callee (target Tcl command, other object).
+ When the forwarder method is called, the actual arguments
+ of the invocation are appended to the specified arguments. In callee an
+ arguments certain substitutions can take place:
+
|
Return: | - full qualified name, if filter is found, otherwise an empty string + empty |
+ Arguments: + | ++ args: argument list + | +
+ Description: + | ++ + The method init is called automatically by the default + create method on initialized + objects (the default variables are set, the configure + methods are already performed). This method is solely a user hook for + applications to perform class specific initialzation after object creation. + + | +
- kitchen proc enter {name} { - my instvar persons - set persons($name) [clock seconds] - } -+
+ kitchen proc enter {name} { + my instvar persons + set persons($name) [clock seconds] + }Now persons can be accessed as a local variable of the method.
Arguments: | - mixinList: list of classes that should be registered as mixins + ?args?: mixin specification | - Specifies the list of mixins registered for the object. - The method mixin overwrites all previous settings. + If $args is one argument, it specifies a list of mixins to + be set. Every mixin must be a defined class. + If $args has more argument, the first one specifies the + action. Possible values are assign, get, + add or delete, it modifies the current + settings as indicated. For more details, check the + tutorial. | @@ -2555,48 +2994,12 @@ Return:- empty string + if $args empty return current mixins, otherwise empty |
- Arguments: - | -- mixinList: name of the new mixin - | -
- Description: - | -- - Convenience method that appends a mixin to the existing mixins of the object. - - | -
- Return: - | -- empty string - | -
+ Object o + o parametercmd x + o x 100 + puts [o x]@@ -2691,10 +3097,11 @@ flag that constructor (method init) should not be called. - Example:
+ Class C + C instproc init {} {puts hu} + C c1 -noinitThe object c1 will be created without calling the constructor. This can be used to draw a snapshot of an existing object (using the serializer) and to recreate @@ -2718,6 +3125,7 @@ proc name + ?non-pos-args? args body ?preAssertion? @@ -2736,6 +3144,14 @@
Arguments: | - procname: simple proc name + procName: simple proc name |
- Search for a proc or instproc on an object and return the fully
+ Search which method should be invoked for an object and return the fully
qualified name of the method as a list in
proc qualifier format:
- 'objName|classname proc|instproc methodName'. E.g.,
- o procsearch set- returns ::xotcl::Object instproc set. + 'objName|className proc|instproc|forward|instforward|parametercmd|instparametercmd|cmd|instcmd methodName'. + The proc qualifier format reports the command used to create the method. The + only exception is instcmd and cmd, which refer to commands implemented in C. + E.g., + o procsearch set+ returns ::xotcl::Object instcmd set. |
@@ -2857,7 +3279,7 @@
e.g. huge numbers of objects are created.
requireNamespace is often needed when e.g. using Tk widgets
when variables are to be referenced via the namespace
- (with ... -variable [self]::varname ...).
+ (with ... -variable [self]::varName ...).
@@ -2876,15 +3298,15 @@
set
- varname
+ varName
?value?
Arguments: | - varname: name of the instance variable + varName: name of the instance variable |
+ Arguments: + | ++ options: ?-nobackslashes? ?-nocommands? ?-novariables? + | +
+ + | ++ string: string to be substituted + | +
+ Description: + | ++ + Perform backslash, command, and variable substitutions + in the scope of the given object + (see documentation of Tcl command with the same name for details). + + | +
+ Return: + | ++ substituted string + | +
+ ?-nocomplain?: possible error messages are suppressed + | + +|
+ + | +v1: Variable to unset |
When this method is used without the optional level, it is a short form
- of the Tcl command - upevel [self callinglevel] command ?args?. - When it is called with the level, it is compatible with the original tcl command. + of the Tcl command + uplevel [self callinglevel] command ?args?+ When it is called with the level, it is compatible with the original Tcl command. |
@@ -3055,8 +3533,8 @@
upvar
?level?
- othervar localvar
- ?othervar localvar?
+ otherVar localVar
+ ?otherVar localVar?
@@ -3071,15 +3549,15 @@ | - othervar localvar: referenced variable and variale in the local scope + otherVar localVar: referenced variable and variable in the local scope |
- ?othervar localvar?: optional pairs of referenced and local variable names + ?otherVar localVar?: optional pairs of referenced and local variable names |
When this method is used without the optional level, it is a short form
- of the Tcl command - upvar [self callinglevel] othervar localvar ?...?. - When it is called with the level, it is compatible with the original tcl command. + of the Tcl command + upvar [self callinglevel] otherVar localVar ?...?. + When it is called with the level, it is compatible with the original Tcl command. |
@@ -3143,6 +3621,45 @@
+ Arguments: + | ++ : + | +
+ Description: + | +
+
+ This method is used to specify that the object
+ should be deleted automatically, when the current
+ Tcl-proc/object-proc/instproc is left. Example:
+ set x [Object new -volatile]+ + |
+
+ Return: + | ++ empty string + | +
- Sample sample usage: -
- package require xotcl::metadataAnalyzer + XOTcl file analyzer for @ metadata. E.g.\ used for + doumentation with xoDoc (but in the static variant + StaticMetadataAnalyzer which uses the dynamic + variant in this file). +++ Sample sample usage: +
+ package require xotcl::metadataAnalyzer - # instantiate metadata analyzer object - MetadataAnalyzer @::m - # make this object be known to @ and turn @ metadata processing on - @ analyzerObj @::m - @ onOff 1 + # instantiate metadata analyzer object + MetadataAnalyzer @::m + # make this object be known to @ and turn @ metadata processing on + @ analyzerObj @::m + @ onOff 1 - # read in some metadata tags (in sample file) & execute the file - source lib/testx.xotcl + # read in some metadata tags (in sample file) & execute the file + source lib/testx.xotcl - # turn @ metadata processing off again - @ onOff 0 + # turn @ metadata processing off again + @ onOff 0 - # print out all collected metadata - puts [@::m print] -- + # print out all collected metadata + puts [@::m print] +
- "properties" contains list of all described metadata properties. E.g. can - be printed with -
- foreach p [my set properties] { - if {[my exists $p]} { - append c " $p=[my set $p]\n" - } - } -- "name" contains the method, object, ... name of the metadata element. -
- All metadata token are aggregated by @. Therefore, -
- foreach mdt [@ info children] { - if {[$mdt istype MetadataToken]} {$mdt print} - } -- prints all token. + Each collected metadata element is stored in a token object. + MetadataToken is superclass of token object classes. Each metadata token + has two interesting parameters: +
+ "properties" contains list of all described metadata properties. E.g. can + be printed with +
+ foreach p [my set properties] { + if {[my exists $p]} { + append c " $p=[my set $p]\n" + } + } ++ "name" contains the method, object, ... name of the metadata element. +
+ All metadata token are aggregated by @. Therefore, +
+ foreach mdt [@ info children] { + if {[$mdt istype MetadataToken]} {$mdt print} + } ++ prints all token. - +
- Naming convertions for strategies: - All strategies must follow the naming convention 'kind=implementation'. - Examples are the persistency strategy 'eager' specfied as - 'persistent=eager' or the persistency strategy 'lazy' (specified as - 'persistent=lazy') - + These methods provide support for managing "strategies", i.e. + mixin-classes, where only one kind of a family of conformant + mixins should be registered. +
+ Naming convertions for strategies: + All strategies must follow the naming convention 'kind=implementation'. + Examples are the persistency strategy 'eager' specfied as + 'persistent=eager' or the persistency strategy 'lazy' (specified as + 'persistent=lazy') +
+ + + +
+ Description: + | ++ + Regression test for procsearch + + | +
@@ -598,9 +626,7 @@ Description: