Overview
Comment:Names anonymous components consistently with Xfig models.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 689be77ba93b4dcd43a6bfcdc56c3768a8ac4c30de406c1b681552b74b8007b1
User & Date: geraint@users.sourceforge.net on 2004-08-04 21:47:28
Other Links: branch diff | manifest | tags
Context
2004-08-04
22:16:02
Writes junctions to component list. check-in: 809e074f8a user: geraint@users.sourceforge.net tags: origin/master, trunk
21:47:28
Names anonymous components consistently with Xfig models. check-in: 689be77ba9 user: geraint@users.sourceforge.net tags: origin/master, trunk
21:34:17
Writes junctions to component list. check-in: 5720b32915 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/dia2abg.pl from [cf869a340e] to [fe284b92b9].

549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569






570
571
572
573
574
575
576
577
578
579
      $string = get_first_text_subnode($str_elem);
      $component_id_tag{$id} = $string->getData;
  }
    die "There are no components!\n" unless keys(%component_id_tag) > 0;
}

sub parse_component_data {
    my ($anon_index, $id, $component, $anonymous);
    $anon_index = 0;
    while (($id, $component) = each (%component_id_tag)) {
	$_ = $component;
	id_cleaner();
	$component = $_;
	my ($type_name, $repetitions) = split (/\*/, $component);
	if (! $repetitions) {
	    $type_name = $component;
	    $repetitions = 1;
	}
	my ($type, $name) = split (/:/, $type_name);
	if (! $name) {
	    $type = $type_name;






	    $name = "mtt${type}_${anon_index}";
	    $anonymous = 1;
	    $anon_index++;
	} else {
	    $anonymous = 0;
	}
	$component_id_type{$id} = $type;
	$component_id_name{$id} = $name;
	$component_id_reps{$id} = $repetitions;
	$component_id_anon{$id} = $anonymous;







|
|












>
>
>
>
>
>
|

<







549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577

578
579
580
581
582
583
584
      $string = get_first_text_subnode($str_elem);
      $component_id_tag{$id} = $string->getData;
  }
    die "There are no components!\n" unless keys(%component_id_tag) > 0;
}

sub parse_component_data {
    my (%anon_index, $id, $component, $anonymous);

    while (($id, $component) = each (%component_id_tag)) {
	$_ = $component;
	id_cleaner();
	$component = $_;
	my ($type_name, $repetitions) = split (/\*/, $component);
	if (! $repetitions) {
	    $type_name = $component;
	    $repetitions = 1;
	}
	my ($type, $name) = split (/:/, $type_name);
	if (! $name) {
	    $type = $type_name;
	    if (! defined ($anon_index{$type})) {
		$anon_index{$type} = 1;
	    } else {
		$anon_index{$type}++;
	    }
	    my $num = $anon_index{$type};
	    $name = "mtt${type}_${num}";
	    $anonymous = 1;

	} else {
	    $anonymous = 0;
	}
	$component_id_type{$id} = $type;
	$component_id_name{$id} = $name;
	$component_id_reps{$id} = $repetitions;
	$component_id_anon{$id} = $anonymous;


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