]> OCCT Git - occt-wok.git/commitdiff
0024023: Revamp the OCCT Handle
authorabv <abv@opencascade.com>
Tue, 8 Apr 2014 04:23:21 +0000 (08:23 +0400)
committerabv <abv@opencascade.com>
Tue, 8 Apr 2014 05:28:32 +0000 (09:28 +0400)
Eliminate macros for Handles and RTTI code in header files generated from CDL

src/CPPExt/CPPExt_Template.edl

index 4ee0a7a64f5144966e06d029c9ca28eb5483a1b6..fc3a3a226c3b7c46e6d59bde96d00bfb6423bc4e 100755 (executable)
@@ -60,7 +60,6 @@ $#define _%Class_HeaderFile
 $
 $#include <Standard.hxx>
 $#include <Standard_DefineHandle.hxx>
-$#include <Handle_%Class.hxx>
 $
 $%TICIncludes
 $
@@ -124,10 +123,6 @@ $#include <Standard_DefineHandle.hxx>
 $
 $%TICIncludes
 $
-$class Handle(%Inherits);
-$class %Class;
-$DEFINE_STANDARD_HANDLE(%Class, %Inherits)
-$
 $%ClassComment
 $class %Class : public %Inherits
 ${
@@ -161,20 +156,9 @@ $#endif // _%Class_HeaderFile
 @end;
 
 @template TransientIxx (%Class,%Suffix,%Supplement,%TypeMgt,%Methods) is
-$// This file is generated by WOK (CPPExt).
-$// Please do not edit this file; modify original file instead.
-$// The copyright and license terms as defined for the original file apply to
-$// this header file considered to be the "object code" form of the original source.
-$
-$#include <%Class.%Suffix>
+$// Useless stuff
 $
 $#include <Standard_Type.hxx>
-$
-$%Supplement 
-$
-$%TypeMgt
-$
-$%Methods
 @end;
 
 -- ================================
@@ -290,8 +274,6 @@ $#include <Standard_Macro.hxx>
 $
 $%TICIncludes
 $
-$Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(%Class);
-$
 $%ClassComment
 $class %Class %Inherits
 ${
@@ -352,8 +334,6 @@ $
 $#ifndef _%Class_HeaderFile
 $#define _%Class_HeaderFile
 $
-$#include <Standard_PrimitiveTypes.hxx>
-$
 $%EnumComment
 $enum %Class
 ${
@@ -384,8 +364,6 @@ $
 $typedef %Inherits %Class;
 $%HandleTypedef
 $
-$#define %Class_Type_() %Inherits_Type_()
-$
 $#endif // _%Class_HeaderFile
 @end;
 
@@ -427,7 +405,6 @@ $#include <Standard_SStream.hxx>
 $#include <%Inherits.hxx>
 $
 $class %Class;
-$DEFINE_STANDARD_HANDLE(%Class, %Inherits)
 $
 $#if !defined No_Exception && !defined No_%Class
 $  #define %Class_Raise_if(CONDITION, MESSAGE) \
@@ -472,7 +449,6 @@ $#define Handle_%DName Handle_%DValue
 
 @template ItemHandleDefine (%DName,%DValue) is
 $#define Handle_%DName Handle_%DValue
-$#define %DName_Type_() %DValue_Type_()
 @end;
 
 @template Undefine(%DName) is
@@ -490,7 +466,6 @@ $#undef Handle_%DName
 
 @template ItemHandleUndefine(%DName) is
 $#undef Handle_%DName
-$#undef %DName_Type_
 @end;
 
 @template ShortDec(%IClass) is
@@ -561,26 +536,21 @@ $\^
 @end;
 
 @template TypeMgtAncestor(%Nb,%Ancestors) is
-$  STANDARD_TYPE(%Ancestors),
+$
 @end;
 
 @template TypeMgt(%Class,%Inherits,%Ancestors) is
 $
-$IMPLEMENT_STANDARD_TYPE(%Class)
-$IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
-$%Inherits
-$IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-$IMPLEMENT_STANDARD_TYPE_END(%Class)
 @end;
 
 -- type management : END
 
 @template DownCast(%Class,%IClass) is
-$IMPLEMENT_DOWNCAST(%Class,%IClass)
+$
 @end;
 
 @template DynamicType(%Class) is
-$IMPLEMENT_STANDARD_RTTI(%Class)
+$
 @end;
 
 @template IsKind(%Class,%IClass) is