Changeset 12383


Ignore:
Timestamp:
06/07/12 10:35:12 (13 years ago)
Author:
Mathieu Morlighem
Message:

marshalling options

File:
1 edited

Legend:

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

    r12351 r12383  
    223223                        end
    224224                end % }}}
    225                 function marshall(obj,fid)% {{{
    226                         disp('No options marshalled for now');
     225                function marshall(obj,fid,firstindex)% {{{
     226
    227227                        for i=1:size(obj.list,1),
    228228                                name  = obj.list{i,1};
    229229                                value = obj.list{i,2};
    230230
     231                                %Write option name
     232                                WriteData(fid,'enum',(firstindex-1)+2*i-1,'data',name,'format','String');
     233
     234                                %Write option value
    231235                                if (isnumeric(value) & numel(value)==1),
    232                                         %
     236                                        WriteData(fid,'enum',(firstindex-1)+2*i,'data',value,'format','Double');
    233237                                elseif ischar(value),
    234                                         %
     238                                        WriteData(fid,'enum',(firstindex-1)+2*i,'data',value,'format','String');
    235239                                else
    236240                                        error(['Cannot marshall option ' name ': format not supported yet']);
Note: See TracChangeset for help on using the changeset viewer.