Differences From Artifact [1d260a6964]:

To Artifact [09c16f9abd]:


10
11
12
13
14
15
16



17
18
19
20
21
22
23


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %% Revision 1.7  1998/06/29 12:13:36  peterg
% %% Changed FP ports to f and p
% %%
% %% Revision 1.6  1998/06/29 09:55:17  peterg
% %% Changed name to FP from ES
% %%
% %% Revision 1.5  1998/04/12 15:01:53  peterg







>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.8  1998/06/29 12:16:05  peterg
% %% Whoops - FP bonds are p and f (in that order)
% %%
% %% Revision 1.7  1998/06/29 12:13:36  peterg
% %% Changed FP ports to f and p
% %%
% %% Revision 1.6  1998/06/29 09:55:17  peterg
% %% Changed name to FP from ES
% %%
% %% Revision 1.5  1998/04/12 15:01:53  peterg
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72




73


junctions = '-zero-one-';
one_ports = '-SS-';
two_ports = '-TF-GY-AE-AF-FMR-RS-EBTF-';
N_ports   = '-R-C-I-';
comp_type = ['-', comp_type, '-'];

if length(findstr(comp_type,junctions))==1
  ports = ['[undefined]'];
elseif length(findstr(comp_type,one_ports))==1
  ports = ['[in]'];
elseif length(findstr(comp_type,two_ports))==1
  ports = ['[in]';'[out]'];
elseif length(findstr(comp_type,'[-EMTF-]'))==1
  ports = ['[in]';'[out]';'[mod]'];
elseif length(findstr(comp_type,'[-FP-]'))==1
  ports = ['[p]';'[f]'];
elseif length(findstr(comp_type,'[-PS-]'))==1
  ports = ['[in]';'[out]';'[power]'];
elseif length(findstr(comp_type,N_ports))==1
  if N==1
    ports = ['[in]'];
  elseif N==2
    ports = ['[in]';'[out]'];
  elseif N>2
    ports = '[1]';
    for i=2:N
      ports = [ports; sprintf("[%i]",i)];
    end;
  end;
end;















|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>

>
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

junctions = '-zero-one-';
one_ports = '-SS-';
two_ports = '-TF-GY-AE-AF-FMR-RS-EBTF-';
N_ports   = '-R-C-I-';
comp_type = ['-', comp_type, '-'];

#if length(findstr(comp_type,junctions))==1
#  ports = ['[undefined]'];
#elseif length(findstr(comp_type,one_ports))==1
#  ports = ['[in]'];
#elseif length(findstr(comp_type,two_ports))==1
#  ports = ['[in]';'[out]'];
#elseif length(findstr(comp_type,'[-EMTF-]'))==1
#  ports = ['[in]';'[out]';'[mod]'];
#elseif length(findstr(comp_type,'[-FP-]'))==1
#  ports = ['[p]';'[f]'];
#elseif length(findstr(comp_type,'[-PS-]'))==1
#  ports = ['[in]';'[out]';'[power]'];
#elseif length(findstr(comp_type,N_ports))==1
#  if N==1
#    ports = ['[in]'];
#  elseif N==2
#    ports = ['[in]';'[out]'];
#  elseif N>2
#    ports = '[1]';
#    for i=2:N
#      ports = [ports; sprintf("[%i]",i)];
#    end;
#  end;
#end;
 
# All the above is now done in the alias files
  ports = '[1]';
  for i=2:N
    ports = [ports; sprintf("[%i]",i)];
  end;

endfunction

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]