source: PSPA/Interface_Web/trunk/pspaWT/sources/controler/include/mixedTools.h @ 386

Last change on this file since 386 was 287, checked in by garnier, 11 years ago

ajout de tooltip et nettoyage de code

File size: 567 bytes
Line 
1#ifndef MIXEDTOOLS_SEEN
2#define MIXEDTOOLS_SEEN
3
4#include <iostream>
5#include <sstream>
6#include <string>
7
8
9class mixedTools
10{
11public:
12   
13    static string doubleToString(double x)
14    {
15        std::ostringstream ostr;
16        ostr << x;
17        return ostr.str();
18    }
19    static string intToString(int x)
20    {
21        std::ostringstream ostr;
22        ostr << x;
23        return ostr.str();
24    }
25    static string boolToString(bool x)
26    {
27        if (x) {
28            return "true";
29        } else {
30            return "false";
31        }
32    }
33};
34   
35#endif
Note: See TracBrowser for help on using the repository browser.