1 /***************************************************************************
2 copyright : (C) 2002 - 2008 by Scott Wheeler
3 email : wheeler@kde.org
4 ***************************************************************************/
6 /***************************************************************************
7 * This library is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU Lesser General Public License version *
9 * 2.1 as published by the Free Software Foundation. *
11 * This library is distributed in the hope that it will be useful, but *
12 * WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14 * Lesser General Public License for more details. *
16 * You should have received a copy of the GNU Lesser General Public *
17 * License along with this library; if not, write to the Free Software *
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
21 * Alternatively, this file is available under the Mozilla Public *
22 * License Version 1.1. You may obtain a copy of the License at *
23 * http://www.mozilla.org/MPL/ *
24 ***************************************************************************/
26 #ifndef TAGLIB_STRINGLIST_H
27 #define TAGLIB_STRINGLIST_H
31 #include "tbytevectorlist.h"
32 #include "taglib_export.h"
41 * This is a spcialization of the List class with some members convention for
45 class TAGLIB_EXPORT StringList : public List<String>
50 * Constructs an empty StringList.
55 * Make a shallow, implicitly shared, copy of \a l. Because this is
56 * implicitly shared, this method is lightweight and suitable for
57 * pass-by-value usage.
59 StringList(const StringList &l);
62 * Constructs a StringList with \a s as a member.
64 StringList(const String &s);
67 * Makes a deep copy of the data in \a vl.
69 * \note This should only be used with the 8-bit codecs Latin1 and UTF8, when
70 * used with other codecs it will simply print a warning and exit.
72 StringList(const ByteVectorList &vl, String::Type t = String::Latin1);
75 * Destroys this StringList instance.
77 virtual ~StringList();
80 * Concatenate the list of strings into one string separated by \a separator.
82 String toString(const String &separator = " ") const;
85 * Appends \a s to the end of the list and returns a reference to the
88 StringList &append(const String &s);
91 * Appends all of the values in \a l to the end of the list and returns a
92 * reference to the list.
94 StringList &append(const StringList &l);
97 * Splits the String \a s into several strings at \a pattern. This will not include
98 * the pattern in the returned strings.
100 static StringList split(const String &s, const String &pattern);
103 class StringListPrivate;
104 StringListPrivate *d;
110 * \related TagLib::StringList
111 * Send the StringList to an output stream.
113 std::ostream &operator<<(std::ostream &s, const TagLib::StringList &l);