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 the save
function. An example of the use of saveobj
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 example:
function b = saveobj (a) b = a; if (isempty (b.field)) b.field = initfield (b); endif endfunction
See also: loadobj, class.
Package: octave