mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
infra: allow access to pImpl from the tvg internals.
Since pImpl is an ambiguous pointer, visibility is not practically effective. On the other hand, this allows the tvg engine to easily pass data among instances.
This commit is contained in:
parent
e7a94f5314
commit
93734fe673
1 changed files with 5 additions and 16 deletions
21
inc/thorvg.h
21
inc/thorvg.h
|
@ -57,9 +57,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _TVG_DECLARE_PRIVATE(A) \
|
#define _TVG_DECLARE_PRIVATE(A) \
|
||||||
protected: \
|
|
||||||
struct Impl; \
|
struct Impl; \
|
||||||
Impl* pImpl; \
|
Impl* pImpl; \
|
||||||
|
protected: \
|
||||||
A(const A&) = delete; \
|
A(const A&) = delete; \
|
||||||
const A& operator=(const A&) = delete; \
|
const A& operator=(const A&) = delete; \
|
||||||
A()
|
A()
|
||||||
|
@ -68,25 +68,14 @@ protected: \
|
||||||
A() = delete; \
|
A() = delete; \
|
||||||
~A() = delete
|
~A() = delete
|
||||||
|
|
||||||
#define _TVG_DECLARE_ACCESSOR() \
|
#define _TVG_DECLARE_ACCESSOR(A) \
|
||||||
friend Canvas; \
|
friend A
|
||||||
friend Scene; \
|
|
||||||
friend Shape; \
|
|
||||||
friend Picture; \
|
|
||||||
friend Accessor; \
|
|
||||||
friend IteratorAccessor
|
|
||||||
|
|
||||||
|
|
||||||
namespace tvg
|
namespace tvg
|
||||||
{
|
{
|
||||||
|
|
||||||
class RenderMethod;
|
class RenderMethod;
|
||||||
class IteratorAccessor;
|
class Animation;
|
||||||
class Scene;
|
|
||||||
class Shape;
|
|
||||||
class Picture;
|
|
||||||
class Canvas;
|
|
||||||
class Accessor;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup ThorVG ThorVG
|
* @defgroup ThorVG ThorVG
|
||||||
|
@ -465,7 +454,6 @@ public:
|
||||||
*/
|
*/
|
||||||
uint32_t identifier() const noexcept;
|
uint32_t identifier() const noexcept;
|
||||||
|
|
||||||
_TVG_DECLARE_ACCESSOR();
|
|
||||||
_TVG_DECLARE_PRIVATE(Paint);
|
_TVG_DECLARE_PRIVATE(Paint);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1392,6 +1380,7 @@ public:
|
||||||
*/
|
*/
|
||||||
static uint32_t identifier() noexcept;
|
static uint32_t identifier() noexcept;
|
||||||
|
|
||||||
|
_TVG_DECLARE_ACCESSOR(Animation);
|
||||||
_TVG_DECLARE_PRIVATE(Picture);
|
_TVG_DECLARE_PRIVATE(Picture);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue