Audio::TagLib::ID3v2::FrameList - Perl-only class
use Audio::TagLib::ID3v2::FrameList; my $tag = Audio::TagLib::ID3v2::Tag->new(); $tag->setTitle(Audio::TagLib::String->new("title")); $tag->setArtist(Audio::TagLib::String->new("artist")); my $i = $tag->frameList(); print $i->size(), "\n"; # got 2 tie my @i, ref($i), $i; print $i[0]->toString()->toCString(), "\n"; # got "title"
This implements Audio::TagLib::ID3v2::FrameList in C/C++ code, which is of type Audio::TagLib::List<Audio::TagLib::ID3v2::Frame *>. The list is copy-on-write.
You can also tie the instance to a array symbol, then operate through the functionalities of array.
WARNING The STORE method behaves different. It will insert item into specific index, or append to the end of list if index is out of bound. That means it will NEVER replace ANY existing item.
Just GET what you want from the tied array and SET everything through normal class methods.
Constructs an empty list.
Make a shallow, implicitly shared, copy of $l. Because this is implicitly shared, this method is lightweight and suitable for pass-by-value usage.
Destroys this List instance. If auto deletion is enabled and this list contains a pointer type all of the memebers are also deleted.
Returns an STL style iterator to the beginning of the list.
Returns an STL style iterator to the end of the list.
Insert a copy of $value before $it.
Inserts the $value into the list. This assumes that the list is currently sorted. If $unique is true then the value will not be inserted if it is already in the list.
Appends $item to the end of the list and returns a reference to the list.
Appends all of the values in $l to the end of the list and returns a reference to the list.
Prepends $item to the beginning list and returns a reference to the list.
Prepends all of the items in $l to the beginning list and returns a reference to the list.
Clears the list. If auto deletion is enabled and this list contains a pointer type the members are also deleted.
see setAutoDelete()
Returns the number of elements in the list.
Returns TRUE if list is empty.
Finds the first occurance of $value.
Returns true if the list contains $value.
Erase the item at $it from the list.
Returns the first item in the list.
Returns the last item in the list.
Auto delete the members of the list when the last reference to the list passes out of scope. This will have no effect on lists which do not contain a pointer type.
NOTE This relies on partial template instantiation -- most modern C++ compilers should now support this.
Returns the item $i in the list.
WARNING This method is slow. Use iterators to loop through the list.
==
None by default.
Audio::TagLib
Dongxu Ma, <dongxu@cpan.org>
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.
To install Audio::TagLib, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Audio::TagLib
CPAN shell
perl -MCPAN -e shell install Audio::TagLib
For more information on module installation, please visit the detailed CPAN module installation guide.