0024023: Revamp the OCCT Handle -- downcast (automatic)
[occt.git] / src / TDF / TDF_ClosureTool.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 935795d..b0cea80
@@ -1,11 +1,22 @@
-// File:       TDF_ClosureTool.cxx
+// Created by: DAUTRY Philippe
+// Copyright (c) 1998-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
 //             -------------------
-// Author:     DAUTRY Philippe
-//             <fid@fox.paris1.matra-dtv.fr>
-// Copyright:  Matra Datavision 1998
 
 // Version:    0.0
-// History:    Version Date            Purpose
+//Version      Date            Purpose
 //             0.0     Sep  8 1998     Creation
 
 
@@ -24,9 +35,9 @@
 
 #include <Standard_TypeMismatch.hxx>
 
-#define DeclareAndSpeedCast(V,T,Vdown) Handle(T) Vdown = *((Handle(T)*)& V)
+#define DeclareAndSpeedCast(V,T,Vdown) Handle(T) Vdown = Handle(T)::DownCast (V)
 #define DeclareConstAndSpeedCast(V,T,Vdown) const Handle(T)& Vdown = (Handle(T)&) V
-#define SpeedCast(V,T,Vdown) Vdown = *((Handle(T)*)& V)
+#define SpeedCast(V,T,Vdown) Vdown = Handle(T)::DownCast (V)
 
 
 //=======================================================================