Dongxu Ma > Audio-TagLib-1.43 > Audio::TagLib::APE::ItemListMap::Iterator

Download:
Audio-TagLib-1.43.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 1.41   Source   Latest Release: Audio-TagLib-1.50_01

NAME ^

Audio::TagLib::APE::ItemListMap::Iterator - Perl-only class

SYNOPSIS ^

  use Audio::TagLib::APE::ItemListMap;
  
  my $key1   = Audio::TagLib::String->new("key1");
  my $key2   = Audio::TagLib::String->new("key2");
  my $value1 = Audio::TagLib::String->new("value1");
  my $value2 = Audio::TagLib::String->new("value2");
  my $item1  = Audio::TagLib::APE::Item->new($key1, $value1);
  my $item2  = Audio::TagLib::APE::Item->new($key2, $value2);
  my $map   = Audio::TagLib::APE::ItemListMap->new();
  $map->insert($key1, $item1);
  $map->insert($key2, $item2);
  my $i     = $map->begin();
  
  print $$i->toString()->toCString(), "\n"; # got "value1"
  $i++;
  print $i->data()->toString()->toCString(), "\n"; # got "value2"
  print ${--$i}->toString()->toCString(), "\n"; # got "value1"

DESCRIPTION ^

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

new()

Generates an iterator attached with no map.

new(Iterator $it)

Copy constructor.

DESTROY()

Deletes the instance.

Item data()

Returns the Item 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 ^

ItemListMap Audio::TagLib

AUTHOR ^

Dongxu Ma, <dongxu@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2005 by Dongxu Ma

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: