1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0024023: Revamp the OCCT Handle -- general

Missing headers added; includes of headers "Handle_...hxx" removed.

Misuses of macro Handle() and its use in typedefs corrected.

Alias classes Profile and Option are removed from IFSelect; ones defined in MoniTool are used directly.

Removed header files defining only Handle classes (except Image_PixMap_Handle.hxx)

Classes SelectMgr_BaseFrustum and now inherit Standard_Transient and can be manipulated by Handle (not NCollection_Handle)

Fixed reference-type local variable pointing to temporary object

Use of handle in conditional expressions and comparisons to NULL are replaced by call to method IsNull()
This commit is contained in:
abv
2015-06-30 10:25:12 +03:00
parent 35c0599a42
commit c04c30b3ee
311 changed files with 725 additions and 1175 deletions

View File

@@ -18,23 +18,14 @@
typedef Geom2d_Transformation Transformation;
typedef Handle(Geom2d_Transformation) Handle(Transformation);
typedef gp_Ax2d Ax2d;
typedef gp_Pnt2d Pnt2d;
typedef gp_TrsfForm TrsfForm;
typedef gp_Vec2d Vec2d;
Handle(Geom2d_Transformation) Geom2d_Transformation::Copy() const {
Handle(Transformation) T;
Handle(Geom2d_Transformation) T;
T = new Transformation (gpTrsf2d);
return T;
}
@@ -49,21 +40,21 @@ Geom2d_Transformation::Geom2d_Transformation (const gp_Trsf2d& T)
: gpTrsf2d (T) { }
Handle(Transformation) Geom2d_Transformation::Inverted () const {
Handle(Geom2d_Transformation) Geom2d_Transformation::Inverted () const {
return new Transformation (gpTrsf2d.Inverted());
}
Handle(Transformation) Geom2d_Transformation::Multiplied (
Handle(Geom2d_Transformation) Geom2d_Transformation::Multiplied (
const Handle(Transformation)& Other) const {
const Handle(Geom2d_Transformation)& Other) const {
return new Transformation (gpTrsf2d.Multiplied (Other->Trsf2d()));
}
Handle(Transformation) Geom2d_Transformation::Powered (const Standard_Integer N) const{
Handle(Geom2d_Transformation) Geom2d_Transformation::Powered (const Standard_Integer N) const{
gp_Trsf2d Temp = gpTrsf2d;
Temp.Power (N);
@@ -168,7 +159,7 @@ void Geom2d_Transformation::Power (const Standard_Integer N) { gpTrsf2d.Power (N
void Geom2d_Transformation::PreMultiply (
const Handle(Transformation)& Other) {
const Handle(Geom2d_Transformation)& Other) {
gpTrsf2d.PreMultiply (Other->Trsf2d());
}