Convert from ByteVectorList to StringList

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@340107 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Allan Sandfeld Jensen 2004-08-23 15:26:23 +00:00
parent bdee6dcf73
commit d0095d3cd7
2 changed files with 17 additions and 0 deletions

View File

@ -66,6 +66,14 @@ StringList::StringList(const String &s) : List<String>()
append(s);
}
StringList::StringList(const ByteVectorList &bl, String::Type t) : List<String>()
{
ByteVectorList::ConstIterator i = bl.begin();
for(;i != bl.end(); i++) {
append(String(*i, t));
}
}
StringList::~StringList()
{

View File

@ -24,6 +24,7 @@
#include "tstring.h"
#include "tlist.h"
#include "tbytevectorlist.h"
#include <iostream>
@ -57,6 +58,14 @@ namespace TagLib {
*/
StringList(const String &s);
/*!
* Makes a deep copy of the data in \a vl.
*
* \note This should only be used with the 8-bit codecs Latin1 and UTF8, when
* used with other codecs it will simply print a warning and exit.
*/
StringList(const ByteVectorList &vl, String::Type t = String::Latin1);
/*!
* Destroys this StringList instance.
*/