From 27d3b068d628cfbab0e86478fbb18a6e860e5036 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 12 May 2019 19:00:21 +0800 Subject: [PATCH] Support building NLMISC as dll --- code/nel/include/nel/misc/aabbox.h | 2 +- code/nel/include/nel/misc/app_context.h | 4 ++-- code/nel/include/nel/misc/command.h | 4 ++-- code/nel/include/nel/misc/config_file.h | 2 +- code/nel/include/nel/misc/event_listener.h | 2 +- code/nel/include/nel/misc/matrix.h | 2 +- code/nel/include/nel/misc/mem_displayer.h | 2 +- code/nel/include/nel/misc/noise_value.h | 9 +-------- code/nel/include/nel/misc/polygon.h | 6 +++--- code/nel/include/nel/misc/quat.h | 4 ++-- code/nel/include/nel/misc/rgba.h | 4 ++-- code/nel/include/nel/misc/stream.h | 4 ++-- code/nel/include/nel/misc/thread.h | 2 +- 13 files changed, 20 insertions(+), 27 deletions(-) diff --git a/code/nel/include/nel/misc/aabbox.h b/code/nel/include/nel/misc/aabbox.h index 2468c7158..5a88ac5ee 100644 --- a/code/nel/include/nel/misc/aabbox.h +++ b/code/nel/include/nel/misc/aabbox.h @@ -151,7 +151,7 @@ public: * \author Nevrax France * \date 2000 */ -class CAABBoxExt : private CAABBox +class NLMISC_API CAABBoxExt : private CAABBox { protected: float RadiusMin, RadiusMax; diff --git a/code/nel/include/nel/misc/app_context.h b/code/nel/include/nel/misc/app_context.h index 2722146d4..7c1b5da84 100644 --- a/code/nel/include/nel/misc/app_context.h +++ b/code/nel/include/nel/misc/app_context.h @@ -104,7 +104,7 @@ namespace NLMISC * \author Boris 'SoniX' Boucher * \date 2005 */ - class CApplicationContext : public INelContext + class NLMISC_API CApplicationContext : public INelContext { public: CApplicationContext(); @@ -160,7 +160,7 @@ namespace NLMISC * \author Boris 'SoniX' Boucher * \date 2005 */ - class CLibraryContext : public INelContext + class NLMISC_API CLibraryContext : public INelContext { public: CLibraryContext (INelContext &applicationContext); diff --git a/code/nel/include/nel/misc/command.h b/code/nel/include/nel/misc/command.h index 8e03de347..7fcf5b3bd 100644 --- a/code/nel/include/nel/misc/command.h +++ b/code/nel/include/nel/misc/command.h @@ -227,7 +227,7 @@ struct TCommandHandlerClassInfo * \author Nevrax France * \date 2005 */ -class ICommandsHandler +class NLMISC_API ICommandsHandler { /// Store the class name after handler registration const std::string *_ClassName; @@ -556,7 +556,7 @@ struct TCommandHandler : public TCommandHandlerInfo * \author Nevrax France * \date 2005 */ -class CCommandRegistry +class NLMISC_API CCommandRegistry { // this class is a safe singleton (dll friendly) NLMISC_SAFE_SINGLETON_DECL(CCommandRegistry); diff --git a/code/nel/include/nel/misc/config_file.h b/code/nel/include/nel/misc/config_file.h index e67778881..af8101eb8 100644 --- a/code/nel/include/nel/misc/config_file.h +++ b/code/nel/include/nel/misc/config_file.h @@ -120,7 +120,7 @@ public: * \author Nevrax France * \date 2000 */ - struct CVar + struct NLMISC_API CVar { public: diff --git a/code/nel/include/nel/misc/event_listener.h b/code/nel/include/nel/misc/event_listener.h index 1849008ea..cb43d87f1 100644 --- a/code/nel/include/nel/misc/event_listener.h +++ b/code/nel/include/nel/misc/event_listener.h @@ -77,7 +77,7 @@ private: * \author Nevrax France * \date 2000 */ -class CEventListenerAsync: public IEventListener +class NLMISC_API CEventListenerAsync : public IEventListener { public: diff --git a/code/nel/include/nel/misc/matrix.h b/code/nel/include/nel/misc/matrix.h index 1dd252081..653a1f674 100644 --- a/code/nel/include/nel/misc/matrix.h +++ b/code/nel/include/nel/misc/matrix.h @@ -356,7 +356,7 @@ public: // Friend. /// Plane (line vector) multiplication. - friend CPlane operator*(const CPlane &p, const CMatrix &m); + NLMISC_API friend CPlane operator*(const CPlane &p, const CMatrix &m); private: diff --git a/code/nel/include/nel/misc/mem_displayer.h b/code/nel/include/nel/misc/mem_displayer.h index 6365a8872..feba973a8 100644 --- a/code/nel/include/nel/misc/mem_displayer.h +++ b/code/nel/include/nel/misc/mem_displayer.h @@ -72,7 +72,7 @@ protected: * \author Nevrax France * \date 2002 */ -class CLightMemDisplayer : public CMemDisplayer +class NLMISC_API CLightMemDisplayer : public CMemDisplayer { public: /// Constructor diff --git a/code/nel/include/nel/misc/noise_value.h b/code/nel/include/nel/misc/noise_value.h index 803dbb454..c00001feb 100644 --- a/code/nel/include/nel/misc/noise_value.h +++ b/code/nel/include/nel/misc/noise_value.h @@ -22,14 +22,9 @@ #include "stream.h" #include "rgba.h" - namespace NLMISC { - - - - // *************************************************************************** /** * A class which generate noisy value, according to a position @@ -77,7 +72,7 @@ private: * \author Nevrax France * \date 2001 */ -class CNoiseColorGradient +class NLMISC_API CNoiseColorGradient { public: /// Abs and Rand should be 0 and 1 here. If not, some colors may not be generated... @@ -96,10 +91,8 @@ public: }; - } // NL3D - #endif // NL_NOISE_VALUE_H /* End of noise_value.h */ diff --git a/code/nel/include/nel/misc/polygon.h b/code/nel/include/nel/misc/polygon.h index 81a85ac53..af6a872bb 100644 --- a/code/nel/include/nel/misc/polygon.h +++ b/code/nel/include/nel/misc/polygon.h @@ -116,7 +116,7 @@ public: /** * A 2d convex polygon */ -class CPolygon2D +class NLMISC_API CPolygon2D { public: typedef std::vector TVec2fVect; @@ -223,8 +223,8 @@ private: }; // comparison of 2D polygon -bool operator == (const CPolygon2D &lhs, const CPolygon2D &rhs); -bool operator < (const CPolygon2D &lhs, const CPolygon2D &rhs); +NLMISC_API bool operator==(const CPolygon2D &lhs, const CPolygon2D &rhs); +NLMISC_API bool operator<(const CPolygon2D &lhs, const CPolygon2D &rhs); } // NLMISC diff --git a/code/nel/include/nel/misc/quat.h b/code/nel/include/nel/misc/quat.h index 6f4a73d66..99aa97207 100644 --- a/code/nel/include/nel/misc/quat.h +++ b/code/nel/include/nel/misc/quat.h @@ -488,7 +488,7 @@ void CQuatT::makeClosest(const CQuatT &o) class CQuat : public CQuatT { public: - static const CQuat Identity; + NLMISC_API static const CQuat Identity; /// \name Object // @{ @@ -515,7 +515,7 @@ public: class CQuatD : public CQuatT { public: - static const CQuatD Identity; + NLMISC_API static const CQuatD Identity; /// \name Object // @{ diff --git a/code/nel/include/nel/misc/rgba.h b/code/nel/include/nel/misc/rgba.h index 48faa2411..1eb47a308 100644 --- a/code/nel/include/nel/misc/rgba.h +++ b/code/nel/include/nel/misc/rgba.h @@ -386,7 +386,7 @@ public: * \author Nevrax France * \date 2000 */ -class CBGRA +class NLMISC_API CBGRA { public: @@ -495,7 +495,7 @@ inline CRGBA blend(CRGBA c0, CRGBA c1, U blendFactor) * \author Nevrax France * \date 2000 */ -class CRGBAF +class NLMISC_API CRGBAF { public: /// Default constructor. do nothing diff --git a/code/nel/include/nel/misc/stream.h b/code/nel/include/nel/misc/stream.h index 99fbd1a5a..02453e220 100644 --- a/code/nel/include/nel/misc/stream.h +++ b/code/nel/include/nel/misc/stream.h @@ -74,9 +74,9 @@ struct EStream : public Exception EStream( const std::string& str ) : Exception( str ) {} - EStream( const IStream &f ); + NLMISC_API EStream(const IStream &f); - EStream( const IStream &f, const std::string& str ); + NLMISC_API EStream(const IStream &f, const std::string &str); virtual ~EStream() throw() {} diff --git a/code/nel/include/nel/misc/thread.h b/code/nel/include/nel/misc/thread.h index e2dfcc3c7..c02395d3a 100644 --- a/code/nel/include/nel/misc/thread.h +++ b/code/nel/include/nel/misc/thread.h @@ -84,7 +84,7 @@ enum TThreadPriority * \author Nevrax France * \date 2000 */ -class IThread +class NLMISC_API IThread { public: