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 @@ XOTcl - Documentation -- ./library/serialize/Serializer.xotcl + @@ -12,18 +13,16 @@

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 @@ Object or Class with all currently defined methods, - variables, invariants, filters and mixins + variables, invariants, filters and mixins @@ -150,18 +149,18 @@ - Serialize all objects and classes that are currently - defined (except the specified omissions and the current - Serializer object). -

Examples:
- 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 - + Serialize all objects and classes that are currently + defined (except the specified omissions and the current + Serializer object). +

Examples:
+

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.

- - Examples: - 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. - + 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.

+ + Examples: +

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 @@ +
  • + + + + methodSerialize + object + method + prefix + + + + + + + + + + + + + + + + + + + + + + +
    + 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.

    + + Examples: +

    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 +
    +
  • +
  • + + + + exportMethods + list + + + + + + + + + + +
    + 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

    + Example: +

          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
    +      }
    + +
    +