PhoenixMock  1.8.7
Tools to split/merge/print mock used in Phoenix
print_string_impl.h File Reference
#include "print_string.h"
+ Include dependency graph for print_string_impl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
void phoenix_print (const std::list< T > &data, const std::string &suffix, const std::string &prefix)
 Print data. More...
 
template<typename T , typename U >
void phoenix_print (const std::map< T, std::vector< U > > &data, const std::string &suffix, const std::string &prefix)
 Print data. More...
 
template<typename T , typename U >
void phoenix_print (const std::map< T, U > &data, const std::string &suffix, const std::string &prefix)
 Print data. More...
 
template<typename T >
void phoenix_print (const std::vector< std::vector< T > > &data, const std::string &suffix, const std::string &prefix)
 Print data. More...
 
template<typename T >
void phoenix_print (const std::vector< T > &data, const std::string &suffix, const std::string &prefix)
 Print data. More...
 
template<typename T >
void phoenix_print (const T &data, const std::string &suffix, const std::string &prefix)
 Print data. More...
 

Function Documentation

◆ phoenix_print() [1/6]

template<typename T >
void phoenix_print ( const std::list< T > &  data,
const std::string &  suffix,
const std::string &  prefix 
)

Print data.

Parameters
data: data to be printed
suffix: suffix to be printed on each string
prefix: prefix to be printed on each string

Definition at line 28 of file print_string_impl.h.

28  {
29  for(typename std::list<T>::const_iterator it(data.begin()); it != data.end(); ++it){
30  std::cout << prefix << *it << suffix << std::endl;
31  }
32 }

◆ phoenix_print() [2/6]

template<typename T , typename U >
void phoenix_print ( const std::map< T, std::vector< U > > &  data,
const std::string &  suffix,
const std::string &  prefix 
)

Print data.

Parameters
data: data to be printed
suffix: suffix to be printed on each string
prefix: prefix to be printed on each string

Definition at line 77 of file print_string_impl.h.

77  {
78  for(typename std::map<T, std::vector<U> >::const_iterator itEntry(data.begin()); itEntry != data.end(); ++itEntry){
79  std::cout << prefix << itEntry->first << " => ";
80 
81  for(typename std::vector<U>::const_iterator it(itEntry->second.begin()); it != itEntry->second.end(); ++it){
82  std::cout << *it << ", ";
83  }
84 
85  std::cout << suffix << std::endl;
86  }
87 }

◆ phoenix_print() [3/6]

template<typename T , typename U >
void phoenix_print ( const std::map< T, U > &  data,
const std::string &  suffix,
const std::string &  prefix 
)

Print data.

Parameters
data: data to be printed
suffix: suffix to be printed on each string
prefix: prefix to be printed on each string

Definition at line 65 of file print_string_impl.h.

65  {
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;
68  }
69 }

◆ phoenix_print() [4/6]

template<typename T >
void phoenix_print ( const std::vector< std::vector< T > > &  data,
const std::string &  suffix,
const std::string &  prefix 
)

Print data.

Parameters
data: data to be printed
suffix: suffix to be printed on each string
prefix: prefix to be printed on each string

Definition at line 52 of file print_string_impl.h.

52  {
53  for(typename std::vector<std::vector<T> >::const_iterator it(data.begin()); it != data.end(); ++it){
54  phoenix_print(*it, suffix, prefix);
55  std::cout << std::endl;
56  }
57 }

References phoenix_print().

+ Here is the call graph for this function:

◆ phoenix_print() [5/6]

template<typename T >
void phoenix_print ( const std::vector< T > &  data,
const std::string &  suffix,
const std::string &  prefix 
)

Print data.

Parameters
data: data to be printed
suffix: suffix to be printed on each string
prefix: prefix to be printed on each string

Definition at line 40 of file print_string_impl.h.

40  {
41  for(typename std::vector<T>::const_iterator it(data.begin()); it != data.end(); ++it){
42  std::cout << prefix << *it << suffix << std::endl;
43  }
44 }

◆ phoenix_print() [6/6]

template<typename T >
void phoenix_print ( const T &  data,
const std::string &  suffix,
const std::string &  prefix 
)

Print data.

Parameters
data: data to be printed
suffix: suffix to be printed on each string
prefix: prefix to be printed on each string

Definition at line 18 of file print_string_impl.h.

18  {
19  std::cout << prefix << data << suffix << std::endl;
20 }

Referenced by phoenix_print(), printValueOfOpt(), printValueOfOptConst(), testOptionValue(), testPrintString(), testVectorSplit(), and testVectorSplit2().

+ Here is the caller graph for this function:
phoenix_print
void phoenix_print(const T &data, const std::string &suffix, const std::string &prefix)
Print data.
Definition: print_string_impl.h:18