Home > freetb4matlab > general > saveobj.m

saveobj

PURPOSE ^

% Method of a class to manipulate an object prior to saving it to a file.

SYNOPSIS ^

function b = saveobj (a)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {@var{b} =} saveobj (@var{a})
% Method of a class to manipulate an object prior to saving it to a file. 
% The function @code{saveobj} is called when the object @var{a} is saved 
% using the @code{save} function.  An example of the use of @code{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
%
% @example
% @group
% function b = saveobj (a)
%   b = a;
%   if (isempty (b.field))
%      b.field = initfield(b);
%   end
% 
% @end group
% @end example
%
% @seealso{loadobj, class}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003