Ignore:
Timestamp:
11/29/11 16:03:56 (13 years ago)
Author:
Mathieu Morlighem
Message:

Improvement: marshall is now a method of all model fields, removed unnecessary model fields (numcontrols... etc)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/balancethickness.m

    r10276 r10969  
    66classdef balancethickness
    77        properties (SetAccess=public)
    8                 spcthickness      = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
    9                 thickening_rate   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
    10                 stabilization     = modelfield('default',0,'marshall',true,'format','Integer');
     8                spcthickness      = NaN;
     9                thickening_rate   = NaN;
     10                stabilization     = 0;
    1111        end
    1212        methods
     
    2727                end % }}}
    2828                function obj = setdefaultparameters(obj) % {{{
    29 
    30                         %first, use the defaults provided by the properties definition above.
    31                         fieldnames=fields(obj);
    32                         for i=1:length(fieldnames),
    33                                 fieldname=fieldnames{i};
    34                                 obj.(fieldname)=obj.(fieldname).default;
    35                         end
    3629
    3730                        %Type of stabilization used
     
    5548
    5649                end % }}}
     50                function marshall(obj,fid) % {{{
     51                        WriteData(fid,'object',obj,'fieldname','spcthickness','format','DoubleMat','mattype',1);
     52                        WriteData(fid,'object',obj,'fieldname','thickening_rate','format','DoubleMat','mattype',1);
     53                        WriteData(fid,'object',obj,'fieldname','stabilization','format','Integer');
     54                end % }}}
    5755        end
    5856end
Note: See TracChangeset for help on using the changeset viewer.