Removed global string include in system_global.h

This commit is contained in:
Michaël Lemaire 2015-12-30 00:43:35 +01:00
parent 61a43410db
commit c1d6a3261c
23 changed files with 49 additions and 21 deletions

View file

@ -2,6 +2,7 @@
#include <cmath>
#include <climits>
#include <algorithm>
#include "SpaceGridIterator.h"
using namespace std;

View file

@ -3,6 +3,8 @@
#include "basics_global.h"
#include <string>
namespace paysages {
namespace basics {

View file

@ -3,6 +3,8 @@
#include "basics_global.h"
#include <string>
namespace paysages {
namespace basics {

View file

@ -3,6 +3,8 @@
#include "basics_global.h"
#include <string>
namespace paysages {
namespace basics {

View file

@ -4,9 +4,9 @@
#include "system_global.h"
#if defined(BASICS_LIBRARY)
#define BASICSSHARED_EXPORT Q_DECL_EXPORT
#define BASICSSHARED_EXPORT DECL_EXPORT
#else
#define BASICSSHARED_EXPORT Q_DECL_IMPORT
#define BASICSSHARED_EXPORT DECL_IMPORT
#endif
namespace paysages {
@ -33,6 +33,7 @@ class InfinitePlane;
}
using namespace paysages::basics;
// Some useful constants
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

View file

@ -3,6 +3,8 @@
#include "definition_global.h"
#include <string>
namespace paysages {
namespace definition {

View file

@ -3,6 +3,7 @@
#include "definition_global.h"
#include <string>
#include <vector>
namespace paysages {

View file

@ -3,6 +3,8 @@
#include "definition_global.h"
#include <string>
namespace paysages {
namespace definition {

View file

@ -4,9 +4,9 @@
#include "basics_global.h"
#if defined(DEFINITION_LIBRARY)
#define DEFINITIONSHARED_EXPORT Q_DECL_EXPORT
#define DEFINITIONSHARED_EXPORT DECL_EXPORT
#else
#define DEFINITIONSHARED_EXPORT Q_DECL_IMPORT
#define DEFINITIONSHARED_EXPORT DECL_IMPORT
#endif
namespace paysages {

View file

@ -62,8 +62,8 @@ void ModelerCameras::startSunTool() {
current->copy(tool);
active = tool;
// FIXME
// parent->getScenery()->getAtmosphere()->propDayTime()->addWatcher(this, true);
startWatching(parent->getScenery(), "/atmosphere/sun/phi");
startWatching(parent->getScenery(), "/atmosphere/sun/theta");
}
void ModelerCameras::endTool() {
@ -81,7 +81,7 @@ void ModelerCameras::timerEvent(QTimerEvent *) {
}
void ModelerCameras::nodeChanged(const DefinitionNode *node, const DefinitionDiff *) {
if (node->getPath() == "/atmosphere/daytime" && tool_mode == TOOL_SUN) {
if (node->getPath().find("/atmosphere/sun/") == 0 and tool_mode == TOOL_SUN) {
Vector3 direction = parent->getRenderer()->getAtmosphereRenderer()->getSunDirection();
tool->setTarget(tool->getLocation().add(direction));
}

View file

@ -5,6 +5,7 @@
#include "SoftwareRenderer.h"
#include <string>
#include <vector>
class QMatrix4x4;

View file

@ -3,6 +3,8 @@
#include "opengl_global.h"
#include <string>
class QOpenGLShaderProgram;
namespace paysages {

View file

@ -4,9 +4,9 @@
#include "software_global.h"
#if defined(OPENGL_LIBRARY)
#define OPENGLSHARED_EXPORT Q_DECL_EXPORT
#define OPENGLSHARED_EXPORT DECL_EXPORT
#else
#define OPENGLSHARED_EXPORT Q_DECL_IMPORT
#define OPENGLSHARED_EXPORT DECL_IMPORT
#endif
namespace paysages {

View file

@ -3,6 +3,7 @@
#include "software_global.h"
#include <string>
#include <vector>
namespace paysages {

View file

@ -3,6 +3,8 @@
#include "software_global.h"
#include <string>
namespace paysages {
namespace software {

View file

@ -5,6 +5,7 @@
#include "SoftwareRenderer.h"
#include <string>
#include <vector>
namespace paysages {

View file

@ -4,9 +4,9 @@
#include "definition_global.h"
#if defined(SOFTWARE_LIBRARY)
#define SOFTWARESHARED_EXPORT Q_DECL_EXPORT
#define SOFTWARESHARED_EXPORT DECL_EXPORT
#else
#define SOFTWARESHARED_EXPORT Q_DECL_IMPORT
#define SOFTWARESHARED_EXPORT DECL_IMPORT
#endif
namespace paysages {

View file

@ -3,6 +3,8 @@
#include "system_global.h"
#include <string>
namespace paysages {
namespace system {

View file

@ -3,6 +3,8 @@
#include "system_global.h"
#include <string>
class QDir;
namespace paysages {

View file

@ -3,6 +3,8 @@
#include "system_global.h"
#include <string>
namespace paysages {
namespace system {

View file

@ -25,18 +25,20 @@ typedef basic_onullstream<char> onullstream;
static onullstream NULL_STREAM;
static bool enabled = true;
ostream &Logs::debug(const string &logger) {
#ifdef NDEBUG
ostream &Logs::debug(const string &) {
return NULL_STREAM;
}
#else
ostream &Logs::debug(const string &logger) {
if (enabled) {
cout << "DEBUG [" << logger << "] ";
return cout;
} else {
return NULL_STREAM;
}
#endif
}
#endif
ostream &Logs::warning(const string &logger) {
if (enabled) {

View file

@ -3,6 +3,8 @@
#include "system_global.h"
#include <string>
namespace paysages {
namespace system {

View file

@ -1,20 +1,18 @@
#ifndef SYSTEM_GLOBAL_H
#define SYSTEM_GLOBAL_H
#include <string>
#ifdef __MINGW32__
#define Q_DECL_EXPORT __declspec(dllexport)
#define Q_DECL_IMPORT __declspec(dllimport)
#define DECL_EXPORT __declspec(dllexport)
#define DECL_IMPORT __declspec(dllimport)
#else
#define Q_DECL_EXPORT __attribute__((visibility("default")))
#define Q_DECL_IMPORT __attribute__((visibility("default")))
#define DECL_EXPORT __attribute__((visibility("default")))
#define DECL_IMPORT __attribute__((visibility("default")))
#endif
#if defined(SYSTEM_LIBRARY)
#define SYSTEMSHARED_EXPORT Q_DECL_EXPORT
#define SYSTEMSHARED_EXPORT DECL_EXPORT
#else
#define SYSTEMSHARED_EXPORT Q_DECL_IMPORT
#define SYSTEMSHARED_EXPORT DECL_IMPORT
#endif
namespace paysages {