11 #ifndef TOSTRINGCOLLECTION_H
12 #define TOSTRINGCOLLECTION_H
29 std::ostringstream buf;
31 for (
typename T::const_iterator it = collection->begin();
32 it != collection->end(); )
34 buf << (*it)->toString();
35 if (++it != collection->end())
52 std::ostringstream buf;
54 for (
typename T::const_iterator it = collection.begin();
55 it != collection.end(); )
58 if (++it != collection.end())
75 std::ostringstream buf;
77 for (
typename T::const_iterator it = collection->begin();
78 it != collection->end(); )
80 buf << (*it)->toStringOriginal();
81 if (++it != collection->end())
98 std::ostringstream buf;
100 for (
typename T::const_iterator it = collection->begin();
101 it != collection->end(); )
104 if (++it != collection->end() && sep)
121 std::ostringstream buf;
123 for (
typename T::const_iterator it = collection.begin();
124 it != collection.end(); )
127 if (++it != collection.end() && sep)
136 #endif // TOSTRINGCOLLECTION_H
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
const std::string collectionToString(const T *collection, char sep= ' ')
Converts a collection of objects into a string, using the passed separator to separate the elements...
Definition: tostringcollection.h:96
const std::string toStringCollection(const T *collection, char sep= ' ')
Converts a collection of objects with method toString into a string, using the passed separator to se...
Definition: tostringcollection.h:27
const std::string collectionRefToString(const T &collection, char sep= ' ')
Converts a collection of objects into a string, using the passed separator to separate the elements...
Definition: tostringcollection.h:119
const std::string toStringOriginalCollection(const T *collection, char sep= ' ')
Converts a collection of objects with method toStringOriginal into a string, using the passed separat...
Definition: tostringcollection.h:73