209 $featureHash{includemacro} = &featureparser::getattrValue($nodeMac,"include",STRICTCASE); |
209 $featureHash{includemacro} = &featureparser::getattrValue($nodeMac,"include",STRICTCASE); |
210 $featureHash{excludemacro} = &featureparser::getattrValue($nodeMac,"exclude",STRICTCASE); |
210 $featureHash{excludemacro} = &featureparser::getattrValue($nodeMac,"exclude",STRICTCASE); |
211 |
211 |
212 #Read the attribute infeaturesetiby |
212 #Read the attribute infeaturesetiby |
213 $attval = &featureparser::getattrValue($nodeMac,"infeaturesetiby"); |
213 $attval = &featureparser::getattrValue($nodeMac,"infeaturesetiby"); |
214 if(($attval eq undef) or (lc($attval) eq "yes")) { |
214 if(!defined($attval) or (lc($attval) eq "yes")) { |
215 $featureHash{infeaturesetiby} = 1; |
215 $featureHash{infeaturesetiby} = 1; |
216 } |
216 } |
217 elsif(lc($attval) eq "no") { |
217 elsif(lc($attval) eq "no") { |
218 $featureHash{infeaturesetiby} = 0; |
218 $featureHash{infeaturesetiby} = 0; |
219 } |
219 } |
315 { |
315 { |
316 $featureHash{includemacro} = &featureparser::getattrValue($nodeMac, "include", STRICTCASE); |
316 $featureHash{includemacro} = &featureparser::getattrValue($nodeMac, "include", STRICTCASE); |
317 $featureHash{excludemacro} = &featureparser::getattrValue($nodeMac, "exclude", STRICTCASE); |
317 $featureHash{excludemacro} = &featureparser::getattrValue($nodeMac, "exclude", STRICTCASE); |
318 #read the attribute infeaturesetiby |
318 #read the attribute infeaturesetiby |
319 $attval = &featureparser::getattrValue($nodeMac, "infeaturesetiby"); |
319 $attval = &featureparser::getattrValue($nodeMac, "infeaturesetiby"); |
320 if(($attval eq undef) or (lc($attval) eq "yes")) |
320 if(!defined($attval) or (lc($attval) eq "yes")) |
321 { |
321 { |
322 $featureHash{infeaturesetiby} = 1; |
322 $featureHash{infeaturesetiby} = 1; |
323 } |
323 } |
324 elsif(lc($attval) eq "no") |
324 elsif(lc($attval) eq "no") |
325 { |
325 { |
451 my $feature = shift; |
451 my $feature = shift; |
452 my $namespace = shift; |
452 my $namespace = shift; |
453 my $featuresetList = $object->$featuresetList; |
453 my $featuresetList = $object->$featuresetList; |
454 |
454 |
455 $feature = lc($feature); |
455 $feature = lc($feature); |
456 if($namespace eq undef) { |
456 if(!defined ($namespace)) { |
457 if(exists $$featuresetList[0]->{feature_list}{$feature}) { |
457 if(exists $$featuresetList[0]->{feature_list}{$feature}) { |
458 return $$featuresetList[0]->{feature_list}{$feature}; |
458 return $$featuresetList[0]->{feature_list}{$feature}; |
459 } |
459 } |
460 if(exists $$featuresetList[0]->{alias_feature_list}{$feature}) { |
460 if(exists $$featuresetList[0]->{alias_feature_list}{$feature}) { |
461 return $$featuresetList[0]->{alias_feature_list}{$feature}; |
461 return $$featuresetList[0]->{alias_feature_list}{$feature}; |
704 last; |
704 last; |
705 } |
705 } |
706 } |
706 } |
707 if(!$featHash) |
707 if(!$featHash) |
708 { |
708 { |
709 &featureparser::ERROR("original feature definition does not exist."); |
709 &featureparser::ERROR("Original feature definition does not exist for feature ".sprintf("0x%08x", $uid)); |
710 return 0; |
710 return 0; |
711 } |
711 } |
712 |
712 |
713 my $aliasfeatHash = $newSet->{alias_feature}{$uid}; |
713 my $aliasfeatHash = $newSet->{alias_feature}{$uid}; |
714 |
714 |
715 if(($aliasfeatHash->{includemacro}) || ($aliasfeatHash->{excludemacro})) |
715 if(($aliasfeatHash->{includemacro}) || ($aliasfeatHash->{excludemacro})) |
716 { |
716 { |
717 if(($featHash->{includemacro}) || ($featHash->{excludemacro})) |
717 if (($featHash->{includemacro} || $featHash->{excludemacro}) && (!(($featHash->{includemacro} && ($featHash->{includemacro} eq $aliasfeatHash->{includemacro})) || ($featHash->{excludemacro} && ($featHash->{excludemacro} eq $aliasfeatHash->{excludemacro}))))) |
718 { |
718 { |
719 &featureparser::WARN("the value of attribute hrhmacro has been overrided in ogrinal feature ".sprintf("0x%08x", $uid)); |
719 &featureparser::WARN("the value of attribute hrhmacro has been overridden in original feature ".sprintf("0x%08x", $uid)); |
720 undef $featHash->{includemacro}; |
720 } |
721 undef $featHash->{excludemacro}; |
721 undef $featHash->{includemacro}; |
722 } |
722 undef $featHash->{excludemacro}; |
723 } |
723 } |
724 elsif($featHash->{includemacro} || $featHash->{excludemacro}) |
724 elsif($featHash->{includemacro} || $featHash->{excludemacro}) |
725 { |
725 { |
726 &featureparser::WARN("the original value of attribute hrhmacro will be used for featureoverride ".sprintf("0x%08x", $uid)); |
|
727 $aliasfeatHash->{includemacro} = $featHash->{includemacro}; |
726 $aliasfeatHash->{includemacro} = $featHash->{includemacro}; |
728 $aliasfeatHash->{excludemacro} = $featHash->{excludemacro}; |
727 $aliasfeatHash->{excludemacro} = $featHash->{excludemacro}; |
|
728 undef $featHash->{includemacro}; |
|
729 undef $featHash->{excludemacro}; |
729 } |
730 } |
730 if($aliasfeatHash->{statusflags}) |
731 if($aliasfeatHash->{statusflags}) |
731 { |
732 { |
732 if(($featHash->{statusflags}) && !($aliasfeatHash->{statusflags} eq $featHash->{statusflags})) |
733 if(($featHash->{statusflags}) && !($aliasfeatHash->{statusflags} eq $featHash->{statusflags})) |
733 { |
734 { |
734 &featureparser::WARN("the value of attribute statusflags has been overrided in ogrinal feature ".sprintf("0x%08x", $uid)); |
735 &featureparser::WARN("the value of attribute statusflags has been overridden in original feature ".sprintf("0x%08x", $uid)); |
735 } |
736 } |
736 } |
737 } |
737 elsif($featHash->{statusflags}) |
738 elsif($featHash->{statusflags}) |
738 { |
739 { |
739 $aliasfeatHash->{statusflags} = $featHash->{statusflags}; |
740 $aliasfeatHash->{statusflags} = $featHash->{statusflags}; |
740 &featureparser::WARN("the original value of attribute statusflags will be used for featureoverride ".sprintf("0x%08x", $uid)); |
|
741 } |
741 } |
742 if($aliasfeatHash->{userdata}) |
742 if($aliasfeatHash->{userdata}) |
743 { |
743 { |
744 if(($featHash->{userdata}) && !($aliasfeatHash->{userdata} eq $featHash->{userdata})) |
744 if(($featHash->{userdata}) && !($aliasfeatHash->{userdata} eq $featHash->{userdata})) |
745 { |
745 { |
746 &featureparser::WARN("the value of attribute userdata has been overrided in ogrinal feature ".sprintf("0x%08x", $uid)); |
746 &featureparser::WARN("the value of attribute userdata has been overridden in original feature ".sprintf("0x%08x", $uid)); |
747 } |
747 } |
748 } |
748 } |
749 elsif($featHash->{userdata}) |
749 elsif($featHash->{userdata}) |
750 { |
750 { |
751 $aliasfeatHash->{userdata} = $featHash->{userdata}; |
751 $aliasfeatHash->{userdata} = $featHash->{userdata}; |
752 &featureparser::WARN("the original value of attribute userdata will be used for featureoverride ".sprintf("0x%08x", $uid)); |
|
753 } |
752 } |
754 if($aliasfeatHash->{infeaturesetiby}) |
753 if($aliasfeatHash->{infeaturesetiby}) |
755 { |
754 { |
756 if(($featHash->{infeaturesetiby}) && ($aliasfeatHash->{infeaturesetiby} != $featHash->{infeaturesetiby})) |
755 if(($featHash->{infeaturesetiby}) && ($aliasfeatHash->{infeaturesetiby} != $featHash->{infeaturesetiby})) |
757 { |
756 { |
758 &featureparser::WARN("the value of attribute infeautresetiby has been overrided in ogrinal feature ".sprintf("0x%08x", $uid)); |
757 &featureparser::WARN("the value of attribute infeautresetiby has been overridden in original feature ".sprintf("0x%08x", $uid)); |
759 } |
758 } |
760 } |
759 } |
761 elsif(defined($featHash->{infeaturesetiby})) |
760 elsif(defined($featHash->{infeaturesetiby})) |
762 { |
761 { |
763 $aliasfeatHash->{infeaturesetiby} = $featHash->{infeaturesetiby}; |
762 $aliasfeatHash->{infeaturesetiby} = $featHash->{infeaturesetiby}; |
764 &featureparser::WARN("the original value of attribute infewaturesetiby will be used for featureoverride ".sprintf("0x%08x", $uid)); |
|
765 } |
763 } |
766 } |
764 } |
767 # Add the unique featureset into the list |
765 # Add the unique featureset into the list |
768 push @$featSetList, $newSet; |
766 push @$featSetList, $newSet; |
769 return 1; |
767 return 1; |