Add Plugin as friend to wrapped class.

This commit is contained in:
Kirigaya Kazuto 2017-07-01 17:11:06 +08:00
parent f500a470f6
commit c6f54fa3cb
9 changed files with 25 additions and 0 deletions

View File

@ -3,6 +3,7 @@
#include "_SystemCursorType.h"
#include "Point.h"
#include "Surface.h"
#include "__Plugin.h"
#include "begin_code.h"
class Cursor
{
@ -26,5 +27,7 @@ private:
void _set_no_delete(SDL_Cursor*);
SDL_Cursor* _get();
void _clear();
friend class _internal::Plugin;
};
#include "end_code.h"

View File

@ -7,6 +7,7 @@
#include "Texture.h"
#include "Renderer.h"
#include <vector>
#include "__Plugin.h"
#include "begin_code.h"
class Font
{
@ -118,5 +119,7 @@ private:
void _set(TTF_Font*);
void _clear();
TTF_Font* _get() const;
friend class _internal::Plugin;
};
#include "end_code.h"

View File

@ -5,6 +5,7 @@
#include "ErrorViewer.h"
#include "Audio.h"
#include "__Noncopyable.h"
#include "__Plugin.h"
#include "begin_code.h"
/// Forward Declaration
class Music
@ -19,7 +20,9 @@ private:
void _set(Mix_Music*);
void _clear();
Mix_Music* _get() const;
friend class MusicPlayer;
friend class _internal::Plugin;
};
class MusicPlayer : public AudioPlayer, public NonCopyable

View File

@ -3,6 +3,7 @@
#include <cstdio>
#include <string>
#include <memory>
#include "__Plugin.h"
#include "begin_code.h"
class RWOP
{
@ -22,5 +23,7 @@ private:
void _set(SDL_RWops*);
friend class Surface;
friend class Renderer;
friend class _internal::Plugin;
};
#include "end_code.h"

View File

@ -5,6 +5,7 @@
#include "Window.h"
#include "Surface.h"
#include "Texture.h"
#include "__Plugin.h"
#include <initializer_list>
#include "begin_code.h"
class Renderer
@ -145,5 +146,7 @@ private:
void _set(SDL_Renderer*);
void _clear();
SDL_Renderer* _get() const;
friend class _internal::Plugin;
};
#include "end_code.h"

View File

@ -4,6 +4,7 @@
#include <string>
#include "Audio.h"
#include "ErrorViewer.h"
#include "__Plugin.h"
#include "begin_code.h"
class Sound
{
@ -19,6 +20,7 @@ private:
Mix_Chunk* _get() const;
friend class Channel;
friend class _internal::Plugin;
};
class Channel

View File

@ -5,6 +5,7 @@
#include "Point.h"
#include "RWOP.h"
#include "ErrorViewer.h"
#include "__Plugin.h"
#include "begin_code.h"
class Surface
{
@ -81,6 +82,8 @@ private:
friend class Renderer;
friend class Font;
friend class Cursor;
friend class _internal::Plugin;
};
#include "end_code.h"

View File

@ -4,6 +4,7 @@
#include "RGBA.h"
#include "ColorMode.h"
#include "_BlendMode.h"
#include "__Plugin.h"
#include <memory>
#include "begin_code.h"
@ -40,6 +41,8 @@ private:
SDL_Texture* _get() const;
Rect _rect;
friend class Renderer;
friend class _internal::Plugin;
};
#include "end_code.h"

View File

@ -5,6 +5,7 @@
#include "ErrorViewer.h"
#include "MessageBox.h"
#include "Surface.h"
#include "__Plugin.h"
#include "begin_code.h"
class Window
{
@ -62,5 +63,6 @@ private:
SDL_Window* _get() const;
friend class Renderer;
friend class _internal::Plugin;
};
#include "end_code.h"