1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0027566: Configuration - define Handle_ as non-template class for compatibility with C++/CLI

For MSVC compiler (version 12 and above), Handle_Class types are defined as true classes (inheriting corresponding opencascade::handle<Class>) to allow using them in "public" statement of C++/CLI language, to make these classes recognizable by other C++/CLI libraries.

Code to test operations with Handle_ class is added to QAHandleOps test command
This commit is contained in:
kgv
2016-06-16 14:06:53 +03:00
committed by bugmaster
parent 21a8e27535
commit a13f2dc486
17 changed files with 86 additions and 62 deletions

View File

@@ -26,7 +26,7 @@
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_HArray1OfByte.hxx>
#include <Image_PixMap_Handle.hxx>
#include <Image_PixMap.hxx>
class Quantity_Color;
@@ -58,7 +58,7 @@ public:
//! Creates a context table for marker primitives
//! defined with the specified values.
Standard_EXPORT Graphic3d_AspectMarker3d(const Image_PixMap_Handle& theTextureImage);
Standard_EXPORT Graphic3d_AspectMarker3d(const Handle(Image_PixMap)& theTextureImage);
//! Returns marker's texture size.
Standard_EXPORT void GetTextureSize (Standard_Integer& theWidth, Standard_Integer& theHeight) const;

View File

@@ -23,7 +23,7 @@
#include <Graphic3d_NameOfTexture1D.hxx>
#include <Graphic3d_TextureMap.hxx>
#include <Graphic3d_TypeOfTexture.hxx>
#include <Image_PixMap_Handle.hxx>
#include <Image_PixMap.hxx>
#include <Standard_Integer.hxx>
class Standard_OutOfRange;
class TCollection_AsciiString;
@@ -64,7 +64,7 @@ protected:
Standard_EXPORT Graphic3d_Texture1D(const Graphic3d_NameOfTexture1D theName, const Graphic3d_TypeOfTexture theType);
Standard_EXPORT Graphic3d_Texture1D(const Image_PixMap_Handle& thePixMap, const Graphic3d_TypeOfTexture theType);
Standard_EXPORT Graphic3d_Texture1D(const Handle(Image_PixMap)& thePixMap, const Graphic3d_TypeOfTexture theType);

View File

@@ -22,7 +22,6 @@
#include <Graphic3d_Texture1D.hxx>
#include <Graphic3d_NameOfTexture1D.hxx>
#include <Image_PixMap_Handle.hxx>
class TCollection_AsciiString;
@@ -44,7 +43,7 @@ public:
Standard_EXPORT Graphic3d_Texture1Dmanual(const Graphic3d_NameOfTexture1D theNOT);
//! Creates a texture from the pixmap.
Standard_EXPORT Graphic3d_Texture1Dmanual(const Image_PixMap_Handle& thePixMap);
Standard_EXPORT Graphic3d_Texture1Dmanual(const Handle(Image_PixMap)& thePixMap);

View File

@@ -23,7 +23,6 @@
#include <Standard_ShortReal.hxx>
#include <Graphic3d_Texture1D.hxx>
#include <Graphic3d_NameOfTexture1D.hxx>
#include <Image_PixMap_Handle.hxx>
class TCollection_AsciiString;
@@ -47,7 +46,7 @@ public:
Standard_EXPORT Graphic3d_Texture1Dsegment(const Graphic3d_NameOfTexture1D theNOT);
//! Creates a texture from the pixmap.
Standard_EXPORT Graphic3d_Texture1Dsegment(const Image_PixMap_Handle& thePixMap);
Standard_EXPORT Graphic3d_Texture1Dsegment(const Handle(Image_PixMap)& thePixMap);
//! Sets the texture application bounds. Defines the way
//! the texture is stretched across facets.

View File

@@ -23,7 +23,7 @@
#include <Graphic3d_NameOfTexture2D.hxx>
#include <Graphic3d_TextureMap.hxx>
#include <Graphic3d_TypeOfTexture.hxx>
#include <Image_PixMap_Handle.hxx>
#include <Image_PixMap.hxx>
#include <Standard_Integer.hxx>
class Standard_OutOfRange;
class TCollection_AsciiString;
@@ -64,7 +64,7 @@ protected:
Standard_EXPORT Graphic3d_Texture2D(const Graphic3d_NameOfTexture2D theName, const Graphic3d_TypeOfTexture theType);
Standard_EXPORT Graphic3d_Texture2D(const Image_PixMap_Handle& thePixMap, const Graphic3d_TypeOfTexture theType);
Standard_EXPORT Graphic3d_Texture2D(const Handle(Image_PixMap)& thePixMap, const Graphic3d_TypeOfTexture theType);

View File

@@ -22,7 +22,6 @@
#include <Graphic3d_Texture2D.hxx>
#include <Graphic3d_NameOfTexture2D.hxx>
#include <Image_PixMap_Handle.hxx>
class TCollection_AsciiString;
@@ -45,7 +44,7 @@ public:
Standard_EXPORT Graphic3d_Texture2Dmanual(const Graphic3d_NameOfTexture2D theNOT);
//! Creates a texture from the pixmap.
Standard_EXPORT Graphic3d_Texture2Dmanual(const Image_PixMap_Handle& thePixMap);
Standard_EXPORT Graphic3d_Texture2Dmanual(const Handle(Image_PixMap)& thePixMap);

View File

@@ -23,7 +23,6 @@
#include <Graphic3d_NameOfTexturePlane.hxx>
#include <Graphic3d_Texture2D.hxx>
#include <Graphic3d_NameOfTexture2D.hxx>
#include <Image_PixMap_Handle.hxx>
#include <Standard_ShortReal.hxx>
class TCollection_AsciiString;
@@ -46,7 +45,7 @@ public:
Standard_EXPORT Graphic3d_Texture2Dplane(const Graphic3d_NameOfTexture2D theNOT);
//! Creates a texture from the pixmap.
Standard_EXPORT Graphic3d_Texture2Dplane(const Image_PixMap_Handle& thePixMap);
Standard_EXPORT Graphic3d_Texture2Dplane(const Handle(Image_PixMap)& thePixMap);
//! Defines the texture projection plane for texture coordinate S
//! default is <1.0, 0.0, 0.0, 0.0>

View File

@@ -22,7 +22,6 @@
#include <Graphic3d_NameOfTextureEnv.hxx>
#include <Graphic3d_TextureRoot.hxx>
#include <Image_PixMap_Handle.hxx>
#include <Standard_Integer.hxx>
class Standard_OutOfRange;
class TCollection_AsciiString;
@@ -45,7 +44,7 @@ public:
Standard_EXPORT Graphic3d_TextureEnv(const Graphic3d_NameOfTextureEnv theName);
//! Creates an environment texture from the pixmap.
Standard_EXPORT Graphic3d_TextureEnv(const Image_PixMap_Handle& thePixMap);
Standard_EXPORT Graphic3d_TextureEnv(const Handle(Image_PixMap)& thePixMap);
//! Returns the name of the predefined textures or NOT_ENV_UNKNOWN

View File

@@ -22,7 +22,6 @@
#include <Graphic3d_TextureRoot.hxx>
#include <Graphic3d_TypeOfTexture.hxx>
#include <Image_PixMap_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Graphic3d_LevelOfTextureAnisotropy.hxx>
class TCollection_AsciiString;
@@ -95,7 +94,7 @@ protected:
Standard_EXPORT Graphic3d_TextureMap(const TCollection_AsciiString& theFileName, const Graphic3d_TypeOfTexture theType);
Standard_EXPORT Graphic3d_TextureMap(const Image_PixMap_Handle& thePixMap, const Graphic3d_TypeOfTexture theType);
Standard_EXPORT Graphic3d_TextureMap(const Handle(Image_PixMap)& thePixMap, const Graphic3d_TypeOfTexture theType);

View File

@@ -21,7 +21,7 @@
#include <Standard_Type.hxx>
#include <TCollection_AsciiString.hxx>
#include <Image_PixMap_Handle.hxx>
#include <Image_PixMap.hxx>
#include <OSD_Path.hxx>
#include <Graphic3d_TypeOfTexture.hxx>
#include <MMgt_TShared.hxx>
@@ -75,7 +75,6 @@ public:
//!
//! @return texture identifier.
Standard_EXPORT const TCollection_AsciiString& GetId() const;
//! This method will be called by graphic driver each time when texture resource should be created.
//! Default constructors allow defining the texture source as path to texture image or directly as pixmap.
@@ -84,8 +83,8 @@ public:
//! Inheritors may dynamically generate the image.
//! Notice, image data should be in Bottom-Up order (see Image_PixMap::IsTopDown())!
//! @return the image for texture.
Standard_EXPORT virtual Image_PixMap_Handle GetImage() const;
Standard_EXPORT virtual Handle(Image_PixMap) GetImage() const;
//! @return low-level texture parameters
Standard_EXPORT const Handle(Graphic3d_TextureParams)& GetParams() const;
@@ -109,11 +108,11 @@ protected:
//! Creates a texture from pixmap.
//! Please note that the implementation expects the image data
//! to be in Bottom-Up order (see Image_PixMap::IsTopDown()).
Standard_EXPORT Graphic3d_TextureRoot(const Image_PixMap_Handle& thePixmap, const Graphic3d_TypeOfTexture theType);
Standard_EXPORT Graphic3d_TextureRoot(const Handle(Image_PixMap)& thePixmap, const Graphic3d_TypeOfTexture theType);
Handle(Graphic3d_TextureParams) myParams;
TCollection_AsciiString myTexId;
Image_PixMap_Handle myPixMap;
Handle(Image_PixMap) myPixMap;
OSD_Path myPath;