Implémentation du raytracing pour Global Memory/Shared Memory/Constant Memory
[GPU.git] / WCudaMSE / BilatTools_CPP / src / core / tools / cpp / StringTools.cpp
1 #include <sstream>
2
3 #include "StringTools.h"
4
5 using std::stringstream;
6
7 /*----------------------------------------------------------------------*\
8 |* Implementation *|
9 \*---------------------------------------------------------------------*/
10
11 /*--------------------------------------*\
12 |* Constructor *|
13 \*-------------------------------------*/
14
15 StringTools::StringTools()
16 {
17 // rien
18 }
19
20 StringTools::~StringTools()
21 {
22 // rien
23 }
24
25 /*--------------------------------------*\
26 |* Methodes *|
27 \*-------------------------------------*/
28
29 /*----------------------*\
30 |* static *|
31 \*---------------------*/
32
33 string StringTools::toString(int number)
34 {
35 stringstream ss; //create a stringstream
36 ss << number; //add number to the stream
37 return ss.str(); //return a string with the contents of the stream
38 }
39
40 string StringTools::toString(unsigned int number)
41 {
42 stringstream ss; //create a stringstream
43 ss << number; //add number to the stream
44 return ss.str(); //return a string with the contents of the stream
45 }
46
47 string StringTools::toString(long number)
48 {
49 stringstream ss; //create a stringstream
50 ss << number; //add number to the stream
51 return ss.str(); //return a string with the contents of the stream
52 }
53
54 string StringTools::toString(float number)
55 {
56 stringstream ss; //create a stringstream
57 ss << number; //add number to the stream
58 return ss.str(); //return a string with the contents of the stream
59 }
60
61 string StringTools::toString(double number)
62 {
63 stringstream ss; //create a stringstream
64 ss << number; //add number to the stream
65 return ss.str(); //return a string with the contents of the stream
66 }
67
68 /*----------------------------------------------------------------------*\
69 |* End *|
70 \*---------------------------------------------------------------------*/
71
72
73