[Bio] / FigKernelPackages / BasicLocation.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/BasicLocation.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Tue Jul 26 19:59:59 2005 UTC revision 1.2, Wed Jul 27 19:42:55 2005 UTC
# Line 489  Line 489 
489      return $retVal;      return $retVal;
490  }  }
491    
   
492  =head3 Matches  =head3 Matches
493    
494  C<< my $flag = BasicLocation::Matches($locA, $locB); >>  C<< my $flag = BasicLocation::Matches($locA, $locB); >>
# Line 707  Line 706 
706  =cut  =cut
707  #: Return Type $%;  #: Return Type $%;
708    
709    
710    =head3 SetBegin
711    
712    C<< $loc->SetBegin($newBegin); >>
713    
714    Change the begin point of this location without changing the endpoint.
715    
716    =over 4
717    
718    =item newBegin
719    
720    Proposed new beginning point.
721    
722    =back
723    
724    =cut
725    #: Return Type ;
726    
727    =head3 SetEnd
728    
729    C<< $loc->SetEnd($newEnd); >>
730    
731    Change the endpoint of this location without changing the begin point.
732    
733    =over 4
734    
735    =item newEnd
736    
737    Proposed new ending point.
738    
739    =back
740    
741    =cut
742    #: Return Type ;
743    
744  1;  1;
745    
746    
# Line 939  Line 973 
973      return $self->{_beg} + $index;      return $self->{_beg} + $index;
974  }  }
975    
976    
977    =head3 SetBegin
978    
979    C<< $loc->SetBegin($newBegin); >>
980    
981    Change the begin point of this location without changing the endpoint.
982    
983    =over 4
984    
985    =item newBegin
986    
987    Proposed new beginning point.
988    
989    =back
990    
991    =cut
992    #: Return Type ;
993    sub SetBegin {
994        # Get the parameters.
995        my ($self, $newBegin) = @_;
996        # Update the begin point.
997        $self->{_beg} = $newBegin;
998        # Adjust the length.
999        $self->{_len} = $self->{_end} - $self->{_beg} + 1;
1000    }
1001    
1002    =head3 SetEnd
1003    
1004    C<< $loc->SetEnd($newEnd); >>
1005    
1006    Change the endpoint of this location without changing the begin point.
1007    
1008    =over 4
1009    
1010    =item newEnd
1011    
1012    Proposed new ending point.
1013    
1014    =back
1015    
1016    =cut
1017    #: Return Type ;
1018    sub SetEnd {
1019        # Get the parameters.
1020        my ($self, $newEnd) = @_;
1021        # Update the end point.
1022        $self->{_end} = $newEnd;
1023        # Adjust the length.
1024        $self->{_len} = $self->{_end} - $self->{_beg} + 1;
1025    }
1026    
1027    
1028  1;  1;
1029    
1030  package BBasicLocation;  package BBasicLocation;
# Line 1168  Line 1254 
1254      return $self->{_beg} - $index;      return $self->{_beg} - $index;
1255  }  }
1256    
1257    =head3 SetBegin
1258    
1259    C<< $loc->SetBegin($newBegin); >>
1260    
1261    Change the begin point of this location without changing the endpoint.
1262    
1263    =over 4
1264    
1265    =item newBegin
1266    
1267    Proposed new beginning point.
1268    
1269    =back
1270    
1271    =cut
1272    #: Return Type ;
1273    sub SetBegin {
1274        # Get the parameters.
1275        my ($self, $newBegin) = @_;
1276        # Update the begin point.
1277        $self->{_beg} = $newBegin;
1278        # Adjust the length.
1279        $self->{_len} = $self->{_beg} - $self->{_end} + 1;
1280    }
1281    
1282    =head3 SetEnd
1283    
1284    C<< $loc->SetEnd($newEnd); >>
1285    
1286    Change the endpoint of this location without changing the begin point.
1287    
1288    =over 4
1289    
1290    =item newEnd
1291    
1292    Proposed new ending point.
1293    
1294    =back
1295    
1296    =cut
1297    #: Return Type ;
1298    sub SetEnd {
1299        # Get the parameters.
1300        my ($self, $newEnd) = @_;
1301        # Update the end point.
1302        $self->{_end} = $newEnd;
1303        # Adjust the length.
1304        $self->{_len} = $self->{_beg} - $self->{_end} + 1;
1305    }
1306    
1307    
1308    
1309  1;  1;
1310    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3