Base: split export/import macros from FCConfig.h and move them to FCGlobal.h

The FCGlobal.h can be included in a Global.h header file of an extension module.

The reason is that some IDEs (e.g. QtCreator) fails to detect the export/import macros when only defined in the PreCompiled.h files and thus raise a parser warning.
This commit is contained in:
wmayer
2021-09-14 16:40:30 +02:00
parent 2abe1611f7
commit a40d37a980
44 changed files with 327 additions and 67 deletions

View File

@@ -29,6 +29,9 @@
#include <sstream>
#include <vector>
#include "Vector3D.h"
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
namespace Base
{

View File

@@ -26,6 +26,9 @@
#include <QObject>
#include <QEventLoop>
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
namespace Base {
/**

View File

@@ -25,11 +25,13 @@
#ifndef BASE_FACTORY_H
#define BASE_FACTORY_H
#include<typeinfo>
#include<string>
#include<map>
#include<list>
#include"../FCConfig.h"
#include <typeinfo>
#include <string>
#include <map>
#include <list>
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
namespace Base

View File

@@ -27,6 +27,9 @@
// Std. configurations
#include <string>
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
namespace Base
{

View File

@@ -30,6 +30,9 @@
#include <string>
#include <map>
#include <typeinfo>
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
class QAtomicInt;

View File

@@ -32,6 +32,9 @@
#include <xercesc/util/XercesVersion.hpp>
#include <xercesc/sax/InputSource.hpp>
#include <QTextCodec>
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
XERCES_CPP_NAMESPACE_BEGIN

View File

@@ -25,12 +25,15 @@
#define BASE_MATRIX_H
#include <cassert>
#include <cfloat>
#include <cmath>
#include <cstdio>
#include <string>
#include "Vector3D.h"
#include <float.h>
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
namespace Base {

View File

@@ -22,30 +22,34 @@
#ifndef BASE_MEMDEBUG_H
#define BASE_MEMDEBUG_H
#ifndef FC_GLOBAL_H
#include <crtdbg.h>
#include <FCGlobal.h>
#endif
namespace Base
{
// Std. configurations
#if defined(_MSC_VER)
class BaseExport MemCheck
{
public:
MemCheck();
~MemCheck();
void setNextCheckpoint();
static bool checkMemory();
static bool dumpLeaks();
static bool isValidHeapPointer(const void*);
private:
_CrtMemState s1, s2, s3;
};
#if defined(_MSC_VER)
class BaseExport MemCheck
{
public:
MemCheck();
~MemCheck();
void setNextCheckpoint();
static bool checkMemory();
static bool dumpLeaks();
static bool isValidHeapPointer(const void*);
private:
_CrtMemState s1, s2, s3;
};
#endif
} //namespace Base
#endif // BASE_MEMDEBUG_H

View File

@@ -73,6 +73,9 @@ extern "C" { /* a C library, but callable from C++ */
# undef _POSIX_C_SOURCE
#endif // (re-)defined in pyconfig.h
#include <Python.h>
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
extern int PP_RELOAD; /* 1=reload py modules when attributes referenced */
extern int PP_DEBUG; /* 1=start debugger when string/function/member run */

View File

@@ -25,6 +25,9 @@
#define BASE_ROTATION_H
#include "Vector3D.h"
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
namespace Base {

View File

@@ -36,7 +36,10 @@
// so we need not to check the version (because we only support _MSC_VER >= 1100)!
#pragma once
#include <windows.h>
#include <Windows.h>
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
// special defines for VC5/6 (if no actual PSDK is installed):
#if _MSC_VER < 1300

View File

@@ -24,6 +24,9 @@
#ifndef BASE_TOOLS_H
#define BASE_TOOLS_H
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
#include <functional>
#include <algorithm>
#include <cmath>

View File

@@ -28,11 +28,14 @@
#include <algorithm>
#include <cmath>
#include <cfloat>
#include <stdio.h>
#include <cstdio>
#include <list>
#include <vector>
#include "Vector3D.h"
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
namespace Base {

View File

@@ -26,6 +26,9 @@
#include <CXX/Extensions.hxx>
#include <CXX/Objects.hxx>
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
namespace Base {

View File

@@ -30,6 +30,9 @@
#include <map>
#include <set>
#include <vector>
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
namespace Base
{

View File

@@ -27,6 +27,9 @@
// Std. configurations
#include <string>
#ifndef FC_GLOBAL_H
#include <FCGlobal.h>
#endif
namespace Base
{