7 #ifndef __PRINT_STRING_IMPL_H__
8 #define __PRINT_STRING_IMPL_H__
18 void phoenix_print(
const T & data,
const std::string& suffix,
const std::string & prefix){
19 std::cout << prefix << data << suffix << std::endl;
28 void phoenix_print(
const std::list<T> & data,
const std::string& suffix,
const std::string & prefix){
29 for(
typename std::list<T>::const_iterator it(data.begin()); it != data.end(); ++it){
30 std::cout << prefix << *it << suffix << std::endl;
40 void phoenix_print(
const std::vector<T> & data,
const std::string& suffix,
const std::string & prefix){
41 for(
typename std::vector<T>::const_iterator it(data.begin()); it != data.end(); ++it){
42 std::cout << prefix << *it << suffix << std::endl;
52 void phoenix_print(
const std::vector<std::vector<T> > & data,
const std::string& suffix,
const std::string & prefix){
53 for(
typename std::vector<std::vector<T> >::const_iterator it(data.begin()); it != data.end(); ++it){
55 std::cout << std::endl;
64 template<
typename T,
typename U>
65 void phoenix_print(
const std::map<T, U> & data,
const std::string& suffix,
const std::string & prefix){
66 for(
typename std::map<T, U>::const_iterator it(data.begin()); it != data.end(); ++it){
67 std::cout << prefix << it->first << suffix <<
" => " << it->second << std::endl;
76 template<
typename T,
typename U>
77 void phoenix_print(
const std::map<T, std::vector<U> > & data,
const std::string& suffix,
const std::string & prefix){
78 for(
typename std::map<T, std::vector<U> >::const_iterator itEntry(data.begin()); itEntry != data.end(); ++itEntry){
79 std::cout << prefix << itEntry->first <<
" => ";
81 for(
typename std::vector<U>::const_iterator it(itEntry->second.begin()); it != itEntry->second.end(); ++it){
82 std::cout << *it <<
", ";
85 std::cout << suffix << std::endl;