0028225: MFC sample on OCAF uses old-style definition of a Handle-class
[occt.git] / samples / mfc / standard / 06_Ocaf / src / OCAFSample_CommonDriver.hxx
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