blob: 5eaaf09b63f90d7c9347327f2ac79d2b4ea02665 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
// Copyright 2008 Nanorex, Inc. See LICENSE file for details.
#ifndef NX_UTILITY_H
#define NX_UTILITY_H
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef WIN32
# ifdef _MSC_VER
# pragma warning(disable:4786)
# endif
#endif
#include <string>
#include <iostream>
namespace Nanorex {
/* CLASS: NXUtility */
/**
* Miscellaneous utility functions.
* @ingroup NanorexUtility
*/
class NXUtility {
public:
static std::string itos(int i);
static std::string itos(unsigned int i);
static std::string itos(unsigned long i);
static std::string PaddedString(int i, int length);
static std::string dtos(double d);
private:
};
/* CLASS: NXException */
/**
* A simple exception class.
* @ingroup NanorexUtility
*/
class NXException {
public:
NXException() {};
NXException(const std::string& message) { this->message = message; }
const std::string& getMessage() const { return message; }
private:
std::string message;
};
} // Nanorex::
#endif
|