File: _parse_leaf_ppty_value.sci

package info (click to toggle)
scilab-plotlib 0.41-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,196 kB
  • sloc: xml: 3,308; makefile: 15
file content (43 lines) | stat: -rw-r--r-- 1,261 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
function [_leaf_ppty_value_list,_next]=_parse_leaf_ppty_value(typeOfPlot,argList,_start)
  
global leafPropertiesNames
    
_leaf_ppty_value_list=list();

_next=_start;

while _next <= length(argList)

  if type(argList(_next))~=10
    break;
  else    
    [_ppty_value_list,fail]=getColorNumber(typeOfPlot,argList(_next)); 
    _leaf_ppty_value_list=lstcat(_leaf_ppty_value_list,_ppty_value_list);
  end    

  if ~fail
      _next=_next+1;
  elseif _next == length(argList)
      _error(sprintf('%s : unknown property name ""%s"" or missing value',typeOfPlot,argList(_next)));
  else    
      pptystring=convstr(argList(_next));
      value=argList(_next+1);
     
      if or(pptystring==leafPropertiesNames(1))
      
            ppty=leafPropertiesNames(pptystring)(1);              
            parseFunction=leafPropertiesNames(pptystring)(2);
            cmd=sprintf("%s(typeOfPlot,value,""%s"",""%s"")",parseFunction,pptystring,ppty);
            _ppty_value_list=evstr(cmd);
            _leaf_ppty_value_list=lstcat(_leaf_ppty_value_list,_ppty_value_list);
      else
           _error(sprintf('%s : ""%s"" is an unknown property name',typeOfPlot,pptystring));
      end // select convstr(_pair(1))

     _next=_next+2;

  end

end  
  
endfunction