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 <cmath>
#include <climits> #include <climits>
#include <algorithm>
#include "SpaceGridIterator.h" #include "SpaceGridIterator.h"
using namespace std; using namespace std;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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