Method of a class to manipulate an object prior to saving it to a file. The function
saveobj
is called when the object a is saved using thesave
function. An example of the use ofsaveobj
might be to remove fields of the object that don't make sense to be saved or it might be used to ensure that certain fields of the object are initialized before the object is saved. For examplefunction b = saveobj (a) b = a; if (isempty (b.field)) b.field = initfield(b); endif endfunction