Miam-Player  0.8.0
A nice music player
TagLib::StringList Class Reference

A list of strings. More...

#include <tstringlist.h>

Inheritance diagram for TagLib::StringList:
TagLib::List< String >

Public Member Functions

 StringList ()
 Constructs an empty StringList. More...
 
 StringList (const StringList &l)
 Make a shallow, implicitly shared, copy of l. More...
 
 StringList (const String &s)
 Constructs a StringList with s as a member. More...
 
 StringList (const ByteVectorList &vl, String::Type t=String::Latin1)
 Makes a deep copy of the data in vl. More...
 
virtual ~StringList ()
 Destroys this StringList instance. More...
 
String toString (const String &separator=" ") const
 Concatenate the list of strings into one string separated by separator. More...
 
StringListappend (const String &s)
 Appends s to the end of the list and returns a reference to the list. More...
 
StringListappend (const StringList &l)
 Appends all of the values in l to the end of the list and returns a reference to the list. More...
 
- Public Member Functions inherited from TagLib::List< String >
 List ()
 Constructs an empty list. More...
 
 List (const List< String > &l)
 Make a shallow, implicitly shared, copy of l. More...
 
virtual ~List ()
 Destroys this List instance. More...
 
Iterator begin ()
 Returns an STL style iterator to the beginning of the list. More...
 
ConstIterator begin () const
 Returns an STL style constant iterator to the beginning of the list. More...
 
Iterator end ()
 Returns an STL style iterator to the end of the list. More...
 
ConstIterator end () const
 Returns an STL style constant iterator to the end of the list. More...
 
Iterator insert (Iterator it, const String &value)
 Inserts a copy of value before it. More...
 
List< String > & sortedInsert (const String &value, bool unique=false)
 Inserts the value into the list. More...
 
List< String > & append (const String &item)
 Appends item to the end of the list and returns a reference to the list. More...
 
List< String > & append (const List< String > &l)
 Appends all of the values in l to the end of the list and returns a reference to the list. More...
 
List< String > & prepend (const String &item)
 Prepends item to the beginning list and returns a reference to the list. More...
 
List< String > & prepend (const List< String > &l)
 Prepends all of the items in l to the beginning list and returns a reference to the list. More...
 
List< String > & clear ()
 Clears the list. More...
 
unsigned int size () const
 Returns the number of elements in the list. More...
 
bool isEmpty () const
 Returns whether or not the list is empty. More...
 
Iterator find (const String &value)
 Find the first occurrence of value. More...
 
ConstIterator find (const String &value) const
 Find the first occurrence of value. More...
 
bool contains (const String &value) const
 Returns true if the list contains value. More...
 
Iterator erase (Iterator it)
 Erase the item at it from the list. More...
 
const Stringfront () const
 Returns a reference to the first item in the list. More...
 
Stringfront ()
 Returns a reference to the first item in the list. More...
 
const Stringback () const
 Returns a reference to the last item in the list. More...
 
Stringback ()
 Returns a reference to the last item in the list. More...
 
void setAutoDelete (bool autoDelete)
 Auto delete the members of the list when the last reference to the list passes out of scope. More...
 
Stringoperator[] (unsigned int i)
 Returns a reference to item i in the list. More...
 
const Stringoperator[] (unsigned int i) const
 Returns a const reference to item i in the list. More...
 
List< String > & operator= (const List< String > &l)
 Make a shallow, implicitly shared, copy of l. More...
 
bool operator== (const List< String > &l) const
 Compares this list with l and returns true if all of the elements are the same. More...
 
bool operator!= (const List< String > &l) const
 Compares this list with l and returns true if the lists differ. More...
 

Static Public Member Functions

static StringList split (const String &s, const String &pattern)
 Splits the String s into several strings at pattern. More...
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &s, const TagLib::StringList &l)
 

Additional Inherited Members

- Public Types inherited from TagLib::List< String >
typedef std::list< String >::iterator Iterator
 
typedef std::list< String >::const_iterator ConstIterator
 
- Protected Member Functions inherited from TagLib::List< String >
void detach ()
 

Detailed Description

A list of strings.

This is a specialization of the List class with some members convention for string operations.

Constructor & Destructor Documentation

TagLib::StringList::StringList ( )

Constructs an empty StringList.

TagLib::StringList::StringList ( const StringList l)

Make a shallow, implicitly shared, copy of l.

Because this is implicitly shared, this method is lightweight and suitable for pass-by-value usage.

TagLib::StringList::StringList ( const String s)

Constructs a StringList with s as a member.

TagLib::StringList::StringList ( const ByteVectorList vl,
String::Type  t = String::Latin1 
)

Makes a deep copy of the data in 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.
virtual TagLib::StringList::~StringList ( )
virtual

Destroys this StringList instance.

Member Function Documentation

StringList& TagLib::StringList::append ( const String s)

Appends s to the end of the list and returns a reference to the list.

StringList& TagLib::StringList::append ( const StringList l)

Appends all of the values in l to the end of the list and returns a reference to the list.

static StringList TagLib::StringList::split ( const String s,
const String pattern 
)
static

Splits the String s into several strings at pattern.

This will not include the pattern in the returned strings.

String TagLib::StringList::toString ( const String separator = " ") const

Concatenate the list of strings into one string separated by separator.

Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  s,
const TagLib::StringList l 
)
related

Send the StringList to an output stream.


The documentation for this class was generated from the following file: