Audio::TagLib::ID3v2::FrameListMap - Perl-only class


Audio-TagLib documentation  | view source Contained in the Audio-TagLib distribution.

Index


NAME

Top

Audio::TagLib::ID3v2::FrameListMap - Perl-only class

SYNOPSIS

Top

  use Audio::TagLib::ID3v2::FrameListMap;

  my $tag  = Audio::TagLib::ID3v2::Tag->new();
  $tag->setTitle(Audio::TagLib::String->new("title"));
  $tag->setArtist(Audio::TagLib::String->new("artist"));
  my $i    = $tag->frameListMap();
  print $i->size(), "\n"; # got 2

  tie my %i, ref($i), $i;
  my $l    = $i{Audio::TagLib::ByteVector->new("TIT2")};
  print $l->begin()->data()->toString()->toCString(), "\n"; # got "title"

DESCRIPTION

Top

Implements TagLib::ID3v2::FrameListMap in C/C++ code, which is of type TagLib::Map<ByteVector, FrameList>.

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::ID3v2::Tag::frameListMap()

new()

Constructs an empty FrameListMap.

new(FrameListMap $m)

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

DESTROY()

Destroys this instance of the FrameListMap.

Iterator begin()

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

see Audio::TagLib::ID3v2::FrameListMap::Iterator

Iterator end()

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

see Audio::TagLib::ID3v2::FrameListMap::Iterator

void insert(ByteVector $key, FrameList $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(ByteVector $key)

Find the first occurance of $key.

BOOL contains(ByteVector $key)

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

void erase(Iterator $it)

Erase the item at $it from the list.

FrameList getItem(ByteVector $key)

Returns the value associated with $key.

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

copy(FrameListMap $m)

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

EXPORT

None by default.

SEE ALSO

Top

Audio::TagLib

AUTHOR

Top

Dongxu Ma, <dongxu@cpan.org>

COPYRIGHT AND LICENSE

Top


Audio-TagLib documentation  | view source Contained in the Audio-TagLib distribution.