1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0031124: Configuration - linker errors when building with CLang on Windows

Standard_EXPORT is added in declaration of virtual methods where it was missing, to allow creation of sub-classes in other DLLs.
In some classes in OpenGl package Standard_EXPORT is added for all methods to make these classes usable in other DLLs.
This commit is contained in:
abv
2019-11-02 11:10:47 +03:00
parent 1bd04b5a02
commit b31fbc832d
21 changed files with 136 additions and 200 deletions

View File

@@ -33,35 +33,35 @@ protected:
public:
//! Creates an empty primitive set for BVH clipping.
Graphic3d_BvhCStructureSet();
Standard_EXPORT Graphic3d_BvhCStructureSet();
//! Returns total number of structures.
virtual Standard_Integer Size() const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Integer Size() const Standard_OVERRIDE;
//! Returns AABB of the structure.
virtual Graphic3d_BndBox3d Box (const Standard_Integer theIdx) const Standard_OVERRIDE;
Standard_EXPORT virtual Graphic3d_BndBox3d Box (const Standard_Integer theIdx) const Standard_OVERRIDE;
//! Calculates center of the AABB along given axis.
virtual Standard_Real Center (const Standard_Integer theIdx,
const Standard_Integer theAxis) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Real Center (const Standard_Integer theIdx,
const Standard_Integer theAxis) const Standard_OVERRIDE;
//! Swaps structures with the given indices.
virtual void Swap (const Standard_Integer theIdx1,
const Standard_Integer theIdx2) Standard_OVERRIDE;
Standard_EXPORT virtual void Swap (const Standard_Integer theIdx1,
const Standard_Integer theIdx2) Standard_OVERRIDE;
//! Adds structure to the set.
//! @return true if structure added, otherwise returns false (structure already in the set).
Standard_Boolean Add (const Graphic3d_CStructure* theStruct);
Standard_EXPORT Standard_Boolean Add (const Graphic3d_CStructure* theStruct);
//! Removes the given structure from the set.
//! @return true if structure removed, otherwise returns false (structure is not in the set).
Standard_Boolean Remove (const Graphic3d_CStructure* theStruct);
Standard_EXPORT Standard_Boolean Remove (const Graphic3d_CStructure* theStruct);
//! Cleans the whole primitive set.
void Clear();
Standard_EXPORT void Clear();
//! Returns the structure corresponding to the given ID.
const Graphic3d_CStructure* GetStructureById (Standard_Integer theId);
Standard_EXPORT const Graphic3d_CStructure* GetStructureById (Standard_Integer theId);
//! Access directly a collection of structures.
const NCollection_IndexedMap<const Graphic3d_CStructure*>& Structures() const { return myStructs; }

View File

@@ -41,35 +41,35 @@ private:
public:
//! Creates an empty primitive set for BVH clipping.
Graphic3d_BvhCStructureSetTrsfPers (const Handle(Select3D_BVHBuilder3d)& theBuilder);
Standard_EXPORT Graphic3d_BvhCStructureSetTrsfPers (const Handle(Select3D_BVHBuilder3d)& theBuilder);
//! Returns total number of structures.
virtual Standard_Integer Size() const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Integer Size() const Standard_OVERRIDE;
//! Returns AABB of the structure.
virtual Graphic3d_BndBox3d Box (const Standard_Integer theIdx) const Standard_OVERRIDE;
Standard_EXPORT virtual Graphic3d_BndBox3d Box (const Standard_Integer theIdx) const Standard_OVERRIDE;
//! Calculates center of the AABB along given axis.
virtual Standard_Real Center (const Standard_Integer theIdx,
const Standard_Integer theAxis) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Real Center (const Standard_Integer theIdx,
const Standard_Integer theAxis) const Standard_OVERRIDE;
//! Swaps structures with the given indices.
virtual void Swap (const Standard_Integer theIdx1,
const Standard_Integer theIdx2) Standard_OVERRIDE;
Standard_EXPORT virtual void Swap (const Standard_Integer theIdx1,
const Standard_Integer theIdx2) Standard_OVERRIDE;
//! Adds structure to the set.
//! @return true if structure added, otherwise returns false (structure already in the set).
Standard_Boolean Add (const Graphic3d_CStructure* theStruct);
Standard_EXPORT Standard_Boolean Add (const Graphic3d_CStructure* theStruct);
//! Removes the given structure from the set.
//! @return true if structure removed, otherwise returns false (structure is not in the set).
Standard_Boolean Remove (const Graphic3d_CStructure* theStruct);
Standard_EXPORT Standard_Boolean Remove (const Graphic3d_CStructure* theStruct);
//! Cleans the whole primitive set.
void Clear();
Standard_EXPORT void Clear();
//! Returns the structure corresponding to the given ID.
const Graphic3d_CStructure* GetStructureById (Standard_Integer theId);
Standard_EXPORT const Graphic3d_CStructure* GetStructureById (Standard_Integer theId);
//! Access directly a collection of structures.
const NCollection_IndexedMap<const Graphic3d_CStructure*>& Structures() const { return myStructs; }
@@ -81,12 +81,12 @@ public:
}
//! Returns BVH tree for the given world view projection (builds it if necessary).
const opencascade::handle<BVH_Tree<Standard_Real, 3> >& BVH (const Handle(Graphic3d_Camera)& theCamera,
const Graphic3d_Mat4d& theProjectionMatrix,
const Graphic3d_Mat4d& theWorldViewMatrix,
const Standard_Integer theViewportWidth,
const Standard_Integer theViewportHeight,
const Graphic3d_WorldViewProjState& theWVPState);
Standard_EXPORT const opencascade::handle<BVH_Tree<Standard_Real, 3> >& BVH (const Handle(Graphic3d_Camera)& theCamera,
const Graphic3d_Mat4d& theProjectionMatrix,
const Graphic3d_Mat4d& theWorldViewMatrix,
const Standard_Integer theViewportWidth,
const Standard_Integer theViewportHeight,
const Graphic3d_WorldViewProjState& theWVPState);
//! Returns builder for bottom-level BVH.
const Handle(Select3D_BVHBuilder3d)& Builder() const { return myBuilder; }

View File

@@ -85,10 +85,10 @@ public:
private:
//! Lock the frame for decoding into.
virtual Handle(Media_Frame) LockFrame() Standard_OVERRIDE;
Standard_EXPORT virtual Handle(Media_Frame) LockFrame() Standard_OVERRIDE;
//! Release the frame to present decoding results.
virtual void ReleaseFrame (const Handle(Media_Frame)& theFrame) Standard_OVERRIDE;
Standard_EXPORT virtual void ReleaseFrame (const Handle(Media_Frame)& theFrame) Standard_OVERRIDE;
protected: