Add export statements all over the code

This commit is contained in:
Dmitry Marakasov 2016-05-19 16:25:46 +03:00
parent cc0a188d9f
commit 20bdc36577
19 changed files with 54 additions and 26 deletions

View File

@ -30,6 +30,7 @@
#include <SDL2pp/Optional.hh>
#include <SDL2pp/Config.hh>
#include <SDL2pp/Export.hh>
namespace SDL2pp {
@ -46,7 +47,7 @@ class AudioSpec;
/// audio functionality.
///
////////////////////////////////////////////////////////////
class AudioDevice {
class SDL2PP_EXPORT AudioDevice {
public:
////////////////////////////////////////////////////////////
/// \brief SDL2pp::AudioDevice lock
@ -82,7 +83,7 @@ public:
/// \endcode
///
////////////////////////////////////////////////////////////
class LockHandle {
class SDL2PP_EXPORT LockHandle {
friend class AudioDevice;
private:
AudioDevice* device_; ///< SDL2pp::AudioDevice the lock belongs to

View File

@ -24,6 +24,8 @@
#include <SDL2/SDL_audio.h>
#include <SDL2pp/Export.hh>
namespace SDL2pp {
////////////////////////////////////////////////////////////
@ -41,7 +43,7 @@ namespace SDL2pp {
/// \see http://wiki.libsdl.org/SDL_AudioSpec
///
////////////////////////////////////////////////////////////
class AudioSpec : public SDL_AudioSpec {
class SDL2PP_EXPORT AudioSpec : public SDL_AudioSpec {
public:
////////////////////////////////////////////////////////////
/// \brief Create empty (invalid) audio format specification

View File

@ -26,6 +26,8 @@
#include <SDL2/SDL_mixer.h>
#include <SDL2pp/Export.hh>
namespace SDL2pp {
class RWops;
@ -38,7 +40,7 @@ class RWops;
/// \headerfile SDL2pp/Chunk.hh
///
////////////////////////////////////////////////////////////
class Chunk {
class SDL2PP_EXPORT Chunk {
private:
Mix_Chunk* chunk_; ///< Managed Mix_Chunk object

View File

@ -25,6 +25,8 @@
#include <string>
#include <stdexcept>
#include <SDL2pp/Export.hh>
namespace SDL2pp {
////////////////////////////////////////////////////////////
@ -66,7 +68,7 @@ namespace SDL2pp {
/// \endcode
///
////////////////////////////////////////////////////////////
class Exception : public std::runtime_error {
class SDL2PP_EXPORT Exception : public std::runtime_error {
private:
std::string sdl_function_; ///< SDL function which caused an error
std::string sdl_error_; ///< SDL error string

View File

@ -29,6 +29,7 @@
#include <SDL2pp/Optional.hh>
#include <SDL2pp/Point.hh>
#include <SDL2pp/Surface.hh>
#include <SDL2pp/Export.hh>
namespace SDL2pp {
@ -44,7 +45,7 @@ class RWops;
/// \see https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf.html#SEC56
///
////////////////////////////////////////////////////////////
class Font {
class SDL2PP_EXPORT Font {
private:
TTF_Font* font_; ///< Managed TTF_Font object

View File

@ -26,9 +26,10 @@
#include <memory>
#include <SDL2/SDL_stdinc.h>
#include <SDL2/SDL_mixer.h>
#include <SDL2pp/Export.hh>
namespace SDL2pp {
class Chunk;
@ -46,7 +47,7 @@ class Music;
/// SDL2pp:Chunk's.
///
////////////////////////////////////////////////////////////
class Mixer {
class SDL2PP_EXPORT Mixer {
public:
typedef void (*ChannelFinishedHandler)(int); ///< Function type for channel finished callback
typedef void (*MusicFinishedHandler)(); ///< Function type for music finished callback

View File

@ -26,6 +26,8 @@
#include <SDL2/SDL_mixer.h>
#include <SDL2pp/Export.hh>
namespace SDL2pp {
////////////////////////////////////////////////////////////
@ -36,7 +38,7 @@ namespace SDL2pp {
/// \headerfile SDL2pp/Music.hh
///
////////////////////////////////////////////////////////////
class Music {
class SDL2PP_EXPORT Music {
private:
Mix_Music* music_; ///< Managed Mix_Music object

View File

@ -27,6 +27,8 @@
#include <SDL2/SDL_rect.h>
#include <SDL2pp/Export.hh>
namespace SDL2pp {
class Rect;
@ -46,7 +48,7 @@ class Rect;
/// \see http://wiki.libsdl.org/SDL_Point
///
////////////////////////////////////////////////////////////
class Point : public SDL_Point {
class SDL2PP_EXPORT Point : public SDL_Point {
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -459,7 +461,7 @@ constexpr bool operator!=(const SDL2pp::Point& a, const SDL2pp::Point& b) {
/// \returns True if a < b
///
////////////////////////////////////////////////////////////
bool operator<(const SDL2pp::Point& a, const SDL2pp::Point& b);
SDL2PP_EXPORT bool operator<(const SDL2pp::Point& a, const SDL2pp::Point& b);
////////////////////////////////////////////////////////////
/// \brief Stream output operator overload for SDL2pp::Point
@ -470,7 +472,7 @@ bool operator<(const SDL2pp::Point& a, const SDL2pp::Point& b);
/// \returns stream
///
////////////////////////////////////////////////////////////
std::ostream& operator<<(std::ostream& stream, const SDL2pp::Point& point);
SDL2PP_EXPORT std::ostream& operator<<(std::ostream& stream, const SDL2pp::Point& point);
namespace std {

View File

@ -26,6 +26,7 @@
#include <SDL2/SDL_rwops.h>
#include <SDL2pp/Exception.hh>
#include <SDL2pp/Export.hh>
namespace SDL2pp {
@ -44,7 +45,7 @@ namespace SDL2pp {
/// \see SDL2pp::ContainerRWops, SDL2pp::StreamRWops
///
////////////////////////////////////////////////////////////
class CustomRWops {
class SDL2PP_EXPORT CustomRWops {
public:
////////////////////////////////////////////////////////////
/// \brief Destructor
@ -142,7 +143,7 @@ public:
/// make it possible to write pure C++ %RWops classes, in a safe way.
///
////////////////////////////////////////////////////////////
class RWops {
class SDL2PP_EXPORT RWops {
protected:
SDL_RWops* rwops_; ///< Managed SDL_RWops object

View File

@ -28,6 +28,7 @@
#include <SDL2pp/Optional.hh>
#include <SDL2pp/Point.hh>
#include <SDL2pp/Export.hh>
namespace SDL2pp {
@ -46,7 +47,7 @@ namespace SDL2pp {
/// \see http://wiki.libsdl.org/SDL_Rect
///
////////////////////////////////////////////////////////////
class Rect : public SDL_Rect {
class SDL2PP_EXPORT Rect : public SDL_Rect {
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -620,7 +621,7 @@ constexpr bool operator!=(const SDL2pp::Rect& a, const SDL2pp::Rect& b) {
/// \returns True if a < b
///
////////////////////////////////////////////////////////////
bool operator<(const SDL2pp::Rect& a, const SDL2pp::Rect& b);
SDL2PP_EXPORT bool operator<(const SDL2pp::Rect& a, const SDL2pp::Rect& b);
////////////////////////////////////////////////////////////
/// \brief Stream output operator overload for SDL2pp::Rect
@ -631,7 +632,7 @@ bool operator<(const SDL2pp::Rect& a, const SDL2pp::Rect& b);
/// \returns stream
///
////////////////////////////////////////////////////////////
std::ostream& operator<<(std::ostream& stream, const SDL2pp::Rect& rect);
SDL2PP_EXPORT std::ostream& operator<<(std::ostream& stream, const SDL2pp::Rect& rect);
namespace std {

View File

@ -29,6 +29,7 @@
#include <SDL2pp/Optional.hh>
#include <SDL2pp/Point.hh>
#include <SDL2pp/Rect.hh>
#include <SDL2pp/Export.hh>
struct SDL_RendererInfo;
struct SDL_Renderer;
@ -47,7 +48,7 @@ class Point;
/// \headerfile SDL2pp/Renderer.hh
///
////////////////////////////////////////////////////////////
class Renderer {
class SDL2PP_EXPORT Renderer {
private:
SDL_Renderer* renderer_; ///< Managed SDL_Renderer object

View File

@ -24,6 +24,8 @@
#include <SDL2/SDL_stdinc.h>
#include <SDL2pp/Export.hh>
namespace SDL2pp {
////////////////////////////////////////////////////////////
@ -54,7 +56,7 @@ namespace SDL2pp {
/// \endcode
///
////////////////////////////////////////////////////////////
class SDL {
class SDL2PP_EXPORT SDL {
public:
////////////////////////////////////////////////////////////
/// \brief Initializes SDL2 library

View File

@ -22,6 +22,8 @@
#ifndef SDL2PP_SDLIMAGE_HH
#define SDL2PP_SDLIMAGE_HH
#include <SDL2pp/Export.hh>
namespace SDL2pp {
////////////////////////////////////////////////////////////
@ -53,7 +55,7 @@ namespace SDL2pp {
/// \endcode
///
////////////////////////////////////////////////////////////
class SDLImage {
class SDL2PP_EXPORT SDLImage {
public:
////////////////////////////////////////////////////////////
/// \brief Initializes SDL_image library

View File

@ -22,6 +22,8 @@
#ifndef SDL2PP_SDLMIXER_HH
#define SDL2PP_SDLMIXER_HH
#include <SDL2pp/Export.hh>
namespace SDL2pp {
////////////////////////////////////////////////////////////
@ -44,7 +46,7 @@ namespace SDL2pp {
/// \endcode
///
////////////////////////////////////////////////////////////
class SDLMixer {
class SDL2PP_EXPORT SDLMixer {
public:
////////////////////////////////////////////////////////////
/// \brief Initializes SDL_mixer library

View File

@ -22,6 +22,8 @@
#ifndef SDL2PP_SDLTTF_HH
#define SDL2PP_SDLTTF_HH
#include <SDL2pp/Export.hh>
namespace SDL2pp {
////////////////////////////////////////////////////////////
@ -51,7 +53,7 @@ namespace SDL2pp {
/// \endcode
///
////////////////////////////////////////////////////////////
class SDLTTF {
class SDL2PP_EXPORT SDLTTF {
public:
////////////////////////////////////////////////////////////
/// \brief Initializes SDL_ttf library

View File

@ -29,6 +29,7 @@
#include <SDL2pp/Optional.hh>
#include <SDL2pp/Rect.hh>
#include <SDL2pp/Point.hh>
#include <SDL2pp/Export.hh>
struct SDL_Surface;
struct SDL_PixelFormat;
@ -48,7 +49,7 @@ class RWops;
/// \see http://wiki.libsdl.org/SDL_Surface
///
////////////////////////////////////////////////////////////
class Surface {
class SDL2PP_EXPORT Surface {
private:
SDL_Surface* surface_; ///< Managed SDL_Surface object

View File

@ -30,6 +30,7 @@
#include <SDL2pp/Optional.hh>
#include <SDL2pp/Rect.hh>
#include <SDL2pp/Config.hh>
#include <SDL2pp/Export.hh>
struct SDL_Texture;
@ -48,7 +49,7 @@ class Surface;
/// \headerfile SDL2pp/Texture.hh
///
////////////////////////////////////////////////////////////
class Texture {
class SDL2PP_EXPORT Texture {
private:
SDL_Texture* texture_; ///< Managed SDL_Texture object

View File

@ -25,6 +25,7 @@
#include <string>
#include <SDL2pp/AudioSpec.hh>
#include <SDL2pp/Export.hh>
namespace SDL2pp {
@ -48,7 +49,7 @@ class RWops;
/// See audio_wav demo for an example.
///
////////////////////////////////////////////////////////////
class Wav {
class SDL2PP_EXPORT Wav {
private:
Uint8* audio_buffer_; ///< Raw audio data
Uint32 audio_length_; ///< Raw audio data length in bytes

View File

@ -28,6 +28,7 @@
#include <SDL2/SDL_video.h>
#include <SDL2pp/Point.hh>
#include <SDL2pp/Export.hh>
struct SDL_Window;
@ -62,7 +63,7 @@ class Surface;
/// \endcode
///
////////////////////////////////////////////////////////////
class Window {
class SDL2PP_EXPORT Window {
private:
SDL_Window* window_; ///< Managed SDL2_Window object