Skip to content

loadobj

miscellaneous · scripts/miscellaneous/loadobj.m

: b = loadobj (a)

Class method run on an object just after load has read it.

A class that defines loadobj can repair or complete the object a read from the file before it is handed back to the caller, for instance by recreating fields that saveobj dropped or by upgrading an object written by an older version of the class. A method that rebuilds a cache field:

function b = loadobj (a)
  b = a;
  b.cache = build_cache (b);
endfunction