source | The Source object which should get cloned |
the cloned object
Description
Clones an Object, exceptions are fields with pointers ans arrays of arrays (obj[][]).
If a field is marked with 'clone' ist gets cloned, otherwise a reference copy is made. Noclone prevents fields from being copied at all.
source | the source object which gets cloned to target |
target | the target object which takes fields from source |
the combined object
Description
CombineObject melts objects together according to the MetaData of the objects:
{keep} the field is kept from target
{clone} the field gets cloned from source to target
{}the field gets reference copied from source to target.
Arrays get meltet in order source-target if they are of the same Dimensions (except the first one).
Example: foo[3,4] and bar[5,4] can be melted.
foo[3,4] and bar[3,6] can't - this will return Null.
url | Either a string with the filename or an existing TStream |
obj | a with new obj created empty instance or a prefilled object - see TChaosClone.KeepMode() for details |
the loaded object
Description
LoadUDObject loads a saved object. It uses the objects metadata to controll the loading, call own load- or initmethods and so on.
See TChaosClone.SetSaveTags(), TChaosClone.SetSaveMethodTags(), TChaosClone.ResetMode() and TChaosClone.KeepMode() for further information.
url | String with filename or existing TStream |
obj | the object to be saved |
-
DescriptionSaves an object based on it's MetaData. See TChaosClone.SetSaveTags(), TChaosClone.SetSaveMethodTags() and TChaosClone.ResetMode for further details.
mode | Keepmode: true or false |
keep | MetaTag for keep operation |
clone | MetaTag for clone op. |
noclone | MetaTag for NoClone op. |
-
Description
The keepmode decides wether a loaded object will overwrite the object given to the LoadUDObject-Function or if they will Combine(). Standard is false, which means overwrite.
The Metatags define the keywords for the different operations. By setting these with this function and store different tags in your MetaData you can control which op to do, based on the situation.
-
Description
Clears the internal storage of referenced objects. This is normally handled automatically by TChaosClone.ResetMode().
mode | Autoclear reference list: true, keep it: false |
-
DescriptionDetermines wether the reference list should be cleaned automatic after each load/save. Standard is true. Exceptions are possible but require fixed load- and save sequences.
save | MetaTag for load/savemethod |
loadurl | MetaTag for external load method |
init | MetaTag for Init method |
-
Description
These Tags determine which keywords start the following operations:
save: the tagged type has a load()- and a save()-method. Those take an url:object as only argument and open this url:object as stream. All loading only changes the Instance itself, the load()-method will not return anything.
Using this tag will cancel all normal ChaosClone activity for this type, so all loading and saving has to be done by the load and save- methods. (It's no problem to call Chaosclone from inside, though).
loadurl: an object field tagged this way will call a load()-method from the type in the field. This method takes an url. The path is stored in another field which has to be loaded before loadurl is called.
Example: obj{loadurlfoopath} will call obj.load() with the url stored in 'foopath'
Loading goes on as normal except that this one object is filled from an external file.
init: the type tagged this way has an init()-Method. It will be called after all fields of the type are loaded.
save | MetaTag for Save |
nosave | MetaTag for Nosave |
wholesave | MetaTag for WholeSave |
-
Description
These tags determine the work of the load- and saveroutine.
save: The object field gets saved.
nosave: The object field is ignored.
wholesave: The object field and all included subfields get stored.