The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Audio::TagLib::ID3v1::GenreMap - Perl-only class

SYNOPSIS

  use Audio::TagLib::ID3v1::GenreMap;
  
  my $map = Audio::TagLib::ID3v1->genreMap();
  tie my %map, ref($map), $map;
  print $map{(keys %map)[0]}, "\n"; # got 123
  my ($first) = keys %map;
  print $first->toCString(), "\n"; # got "A Cappella"

DESCRIPTION

Implements TagLib::ID3v1::GenreMap in C/C++ code, which is of type TagLib::Map<String, int>.

Optionally, you can tie an instance of ItemListMap with a hash symbol, just like this: tie my %h, ref($i), $i;, Then operate throught %h.

see Audio::TagLib::ID3v1::genreMap()

new()

Constructs an empty GenreMap.

new(GenreMap $m)

Make a shallow, implicitly shared, copy of $m.

DESTROY()

Destroys this instance of the GenreMap.

Iterator begin()

Returns an STL style iterator to the beginning of the map.

see Audio::TagLib::ID3v1::GenreMap::Iterator

Iterator end()

Returns an STL style iterator to the end of the map.

see Audio::TagLib::ID3v1::GenreMap::Iterator

void insert(String $key, IV $value)

Inserts $value under $key in the map. If a value for $key already exists it will be overwritten.

void clear()

Removes all of the elements from elements from the map. This however will not free memory of all the items.

UV size()

The number of elements in the map.

see isEmpty()

BOOL isEmpty()

Returns true if the map is empty.

see size()

Iterator find(String $key)

Find the first occurance of $key.

BOOL contains(String $key)

Returns true if the map contains an instance of $key.

void erase(Iterator $it)

Erase the item at $it from the list.

IV getItem(String $key)

Returns the value associated with $key.

note This has undefined behavior if the key is not present in the map.

copy(GenreMap $m)

Make a shallow, implicitly shared, copy of $m.

EXPORT

None by default.

SEE ALSO

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.