Audio::TagLib::ByteVector::Iterator - Perl-only class


Audio-TagLib documentation Contained in the Audio-TagLib distribution.

Index


Code Index:

NAME

Top

Audio::TagLib::ByteVector::Iterator - Perl-only class

SYNOPSIS

Top

  use Audio::TagLib::ByteVector::Iterator;

  my $v = Audio::TagLib::ByteVector->new("blah blah blah");
  my $i = $v->begin();
  print $$i, "\n"; # got 'b'
  print ${++$i}, "\n"; # got 'l'

DESCRIPTION

Top

Implements C++ std::map::iterator to be corporately used with ByteVector.

new()

Generates an iterator attached with no vector.

new(Iterator $it)

Copy constructor.

DESTROY()

Deletes the instance.

PV data()

Returns the char pointed by current iterator.

overloaded by operator q(${})

Iterator next()

Moves to next item.

overloaded by operator q(++)

Iterator last()

Moves to last item.

overloaded by operator q(--)

void copy(Iterator $it)

Makes a copy of $it.

OVERLOADED OPERATORS

${} = ++ -- += -=

EXPORT

None by default.

SEE ALSO

Top

Audio::TagLib

AUTHOR

Top

Dongxu Ma, <dongxu@cpan.org>

COPYRIGHT AND LICENSE

Top


Audio-TagLib documentation Contained in the Audio-TagLib distribution.

package Audio::TagLib::ByteVector::Iterator;

use 5.008003;
use strict;
use warnings;

our $VERSION = '1.41';

use Audio::TagLib;

use overload
  q(${}) => sub { my $data = shift->data(); \$data;},
  q(=)   => sub { __PACKAGE__->new($_[0]); },
  q(++)  => sub { shift->next();},
  q(--)  => sub { shift->last();},
  q(+=)  => sub { shift->forward($_[0]);},
  q(-=)  => sub { shift->backward($_[0]);};

# Preloaded methods go here.

1;
__END__
# Below is stub documentation for your module. You'd better edit it!