author | Markus Bröker <mbroeker@largo.homelinux.org> |
Sat, 13 Dec 2008 15:45:18 +0100 | |
changeset 0 | 826dd5531eb0 |
permissions | -rw-r--r-- |
0
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
1 |
/* |
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
2 |
* $Id: tools.cpp 54 2008-01-10 00:24:52Z mbroeker $ |
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
3 |
* $URL: http://localhost/svn/cpp/qMonitor/trunk/tools.cpp $ |
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
4 |
*/ |
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
5 |
|
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
6 |
#include <tools.h> |
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
7 |
|
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
8 |
std::string itoa (const int &i) |
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
9 |
{ |
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
10 |
std::stringstream o; |
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
11 |
|
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
12 |
if (!(o << i)) |
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
13 |
return "ERROR"; |
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
14 |
return o.str (); |
826dd5531eb0
svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff
changeset
|
15 |
} |