paysages3d/src/system/system_global.h

51 lines
1.2 KiB
C
Raw Normal View History

2013-10-20 12:34:55 +00:00
#ifndef SYSTEM_GLOBAL_H
#define SYSTEM_GLOBAL_H
2016-07-07 22:19:45 +00:00
#if defined(__MINGW32__) || defined(_WIN32)
#define DECL_EXPORT __declspec(dllexport)
#define DECL_IMPORT __declspec(dllimport)
2016-07-07 22:19:45 +00:00
#define PLATFORM_WIN 1
#else
#define DECL_EXPORT __attribute__((visibility("default")))
#define DECL_IMPORT __attribute__((visibility("default")))
2016-07-07 22:19:45 +00:00
#define PLATFORM_UNIX 1
2014-03-01 00:34:34 +00:00
#endif
2013-11-11 12:56:39 +00:00
#if defined(SYSTEM_LIBRARY)
#define SYSTEMSHARED_EXPORT DECL_EXPORT
#else
#define SYSTEMSHARED_EXPORT DECL_IMPORT
#endif
2013-10-20 12:34:55 +00:00
2013-11-11 12:56:39 +00:00
namespace paysages {
namespace system {
class Logs;
class PackStream;
class ParallelWork;
class ParallelPool;
class ParallelWorker;
class Thread;
class Mutex;
class Semaphore;
class PictureWriter;
class Timing;
class RandomGenerator;
2015-12-15 23:31:07 +00:00
extern SYSTEMSHARED_EXPORT RandomGenerator &RandomGeneratorDefault;
2013-11-11 12:56:39 +00:00
}
2013-10-20 12:34:55 +00:00
}
using namespace paysages::system;
2015-12-10 23:36:50 +00:00
using namespace std;
2015-12-15 23:31:07 +00:00
// Some useful casts
#define to_double(_x_) (static_cast<double>(_x_))
#define to_float(_x_) (static_cast<float>(_x_))
2015-12-17 00:13:20 +00:00
#define trunc_to_int(_x_) (static_cast<int>(_x_))
2015-12-15 23:31:07 +00:00
#define round_to_int(_x_) (static_cast<int>(round(_x_)))
#define floor_to_int(_x_) (static_cast<int>(floor(_x_)))
#define ceil_to_int(_x_) (static_cast<int>(ceil(_x_)))
#define to_size(_x_) (static_cast<unsigned long>(_x_))
2013-10-20 12:34:55 +00:00
#endif // SYSTEM_GLOBAL_H