The Winamp Remote Control suite
a remote control client and plugin for Winamp 2.x, 5.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
StringVectorPrinter.h
Go to the documentation of this file.
1 /*
2  * StringVectorPrinter.h
3  *
4  * Created on: 24 Feb 2013
5  * Author: Patrick
6  */
7 
8 #ifndef STRINGVECTORPRINTER_H_
9 #define STRINGVECTORPRINTER_H_
10 
11 #include <sstream.h>
12 #include <vector>
13 
14 namespace WinampRemote
15 {
16 namespace Utils
17 {
18 
23 {
24 
25  stringstream sstr;
26 
31  StringVectorPrinter(const vector<string> & playlist)
32  {
33  for (unsigned int i = 0; i < playlist.size(); i++)
34  {
35  sstr << (playlist.at(i)).c_str() << endl;
36  }
37  }
38 
39 
40 };
41 
42 
49 std::ostream& operator <<(std::ostream& os, const StringVectorPrinter& svp)
50 {
51  os << svp.sstr.str();
52  return os;
53 }
54 
55 } /* namespace Utils */
56 } /* namespace WinampRemote */
57 #endif /* STRINGVECTORPRINTER_H_ */