0028225: MFC sample on OCAF uses old-style definition of a Handle-class
authorabv <abv@opencascade.com>
Tue, 15 Aug 2017 14:46:38 +0000 (17:46 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 17 Aug 2017 12:47:58 +0000 (15:47 +0300)
Obsolete approach to definition of OCCT RTTI in sample classes generated by WOK from CDL is replaced by usage of standard macros

19 files changed:
samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.hxx
samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj
samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj.filters
samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.cxx
samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.hxx
samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.hxx
samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.ixx [deleted file]
samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.jxx [deleted file]
samples/mfc/standard/06_Ocaf/src/OcafApp.h
samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx
samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx
samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx
samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx
samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx
samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx
samples/mfc/standard/06_Ocaf/src/TOcaf_Application.cxx
samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx
samples/mfc/standard/06_Ocaf/src/TOcaf_Application.ixx [deleted file]
samples/mfc/standard/06_Ocaf/src/TOcaf_Application.jxx [deleted file]

index 16d57a2..4fb5ee5 100755 (executable)
@@ -15,7 +15,7 @@
 #ifndef _GeoAlgo_Sol_HeaderFile
 #define _GeoAlgo_Sol_HeaderFile
 
-#ifndef _Handle_Geom_BSplineSurface_HeaderFile
+#ifndef _Geom_BSplineSurface_HeaderFile
 #include <Geom_BSplineSurface.hxx>
 #endif
 #ifndef _Standard_Boolean_HeaderFile
index d385aa5..a68e892 100644 (file)
     </ResourceCompile>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\..\..\src\Handle_TOcaf_Application.hxx" />
-    <ClInclude Include="..\..\..\src\Handle_TOcafFunction_BoxDriver.hxx" />
-    <ClInclude Include="..\..\..\src\Handle_TOcafFunction_CutDriver.hxx" />
-    <ClInclude Include="..\..\..\src\Handle_TOcafFunction_CylDriver.hxx" />
+    <ClInclude Include="..\..\..\src\TOcaf_Application.hxx" />
+    <ClInclude Include="..\..\..\src\TOcafFunction_BoxDriver.hxx" />
+    <ClInclude Include="..\..\..\src\TOcafFunction_CutDriver.hxx" />
+    <ClInclude Include="..\..\..\src\TOcafFunction_CylDriver.hxx" />
     <ClInclude Include="..\..\..\src\NewBoxDlg.h" />
     <ClInclude Include="..\..\..\src\NewCylDlg.h" />
     <ClInclude Include="..\..\..\src\OcafApp.h" />
index 1d3ba64..976b07f 100644 (file)
     </ResourceCompile>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\..\..\src\Handle_TOcaf_Application.hxx">
+    <ClInclude Include="..\..\..\src\TOcaf_Application.hxx">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\..\src\Handle_TOcafFunction_BoxDriver.hxx">
+    <ClInclude Include="..\..\..\src\TOcafFunction_BoxDriver.hxx">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\..\src\Handle_TOcafFunction_CutDriver.hxx">
+    <ClInclude Include="..\..\..\src\TOcafFunction_CutDriver.hxx">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\..\src\Handle_TOcafFunction_CylDriver.hxx">
+    <ClInclude Include="..\..\..\src\TOcafFunction_CylDriver.hxx">
       <Filter>Header Files</Filter>
     </ClInclude>
     <ClInclude Include="..\..\..\src\NewBoxDlg.h">
index 07d1ac9..6658540 100755 (executable)
@@ -34,6 +34,9 @@
 #define OPERATION_NOT_DONE 8
 #define NULL_OPERATION 9
 
+// OCCT RTTI
+IMPLEMENT_STANDARD_RTTIEXT (OCAFSample_CommonDriver, OCAFSample_Driver)
+
 //=======================================================================
 //function : Constructor
 //purpose  :
index b5d983a..cc88a0a 100755 (executable)
 #ifndef _OCAFSample_CommonDriver_HeaderFile
 #define _OCAFSample_CommonDriver_HeaderFile
 
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_OCAFSample_CommonDriver_HeaderFile
-#endif
-
-#ifndef _OCAFSample_Driver_HeaderFile
+#include <Standard_Type.hxx>
 #include <OCAFSample_Driver.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-class TFunction_Logbook;
 
+class TFunction_Logbook;
 
-class OCAFSample_CommonDriver : public OCAFSample_Driver {
 
+class OCAFSample_CommonDriver : public OCAFSample_Driver
+{
 public:
 
-    inline void* operator new(size_t,void* anAddress) 
-      {
-        return anAddress;
-      }
-    inline void* operator new(size_t size) 
-      { 
-        return Standard::Allocate(size); 
-      }
-    inline void  operator delete(void *anAddress) 
-      { 
-        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-      }
-//    inline void  operator delete(void *anAddress, size_t size) 
-//      { 
-//        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
-//      }
- // Methods PUBLIC
- // 
-Standard_EXPORT OCAFSample_CommonDriver();
-Standard_EXPORT virtual  Standard_Integer Execute(Handle(TFunction_Logbook)& theLogbook) const;
-Standard_EXPORT ~OCAFSample_CommonDriver();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle(Standard_Type)& OCAFSample_CommonDriver_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- // 
-
-
- // Fields PROTECTED
- //
-
-
-private: 
-
- // Methods PRIVATE
- // 
-
-
- // Fields PRIVATE
- //
-
+  Standard_EXPORT OCAFSample_CommonDriver ();
+  Standard_EXPORT virtual  Standard_Integer Execute (Handle (TFunction_Logbook)& theLogbook) const;
+  Standard_EXPORT ~OCAFSample_CommonDriver ();
 
+  // OCCT RTTI
+  DEFINE_STANDARD_RTTIEXT (OCAFSample_CommonDriver, OCAFSample_Driver)
 };
 
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
 #endif
index ffeea09..fc6d35e 100755 (executable)
 #ifndef _OCAFSample_Driver_HeaderFile
 #define _OCAFSample_Driver_HeaderFile
 
-#ifndef _Standard_HeaderFile
 #include <Standard.hxx>
-#endif
-#ifndef _Handle_OCAFSample_Driver_HeaderFile
-#endif
-
-#ifndef _TFunction_Driver_HeaderFile
 #include <TFunction_Driver.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-class TFunction_Logbook;
 #include <TDF_LabelMap.hxx>
 
+class TFunction_Logbook;
 
-class OCAFSample_Driver : public TFunction_Driver {
-
+class OCAFSample_Driver : public TFunction_Driver
+{
 public:
 
-    inline void* operator new(size_t,void* anAddress) 
-      {
-        return anAddress;
-      }
-    inline void* operator new(size_t size) 
-      { 
-        return Standard::Allocate(size); 
-      }
-    inline void  operator delete(void *anAddress) 
-      { 
-        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-      }
-//    inline void  operator delete(void *anAddress, size_t size) 
-//      { 
-//        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
-//      }
- // Methods PUBLIC
- // 
-Standard_EXPORT   void Validate(TFunction_Logbook& log) const;
-Standard_EXPORT virtual  Standard_Boolean MustExecute(const Handle(TFunction_Logbook)& log) const;
-Standard_EXPORT virtual  Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
-Standard_EXPORT virtual  Standard_Boolean Arguments(TDF_LabelMap& theArgs) const;
-Standard_EXPORT virtual  Standard_Boolean Results(TDF_LabelMap& theRes) const;
-Standard_EXPORT ~OCAFSample_Driver();
-
-
+  Standard_EXPORT   void Validate (TFunction_Logbook& log) const;
+  Standard_EXPORT virtual  Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const;
+  Standard_EXPORT virtual  Standard_Integer Execute (Handle (TFunction_Logbook)& log) const;
+  Standard_EXPORT virtual  Standard_Boolean Arguments (TDF_LabelMap& theArgs) const;
+  Standard_EXPORT virtual  Standard_Boolean Results (TDF_LabelMap& theRes) const;
+  Standard_EXPORT ~OCAFSample_Driver ();
 
-
- // Type management
- //
- Standard_EXPORT friend Handle(Standard_Type)& OCAFSample_Driver_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
+  // OCCT RTTI
+  DEFINE_STANDARD_RTTIEXT(OCAFSample_Driver,TFunction_Driver)
 
 protected:
 
- // Methods PROTECTED
- // 
-Standard_EXPORT OCAFSample_Driver();
-
-
- // Fields PROTECTED
- //
-
-
-private: 
-
- // Methods PRIVATE
- // 
-
-
- // Fields PRIVATE
- //
-
-
+  Standard_EXPORT OCAFSample_Driver ();
 };
 
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
 #endif
diff --git a/samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.ixx b/samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.ixx
deleted file mode 100755 (executable)
index 68b904c..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-// File generated by CPPExt (Transient)
-//                     Copyright (C) 1991,1995 by
-//  
-//                      MATRA DATAVISION, FRANCE
-//  
-// This software is furnished in accordance with the terms and conditions
-// of the contract and with the inclusion of the above copyright notice.
-// This software or any other copy thereof may not be provided or otherwise
-// be made available to any other person. No title to an ownership of the
-// software is hereby transferred.
-//  
-// At the termination of the contract, the software and all copies of this
-// software must be deleted.
-//
-#include <OCAFSample_Driver.jxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-OCAFSample_Driver::~OCAFSample_Driver() {}
-
-
-Standard_EXPORT Handle_Standard_Type& OCAFSample_Driver_Type_()
-{
-
-    static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
-  if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
-  static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
-  if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
-
-  static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
-  static Handle_Standard_Type _aType = new Standard_Type("OCAFSample_Driver",
-                                                        sizeof(OCAFSample_Driver),
-                                                        1,
-                                                        (Standard_Address)_Ancestors,
-                                                        (Standard_Address)NULL);
-
-  return _aType;
-}
-
-
-// DownCast method
-//   allow safe downcasting
-//
-const Handle(OCAFSample_Driver) Handle(OCAFSample_Driver)::DownCast(const Handle(Standard_Transient)& AnObject) 
-{
-  Handle(OCAFSample_Driver) _anOtherObject;
-
-  if (!AnObject.IsNull()) {
-     if (AnObject->IsKind(STANDARD_TYPE(OCAFSample_Driver))) {
-       _anOtherObject = Handle(OCAFSample_Driver)((Handle(OCAFSample_Driver)&)AnObject);
-     }
-  }
-
-  return _anOtherObject ;
-}
-const Handle(Standard_Type)& OCAFSample_Driver::DynamicType() const 
-{ 
-  return STANDARD_TYPE(OCAFSample_Driver) ; 
-}
-Standard_Boolean OCAFSample_Driver::IsKind(const Handle(Standard_Type)& AType) const 
-{ 
-  return (STANDARD_TYPE(OCAFSample_Driver) == AType || TFunction_Driver::IsKind(AType)); 
-}
-Handle_OCAFSample_Driver::~Handle_OCAFSample_Driver() {}
-
diff --git a/samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.jxx b/samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.jxx
deleted file mode 100755 (executable)
index 56c9bd3..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _TFunction_Logbook_HeaderFile
-#include <TFunction_Logbook.hxx>
-#endif
-#ifndef _TDF_LabelMap_HeaderFile
-#include <TDF_LabelMap.hxx>
-#endif
-#ifndef _OCAFSample_Driver_HeaderFile
-#include <OCAFSample_Driver.hxx>
-#endif
index bf1ad3f..3758896 100755 (executable)
@@ -10,7 +10,6 @@
 
 #include <OCC_App.h>
 #include "OcafDoc.h"
-#include "TOCAF_Application.hxx"
 #include <TOcaf_Application.hxx>
 
 
index 09f0069..40979bf 100755 (executable)
@@ -12,6 +12,8 @@
 #include "BRepPrimAPI_MakeBox.hxx"
 #include "TNaming_Builder.hxx"
 
+IMPLEMENT_STANDARD_RTTIEXT (TOcafFunction_BoxDriver, TFunction_Driver)
+
 //=======================================================================
 //function : GetID
 //purpose  :
@@ -118,32 +120,3 @@ Standard_Integer TOcafFunction_BoxDriver::Execute(Handle(TFunction_Logbook)& /*l
   // If there are no any mistakes we return 0:
   return 0;
 }
-
-TOcafFunction_BoxDriver::~TOcafFunction_BoxDriver() {}
-// DownCast method
-//   allow safe downcasting
-//
-const Handle(TOcafFunction_BoxDriver) TOcafFunction_BoxDriver::DownCast(const Handle(Standard_Transient)& AnObject) 
-{
-  Handle(TOcafFunction_BoxDriver) _anOtherObject;
-
-  if (!AnObject.IsNull()) {
-     if (AnObject->IsKind(STANDARD_TYPE(TOcafFunction_BoxDriver))) {
-       _anOtherObject = Handle(TOcafFunction_BoxDriver)::DownCast (AnObject);
-     }
-  }
-
-  return _anOtherObject ;
-}
-const Handle(Standard_Type)& TOcafFunction_BoxDriver::DynamicType() const 
-{ 
-  return STANDARD_TYPE(TOcafFunction_BoxDriver) ; 
-}
-Standard_Boolean TOcafFunction_BoxDriver::IsKind(const Handle(Standard_Type)& AType) const 
-{ 
-  return (STANDARD_TYPE(TOcafFunction_BoxDriver) == AType || TFunction_Driver::IsKind(AType)); 
-}
-
-
-
index d249ad9..8a772e7 100755 (executable)
 #endif
 class TFunction_Logbook;
 
-
-class TOcafFunction_BoxDriver : public TFunction_Driver {
-
+class TOcafFunction_BoxDriver : public TFunction_Driver
+{
 public:
 
-    inline void* operator new(size_t,void* anAddress) 
-      {
-        return anAddress;
-      }
-    inline void* operator new(size_t size) 
-      { 
-        return Standard::Allocate(size); 
-      }
-    inline void  operator delete(void *anAddress) 
-      { 
-        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-      }
-//    inline void  operator delete(void *anAddress, size_t size) 
-//      { 
-//        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
-//      }
- // Methods PUBLIC
- // 
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT TOcafFunction_BoxDriver();
-Standard_EXPORT virtual  void Validate(Handle(TFunction_Logbook)& log) const;
-Standard_EXPORT virtual  Standard_Boolean MustExecute(const Handle(TFunction_Logbook)& log) const;
-Standard_EXPORT virtual  Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
-Standard_EXPORT ~TOcafFunction_BoxDriver();
-
-
-
-
- // Type management
- //
- //Standard_EXPORT friend Handle(Standard_Type)& TOcafFunction_BoxDriver_Type_();
- Standard_EXPORT const Handle(TOcafFunction_BoxDriver) DownCast(const Handle(Standard_Transient)& AnObject);
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- // 
-
-
- // Fields PROTECTED
- //
-
-
-private: 
-
- // Methods PRIVATE
- // 
-
-
- // Fields PRIVATE
- //
-
+  Standard_EXPORT static const Standard_GUID& GetID ();
+  Standard_EXPORT TOcafFunction_BoxDriver ();
+  Standard_EXPORT virtual  void Validate (Handle (TFunction_Logbook)& log) const;
+  Standard_EXPORT virtual  Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const;
+  Standard_EXPORT virtual  Standard_Integer Execute (Handle (TFunction_Logbook)& log) const;
 
+  // OCCT RTTI
+  DEFINE_STANDARD_RTTIEXT(TOcafFunction_BoxDriver,TFunction_Driver)
 };
 
 
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
 #endif
index a39a86d..caff060 100755 (executable)
@@ -17,6 +17,8 @@
 #include "TFunction_Logbook.hxx"
 #include "TDF_Reference.hxx"
 
+IMPLEMENT_STANDARD_RTTIEXT (TOcafFunction_CutDriver, TFunction_Driver)
+
 //=======================================================================
 //function : GetID
 //purpose  :
@@ -139,32 +141,3 @@ Standard_Integer TOcafFunction_CutDriver::Execute(Handle(TFunction_Logbook)& /*l
   // If there are no any mistakes we return 0:
   return 0;
 }
-
-TOcafFunction_CutDriver::~TOcafFunction_CutDriver() {}
-// DownCast method
-//   allow safe downcasting
-//
-const Handle(TOcafFunction_CutDriver) TOcafFunction_CutDriver::DownCast(const Handle(Standard_Transient)& AnObject) 
-{
-  Handle(TOcafFunction_CutDriver) _anOtherObject;
-
-  if (!AnObject.IsNull()) {
-     if (AnObject->IsKind(STANDARD_TYPE(TOcafFunction_CutDriver))) {
-       _anOtherObject = Handle(TOcafFunction_CutDriver)::DownCast (AnObject);
-     }
-  }
-
-  return _anOtherObject ;
-}
-const Handle(Standard_Type)& TOcafFunction_CutDriver::DynamicType() const 
-{ 
-  return STANDARD_TYPE(TOcafFunction_CutDriver) ; 
-}
-Standard_Boolean TOcafFunction_CutDriver::IsKind(const Handle(Standard_Type)& AType) const 
-{ 
-  return (STANDARD_TYPE(TOcafFunction_CutDriver) == AType || TFunction_Driver::IsKind(AType)); 
-}
-
-
-
index da01087..ae07f6a 100755 (executable)
 class TFunction_Logbook;
 
 
-class TOcafFunction_CutDriver : public TFunction_Driver {
-
+class TOcafFunction_CutDriver : public TFunction_Driver
+{
 public:
 
-    inline void* operator new(size_t,void* anAddress) 
-      {
-        return anAddress;
-      }
-    inline void* operator new(size_t size) 
-      { 
-        return Standard::Allocate(size); 
-      }
-    inline void  operator delete(void *anAddress) 
-      { 
-        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-      }
-//    inline void  operator delete(void *anAddress, size_t size) 
-//      { 
-//        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
-//      }
- // Methods PUBLIC
- // 
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT TOcafFunction_CutDriver();
-Standard_EXPORT virtual  void Validate(Handle(TFunction_Logbook)& log) const;
-Standard_EXPORT virtual  Standard_Boolean MustExecute(const Handle(TFunction_Logbook)& log) const;
-Standard_EXPORT virtual  Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
-Standard_EXPORT ~TOcafFunction_CutDriver();
-
-
-
-
- // Type management
- //
- //Standard_EXPORT friend Handle(Standard_Type)& TOcafFunction_CutDriver_Type_();
- Standard_EXPORT const Handle(TOcafFunction_CutDriver) DownCast(const Handle(Standard_Transient)& AnObject); 
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- // 
-
-
- // Fields PROTECTED
- //
-
-
-private: 
-
- // Methods PRIVATE
- // 
-
-
- // Fields PRIVATE
- //
-
+  Standard_EXPORT static const Standard_GUID& GetID() ;
+  Standard_EXPORT TOcafFunction_CutDriver ();
+  Standard_EXPORT virtual  void Validate (Handle (TFunction_Logbook)& log) const;
+  Standard_EXPORT virtual  Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const;
+  Standard_EXPORT virtual  Standard_Integer Execute (Handle (TFunction_Logbook)& log) const;
 
+  // OCCT RTTI
+  DEFINE_STANDARD_RTTIEXT(TOcafFunction_CutDriver,TFunction_Driver)
 };
 
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
 #endif
index fb2ef18..44595ed 100755 (executable)
@@ -13,6 +13,7 @@
 #include "TDataStd_Real.hxx"
 #include "TNaming_Builder.hxx"
 
+IMPLEMENT_STANDARD_RTTIEXT (TOcafFunction_CylDriver, TFunction_Driver)
 
 //=======================================================================
 //function : GetID
@@ -113,32 +114,3 @@ Standard_Integer TOcafFunction_CylDriver::Execute(Handle(TFunction_Logbook)& /*l
   // If there are no any mistakes we return 0:
   return 0;
 }
-
-TOcafFunction_CylDriver::~TOcafFunction_CylDriver() {}
-// DownCast method
-//   allow safe downcasting
-//
-const Handle(TOcafFunction_CylDriver) TOcafFunction_CylDriver::DownCast(const Handle(Standard_Transient)& AnObject) 
-{
-  Handle(TOcafFunction_CylDriver) _anOtherObject;
-
-  if (!AnObject.IsNull()) {
-     if (AnObject->IsKind(STANDARD_TYPE(TOcafFunction_CylDriver))) {
-       _anOtherObject = Handle(TOcafFunction_CylDriver)::DownCast (AnObject);
-     }
-  }
-
-  return _anOtherObject ;
-}
-const Handle(Standard_Type)& TOcafFunction_CylDriver::DynamicType() const 
-{ 
-  return STANDARD_TYPE(TOcafFunction_CylDriver) ; 
-}
-Standard_Boolean TOcafFunction_CylDriver::IsKind(const Handle(Standard_Type)& AType) const 
-{ 
-  return (STANDARD_TYPE(TOcafFunction_CylDriver) == AType || TFunction_Driver::IsKind(AType)); 
-}
-
-
-
index 6b656e0..27ef1f1 100755 (executable)
 class TFunction_Logbook;
 
 
-class TOcafFunction_CylDriver : public TFunction_Driver {
-
+class TOcafFunction_CylDriver : public TFunction_Driver
+{
 public:
 
-    inline void* operator new(size_t,void* anAddress) 
-      {
-        return anAddress;
-      }
-    inline void* operator new(size_t size) 
-      { 
-        return Standard::Allocate(size); 
-      }
-    inline void  operator delete(void *anAddress) 
-      { 
-        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-      }
-//    inline void  operator delete(void *anAddress, size_t size) 
-//      { 
-//        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
-//      }
- // Methods PUBLIC
- // 
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT TOcafFunction_CylDriver();
-Standard_EXPORT virtual  void Validate(Handle(TFunction_Logbook)& log) const;
-Standard_EXPORT virtual  Standard_Boolean MustExecute(const Handle(TFunction_Logbook)& log) const;
-Standard_EXPORT virtual  Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
-Standard_EXPORT ~TOcafFunction_CylDriver();
-
-
-
-
- // Type management
- //
- //Standard_EXPORT friend Handle(Standard_Type)& TOcafFunction_CylDriver_Type_();
- Standard_EXPORT const Handle(TOcafFunction_CylDriver) DownCast(const Handle(Standard_Transient)& AnObject);
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- // 
-
-
- // Fields PROTECTED
- //
-
-
-private: 
-
- // Methods PRIVATE
- // 
-
-
- // Fields PRIVATE
- //
-
+  Standard_EXPORT static const Standard_GUID& GetID ();
+  Standard_EXPORT TOcafFunction_CylDriver ();
+  Standard_EXPORT virtual  void Validate (Handle (TFunction_Logbook)& log) const;
+  Standard_EXPORT virtual  Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const;
+  Standard_EXPORT virtual  Standard_Integer Execute (Handle (TFunction_Logbook)& log) const;
 
+  // OCCT RTTI
+  DEFINE_STANDARD_RTTIEXT(TOcafFunction_CylDriver,TFunction_Driver)
 };
 
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
 #endif
index 26da435..60a3835 100755 (executable)
@@ -5,7 +5,7 @@
 //Modified by Sergey RUIN (An instanciation of the drivers)
 
 #include <stdafx.h>
-#include <TOcaf_Application.ixx>
+#include <TOcaf_Application.hxx>
 #include <TDF_Label.hxx>
 #include <TPrsStd_AISPresentation.hxx>
 #include <TPrsStd_AISViewer.hxx>
@@ -15,6 +15,8 @@
 #include "TOcafFunction_CylDriver.hxx"
 #include "TOcafFunction_CutDriver.hxx"
 
+IMPLEMENT_STANDARD_RTTIEXT (TOcaf_Application, TDocStd_Application)
+
 //=======================================================================
 //function : TOcaf_Application
 //purpose  : 
index 2efd458..c719daa 100755 (executable)
 class TDocStd_Document;
 
 
-class TOcaf_Application : public TDocStd_Application {
-
+class TOcaf_Application : public TDocStd_Application
+{
 public:
+  Standard_EXPORT TOcaf_Application ();
 
- // Methods PUBLIC
- // 
-Standard_EXPORT TOcaf_Application();
-
- // Type management
- //
- //Standard_EXPORT friend Handle(Standard_Type)& TOcaf_Application_Type_();
- Standard_EXPORT const Handle(TOcaf_Application) DownCast(const Handle(Standard_Transient)& AnObject);
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- // 
-
-
- // Fields PROTECTED
- //
-
-
-private: 
-
- // Methods PRIVATE
- // 
-
-
- // Fields PRIVATE
- //
-
-
+  // OCCT RTTI
+  DEFINE_STANDARD_RTTIEXT (TOcaf_Application, TDocStd_Application)
 };
 
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
 #endif
diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.ixx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.ixx
deleted file mode 100755 (executable)
index 5fec999..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-// File generated by CPPExt (Transient)
-//                     Copyright (C) 1991,1995 by
-//  
-//                      MATRA DATAVISION, FRANCE
-//  
-// This software is furnished in accordance with the terms and conditions
-// of the contract and with the inclusion of the above copyright notice.
-// This software or any other copy thereof may not be provided or otherwise
-// be made available to any other person. No title to an ownership of the
-// software is hereby transferred.
-//  
-// At the termination of the contract, the software and all copies of this
-// software must be deleted.
-//
-#include <TOcaf_Application.jxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-// DownCast method
-//   allow safe downcasting
-//
-const Handle(TOcaf_Application) TOcaf_Application::DownCast(const Handle(Standard_Transient)& AnObject) 
-{
-  Handle(TOcaf_Application) _anOtherObject;
-
-  if (!AnObject.IsNull()) {
-     if (AnObject->IsKind(STANDARD_TYPE(TOcaf_Application))) {
-       _anOtherObject = Handle(TOcaf_Application)((Handle(TOcaf_Application)&)AnObject);
-     }
-  }
-
-  return _anOtherObject ;
-}
-const Handle(Standard_Type)& TOcaf_Application::DynamicType() const 
-{ 
-  return STANDARD_TYPE(TOcaf_Application) ; 
-}
-Standard_Boolean TOcaf_Application::IsKind(const Handle(Standard_Type)& AType) const 
-{ 
-  return (STANDARD_TYPE(TOcaf_Application) == AType || TDocStd_Application::IsKind(AType)); 
-}
-
-
diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.jxx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.jxx
deleted file mode 100755 (executable)
index 56c7e21..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _TColStd_SequenceOfExtendedString_HeaderFile
-#include <TColStd_SequenceOfExtendedString.hxx>
-#endif
-#ifndef _TDocStd_Document_HeaderFile
-#include <TDocStd_Document.hxx>
-#endif
-#ifndef _TOcaf_Application_HeaderFile
-#include <TOcaf_Application.hxx>
-#endif