Skip to content

Commit

Permalink
add beginnings of more POD to IntervalStore
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Feb 8, 2012
1 parent dbeb58d commit 921da3f
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions lib/IntervalStore.pm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ sub _loadChunk {
}
}

=head2 startLoad( $measure, $chunkBytes )
=cut

sub startLoad {
my ($self, $measure, $chunkBytes) = @_;

Expand Down Expand Up @@ -145,31 +149,44 @@ sub startLoad {
}
}

=head2 addSorted( \@feature )
=cut

sub addSorted {
my ($self, $feat) = @_;
$self->{lazyNCList}->addSorted($feat);
}

=head2 finishLoad()
=cut

sub finishLoad {
my ($self) = @_;
$self->{lazyNCList}->finish();
$self->{nclist} = $self->lazyNCList->topLevelList();
}

=head2 overlapCallback( $from, $to, \&func )
Calls the given function once for each of the intervals that overlap
the given interval if C<<$from <= $to>>, iterates left-to-right, otherwise
iterates right-to-left.
=cut

sub overlapCallback {
my ($self, $start, $end, $cb) = @_;
$self->lazyNCList->overlapCallback($start, $end, $cb);
}

sub lazyNCList { return shift->{lazyNCList}; }

sub count { return shift->{lazyNCList}->count; }

sub hasIntervals { return shift->count > 0; }

sub store { return shift->{store}; }

sub classes { return shift->{classes}; }
sub lazyNCList { shift->{lazyNCList} }
sub count { shift->{lazyNCList}->count }
sub hasIntervals { shift->count > 0 }
sub store { shift->{store} }
sub classes { shift->{classes} }

=head2 descriptor
Expand All @@ -181,6 +198,7 @@ sub classes { return shift->{classes}; }
The return value can be passed to the constructor later.
=cut

sub descriptor {
my ($self) = @_;
return {
Expand Down

0 comments on commit 921da3f

Please sign in to comment.