Rsh API  SDK 2.1
Документация по программированию
 Указатель Классы Файлы Функции Переменные Определения типов Перечисления Элементы перечислений Друзья Макросы Страницы
RshMacro.h
См. документацию.
1 
22 #ifndef RSH_MACRO_H
23 #define RSH_MACRO_H
24 
25 #include <ostream>
26 #include <limits>
27 #include <math.h>
28 
29 #define RSH_DIM(a) (sizeof(a) / sizeof(a[0]))
30 
31 #define RSH_CMPDOUBLE(a,b) (fabs(a - b) < std::numeric_limits<double>::epsilon())
32 
33 #define RSH_TOSTRING( x ) dynamic_cast< std::ostringstream & >( \
34  ( std::ostringstream() << std::dec << x ) ).str()
35 
36 #define RSH_TOWSTRING( x ) dynamic_cast< std::wstringstream & >( \
37  ( std::wstringstream() << std::dec << x ) ).str()
38 
39 #define rshUTF16(str) RshConvertToUTF16(str)
40 
41 
42 #endif //RSH_MACRO_H