PhoenixMock  1.8.7
Tools to split/merge/print mock used in Phoenix
convertToString_impl.h File Reference
#include "convertToString.h"
+ Include dependency graph for convertToString_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 >
std::string convertToString (const T &val)
 Convert a type into a string. More...
 
template<typename T >
stringToValue (const std::string &str)
 Convert a string into value. More...
 

Function Documentation

◆ convertToString()

template<typename T >
std::string convertToString ( const T &  val)

Convert a type into a string.

Parameters
val: value to be converted
Returns
converted string

Definition at line 17 of file convertToString_impl.h.

17  {
18  std::stringstream str;
19  str << val;
20  return str.str();
21 }

References createReleaseCurl::str.

Referenced by checkResultConvertToString(), phoenix_check(), phoenix_mockMakeOutputFile(), PLog::resize(), and OptionValue::setDefaultValue().

+ Here is the caller graph for this function:

◆ stringToValue()

template<typename T >
T stringToValue ( const std::string &  str)

Convert a string into value.

Parameters
str: string to be converted
Returns
converted value

Definition at line 28 of file convertToString_impl.h.

28  {
29  std::stringstream strStream;
30  strStream << str;
31  T val;
32  strStream >> val;
33  return val;
34 }

References createReleaseCurl::str.

createReleaseCurl.str
str
Definition: createReleaseCurl.py:128