diff --git a/src/Magnum/AbstractResourceLoader.h b/src/Magnum/AbstractResourceLoader.h index 22cd5f283..47171920f 100644 --- a/src/Magnum/AbstractResourceLoader.h +++ b/src/Magnum/AbstractResourceLoader.h @@ -101,8 +101,6 @@ Resource myMesh = manager->get("my-mesh"); buffers), should that be allowed? */ template class AbstractResourceLoader { - friend Implementation::ResourceManagerData; - public: explicit AbstractResourceLoader(): manager(nullptr), _requestedCount(0), _loadedCount(0), _notFoundCount(0) {} @@ -213,6 +211,10 @@ template class AbstractResourceLoader { virtual void doLoad(ResourceKey key) = 0; private: + #ifndef DOXYGEN_GENERATING_OUTPUT /* https://bugzilla.gnome.org/show_bug.cgi?id=776986 */ + friend Implementation::ResourceManagerData; + #endif + Implementation::ResourceManagerData* manager; std::size_t _requestedCount, _loadedCount, diff --git a/src/Magnum/Context.h b/src/Magnum/Context.h index ad5822a41..8297395b6 100644 --- a/src/Magnum/Context.h +++ b/src/Magnum/Context.h @@ -60,8 +60,6 @@ See also @ref Extensions namespace, which contain compile-time information about OpenGL extensions. */ class MAGNUM_EXPORT Extension { - friend Context; - public: /** @brief All extensions for given OpenGL version */ static const std::vector& extensions(Version version); @@ -76,6 +74,10 @@ class MAGNUM_EXPORT Extension { constexpr const char* string() const { return _string; } private: + #ifndef DOXYGEN_GENERATING_OUTPUT /* https://bugzilla.gnome.org/show_bug.cgi?id=776986 */ + friend Context; + #endif + std::size_t _index; Version _requiredVersion; Version _coreVersion; @@ -115,9 +117,6 @@ Arguments: */ class MAGNUM_EXPORT Context { - friend Implementation::ContextState; - friend Platform::Context; - public: #ifndef MAGNUM_TARGET_WEBGL /** @@ -572,6 +571,11 @@ class MAGNUM_EXPORT Context { MAGNUM_LOCAL bool isCoreProfileInternal(Implementation::ContextState& state); private: + #ifndef DOXYGEN_GENERATING_OUTPUT /* https://bugzilla.gnome.org/show_bug.cgi?id=776986 */ + friend Implementation::ContextState; + friend Platform::Context; + #endif + explicit Context(NoCreateT, Int argc, const char** argv, void functionLoader()); bool tryCreate(); diff --git a/src/Magnum/Platform/Screen.h b/src/Magnum/Platform/Screen.h index e8866f1e1..4afceafb5 100644 --- a/src/Magnum/Platform/Screen.h +++ b/src/Magnum/Platform/Screen.h @@ -66,10 +66,6 @@ The following specialization are explicitly compiled into each particular - @ref XEglApplication "BasicScreen" */ template class BasicScreen: private Containers::LinkedListItem, BasicScreenedApplication> { - friend Containers::LinkedListItem, BasicScreenedApplication>; - friend Containers::LinkedList>; - friend BasicScreenedApplication; - public: #ifdef DOXYGEN_GENERATING_OUTPUT /** @@ -257,6 +253,12 @@ template class BasicScreen: private Containers::LinkedListIte virtual void mouseMoveEvent(MouseMoveEvent& event); private: + #ifndef DOXYGEN_GENERATING_OUTPUT /* https://bugzilla.gnome.org/show_bug.cgi?id=776986 */ + friend Containers::LinkedListItem, BasicScreenedApplication>; + friend Containers::LinkedList>; + friend BasicScreenedApplication; + #endif + PropagatedEvents _propagatedEvents; }; diff --git a/src/Magnum/Platform/ScreenedApplication.h b/src/Magnum/Platform/ScreenedApplication.h index 7926e6c7e..96910890a 100644 --- a/src/Magnum/Platform/ScreenedApplication.h +++ b/src/Magnum/Platform/ScreenedApplication.h @@ -97,10 +97,6 @@ The following specialization are explicitly compiled into each particular - @ref XEglApplication "BasicScreenedApplication" */ template class BasicScreenedApplication: public Application, private Containers::LinkedList> { - friend Containers::LinkedList>; - friend Containers::LinkedListItem, BasicScreenedApplication>; - friend BasicScreen; - public: /** * @brief Default constructor @@ -236,6 +232,12 @@ template class BasicScreenedApplication: public Application, virtual void globalDrawEvent() = 0; private: + #ifndef DOXYGEN_GENERATING_OUTPUT /* https://bugzilla.gnome.org/show_bug.cgi?id=776986 */ + friend Containers::LinkedList>; + friend Containers::LinkedListItem, BasicScreenedApplication>; + friend BasicScreen; + #endif + /* The user is supposed to override only globalViewportEvent() and globalDrawEvent(), these implementations are dispatching the events to attached screens. */ diff --git a/src/Magnum/Resource.h b/src/Magnum/Resource.h index 2984f4d25..cef824247 100644 --- a/src/Magnum/Resource.h +++ b/src/Magnum/Resource.h @@ -119,8 +119,6 @@ template template #endif class Resource { - friend Implementation::ResourceManagerData; - public: /** * @brief Default constructor @@ -215,6 +213,10 @@ class Resource { } private: + #ifndef DOXYGEN_GENERATING_OUTPUT /* https://bugzilla.gnome.org/show_bug.cgi?id=776986 */ + friend Implementation::ResourceManagerData; + #endif + Resource(Implementation::ResourceManagerData* manager, ResourceKey key): manager(manager), _key(key), lastCheck(0), _state(ResourceState::NotLoaded), data(nullptr) { manager->incrementReferenceCount(key); } diff --git a/src/Magnum/SceneGraph/AbstractFeature.h b/src/Magnum/SceneGraph/AbstractFeature.h index 919b527da..09993b824 100644 --- a/src/Magnum/SceneGraph/AbstractFeature.h +++ b/src/Magnum/SceneGraph/AbstractFeature.h @@ -156,10 +156,6 @@ template class AbstractFeature : private Containers::LinkedListItem, AbstractObject> #endif { - friend Containers::LinkedList>; - friend Containers::LinkedListItem, AbstractObject>; - template friend class Object; - public: /** * @brief Constructor @@ -278,6 +274,12 @@ template class AbstractFeature /*@}*/ private: + #ifndef DOXYGEN_GENERATING_OUTPUT /* https://bugzilla.gnome.org/show_bug.cgi?id=776986 */ + friend Containers::LinkedList>; + friend Containers::LinkedListItem, AbstractObject>; + template friend class Object; + #endif + CachedTransformations _cachedTransformations; }; diff --git a/src/Magnum/SceneGraph/AbstractObject.h b/src/Magnum/SceneGraph/AbstractObject.h index 729fc59b9..772078a1a 100644 --- a/src/Magnum/SceneGraph/AbstractObject.h +++ b/src/Magnum/SceneGraph/AbstractObject.h @@ -89,10 +89,6 @@ template class AbstractObject : private Containers::LinkedList> #endif { - friend Containers::LinkedList>; - friend Containers::LinkedListItem, AbstractObject>; - friend AbstractFeature; - public: /** @brief Matrix type */ typedef MatrixTypeFor MatrixType; @@ -272,6 +268,12 @@ template class AbstractObject /*@}*/ private: + #ifndef DOXYGEN_GENERATING_OUTPUT /* https://bugzilla.gnome.org/show_bug.cgi?id=776986 */ + friend Containers::LinkedList>; + friend Containers::LinkedListItem, AbstractObject>; + friend AbstractFeature; + #endif + virtual AbstractObject* doScene() = 0; virtual const AbstractObject* doScene() const = 0; diff --git a/src/Magnum/SceneGraph/Object.h b/src/Magnum/SceneGraph/Object.h index 4567eec0c..3d69c3d62 100644 --- a/src/Magnum/SceneGraph/Object.h +++ b/src/Magnum/SceneGraph/Object.h @@ -111,9 +111,6 @@ template class Object: public AbstractObject>, private Containers::LinkedListItem, Object> #endif { - friend Containers::LinkedList>; - friend Containers::LinkedListItem, Object>; - public: /** @brief Matrix type */ typedef MatrixTypeFor MatrixType; @@ -360,6 +357,11 @@ template class Object: public AbstractObject>; + friend Containers::LinkedListItem, Object>; + #endif + Object* doScene() override final; const Object* doScene() const override final;