PhoenixInkscape  2.0.0
Generate multiple png files with svg inkscape files
convertToString.h
Go to the documentation of this file.
1 /***************************************
2  Auteur : Pierre Aubert
3  Mail : pierre.aubert@lapp.in2p3.fr
4  Licence : CeCILL-C
5 ****************************************/
6 
7 #ifndef __CONVERTTOSTRING_H__
8 #define __CONVERTTOSTRING_H__
9 
10 #include <string>
11 #include <sstream>
12 
13 // #include <inttypes.h>
14 class PString;
15 class PPath;
16 
17 template<typename T>
18 std::string valueToString(const T & val);
19 template<typename T>
20 T stringToValue(const std::string & str);
21 
22 template<>
23 std::string valueToString<std::string>(const std::string & val);
24 template<>
25 std::string stringToValue<std::string>(const std::string & str);
26 
27 template<>
28 std::string valueToString<PString>(const PString & val);
29 template<>
30 PString stringToValue<PString>(const std::string & str);
31 
32 template<>
33 std::string valueToString<PPath>(const PPath & val);
34 template<>
35 PPath stringToValue<PPath>(const std::string & str);
36 
37 template<>
38 std::string valueToString<bool>(const bool & val);
39 template<>
40 bool stringToValue<bool>(const std::string & str);
41 
42 #include "convertToString_impl.h"
43 
44 #endif
Path of a directory or a file.
Definition: PPath.h:17
Extends the std::string.
Definition: PString.h:16
PPath stringToValue< PPath >(const std::string &str)
Convert a string to value (specialisation for PPath)
std::string valueToString< bool >(const bool &val)
Convert a value to string (specialisation for bool)
PString stringToValue< PString >(const std::string &str)
Convert a string to value (specialisation for PString)
std::string valueToString(const T &val)
Convert a type into a string.
T stringToValue(const std::string &str)
Convert a string into value.
std::string valueToString< PString >(const PString &val)
Convert a value to string (specialisation for PString)
std::string valueToString< PPath >(const PPath &val)
Convert a value to string (specialisation for PPath)
bool stringToValue< bool >(const std::string &str)
Convert a string to value (specialisation for bool)