File: General.hpp

package info (click to toggle)
openlayer 2.1-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,368 kB
  • ctags: 2,295
  • sloc: ansic: 10,432; cpp: 9,890; xml: 109; makefile: 89; sh: 36
file content (56 lines) | stat: -rw-r--r-- 684 bytes parent folder | download | duplicates (2)
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
#ifndef OL_GENERAL_HPP
#define OL_GENERAL_HPP


#include <sstream>
#include "Declspec.hpp"

namespace ol {


// ToString - Converts a variable to a string //

template< class Type >
std::string ToString( Type value ) {
   std::stringstream s;
   s << value;
   return s.str();
}


template< class Type >
std::string VarToString( Type value ) {
   return ToString( value );
}


OL_LIB_DECLSPEC int ToNextPowOfTwo( int num );


enum Axis {
   X_AXIS,
   Y_AXIS
};


enum OutlineTextureMode {
   SHRINK,
   STRETCH,
   OPTIMIZE
};


enum TextAlignment {
   LEFT,
   RIGHT,
   CENTER,
   JUSTIFY
};


}



#endif // OL_GENERAL_HPP