]> Creatis software - CreaPhase.git/blob - octave_packages/m/general/loadobj.m
update packages
[CreaPhase.git] / octave_packages / m / general / loadobj.m
1 ## Copyright (C) 2008-2012 David Bateman
2 ##
3 ## This file is part of Octave.
4 ##
5 ## Octave is free software; you can redistribute it and/or modify it
6 ## under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 3 of the License, or (at
8 ## your option) any later version.
9 ##
10 ## Octave is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 ## General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with Octave; see the file COPYING.  If not, see
17 ## <http://www.gnu.org/licenses/>.
18
19 ## -*- texinfo -*-
20 ## @deftypefn {Function File} {@var{b} =} loadobj (@var{a})
21 ## Method of a class to manipulate an object after loading it from a file.
22 ## The function @code{loadobj} is called when the object @var{a} is loaded
23 ## using the @code{load} function.  An example of the use of @code{saveobj}
24 ## might be to add fields to an object that don't make sense to be saved.
25 ## For example:
26 ##
27 ## @example
28 ## @group
29 ## function b = loadobj (a)
30 ##   b = a;
31 ##   b.addmissingfield = addfield (b);
32 ## endfunction
33 ## @end group
34 ## @end example
35 ##
36 ## @seealso{saveobj, class}
37 ## @end deftypefn
38
39 function b = loadobj (a)
40   error ("loadobj: not defined for class \"%s\"", class(a));
41 endfunction