Overview
Comment:Added extra ports names (due to defaults) to relevant lists:
port_name
port_bond
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: e9a78e5a159cf878191535fb3ff508bba5a770c3bd3e01ce1ea2a5b323d3952e
User & Date: gawthrop@users.sourceforge.net on 1998-07-02 13:40:50
Other Links: branch diff | manifest | tags
Context
1998-07-02
14:30:50
Corrected various bugs - including resettting n_ports to correct value check-in: dba3d36593 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:40:50
Added extra ports names (due to defaults) to relevant lists:
port_name
port_bond
check-in: e9a78e5a15 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:28:31
Added defaults in new form BEFORE alias expansion check-in: d70f8561a3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/rbg2abg.m from [cdd965e19c] to [fd684fbb7b].

1
2
3
4
5
6
7



8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17







+
+
+







function [bonds,components] = rbg2abg(name,rbonds,rstrokes,rcomponents,port_coord,port_name,infofile)

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.29  1998/07/02 13:28:31  peterg
% %% Added defaults in new form BEFORE alias expansion
% %%
% %% Revision 1.28  1998/07/02 12:36:05  peterg
% %% Removed debugging lines
% %%
% %% Revision 1.27  1998/07/02 12:24:02  peterg
% %% Expand port aliases
% %%
% %% Revision 1.26  1998/04/16 14:07:51  peterg
218
219
220
221
222
223
224

225
226


227
228
229
230
231
232
233
221
222
223
224
225
226
227
228


229
230
231
232
233
234
235
236
237







+
-
-
+
+







  # Unalias all the ports on this component - if not a junction
  unlabelled_ports = 0;  
  in_bonds = 0;
  if ((comp_type!="0")&&(comp_type!="1"))
    eval( ["alias = ", comp_type, '_alias';]); # Get aliases
    if is_struct(alias)		# are there any aliases
      for j=1:n_comp_bonds
        signed_bond = signed_bond_list(j);
      	port_name_index = getindex(port_bond,signed_bond_list(j));
        port_direction = -sign(signed_bond_list(j));
      	port_name_index = getindex(port_bond,signed_bond);
        port_direction = -sign(signed_bond);

      	if port_name_index==0	# There is no port on this bond - so try
				# to default
	  unlabelled_ports++;
	  if(unlabelled_ports==1)
	    if port_direction>0
	      in_bonds++;
249
250
251
252
253
254
255
256



257
258
259
260
261
262
263
253
254
255
256
257
258
259

260
261
262
263
264
265
266
267
268
269







-
+
+
+







	  else
	      mtt_info(["More than two unlabelled ports on component " \
			comp_name " (" comp_type ")"],fnum);
          end
	  mtt_info(["Defaulting to port name " port_name_i " on component " \
		    comp_name " (" comp_type ")" ],fnum);
	  port_name = [port_name; ["[" port_name_i "]"]];	# add to list
	  [port_name_index,junk] = size(port_name); # the corresponding index
	  [port_name_index,junk] = size(port_name); # the corresponding
						    # index
	  port_bond(port_name_index,:) = signed_bond; # add to port bond
        else  
      	  port_name_i = deblank(port_name(port_name_index,:));
	  port_name_i = port_name_i(2:length(port_name_i)-1) # strip []
	end;
        if struct_contains(alias,port_name_i) # Is this an alias?
	  eval(["new_port_name_i = alias.",port_name_i]);
	  mtt_info(["Expanding port name " port_name_i " of component " \


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