]> OCCT Git - occt-wok.git/commitdiff
CPPExt - do not generate Handle_Class.hxx files
authorkgv <kgv@opencascade.com>
Mon, 17 Mar 2014 06:49:51 +0000 (10:49 +0400)
committerkgv <kgv@opencascade.com>
Wed, 19 Mar 2014 11:54:01 +0000 (15:54 +0400)
src/CPPExt/CPPExt.cxx
src/CPPExt/CPPExt_Template.edl

index c91ed950d14b94823fa14f277071c657862b8b12..456bdc5c59ea1a960019f49e4a4f8412d64fac2c 100755 (executable)
@@ -962,20 +962,18 @@ void CPP_Extract(const Handle(MS_MetaSchema)& aMeta,
     // Transient classes
     //
     if (aClass->IsTransient() && !aName->IsSameString(MS::GetTransientRootName())) {
-      Handle(TCollection_HAsciiString) aHandleFile = new TCollection_HAsciiString(outdir);
-      
-      aHandleFile->AssignCat("Handle_");
-      aHandleFile->AssignCat(aName);
-      aHandleFile->AssignCat(".hxx");
-
-      outfile->Append(aHandleFile);
+      ///Handle(TCollection_HAsciiString) aHandleFile = new TCollection_HAsciiString(outdir);
+      ///aHandleFile->AssignCat("Handle_");
+      ///aHandleFile->AssignCat(aName);
+      ///aHandleFile->AssignCat(".hxx");
+      ///outfile->Append(aHandleFile);
 
       if (aClass->GetInheritsNames()->Length() == 0) {
        ErrorMsg() << "CPPExt" << "incomplete metaschema..." << endm;
        Standard_NoSuchObject::Raise();
       }
 
-      CPP_TransientHandle(api,aName,aClass->GetInheritsNames()->Value(1),aHandleFile);
+    ///  CPP_TransientHandle(api,aName,aClass->GetInheritsNames()->Value(1),aHandleFile);
 
       if (aClass->IsKind(STANDARD_TYPE(MS_Error))) {
        CPP_ExceptionClass(aMeta,api,aClass,outfile);
@@ -987,13 +985,13 @@ void CPP_Extract(const Handle(MS_MetaSchema)& aMeta,
     // Persistent classes
     //
     else if (aClass->IsPersistent() && !aName->IsSameString(MS::GetPersistentRootName())) {
-      Handle(TCollection_HAsciiString) aHandleFile = new TCollection_HAsciiString(outdir);
+      ///Handle(TCollection_HAsciiString) aHandleFile = new TCollection_HAsciiString(outdir);
       
-      aHandleFile->AssignCat("Handle_");
-      aHandleFile->AssignCat(aName);
-      aHandleFile->AssignCat(".hxx");
+      ///aHandleFile->AssignCat("Handle_");
+      ///aHandleFile->AssignCat(aName);
+      ///aHandleFile->AssignCat(".hxx");
 
-      outfile->Append(aHandleFile);
+      ///outfile->Append(aHandleFile);
 
       if (aClass->GetInheritsNames()->Length() == 0) {
        ErrorMsg() << "CPPExt" << "incomplete metaschema..." << endm;
@@ -1001,19 +999,19 @@ void CPP_Extract(const Handle(MS_MetaSchema)& aMeta,
       }
 
       if (!strcmp(api->GetVariableValue("%CPPEXTDBMS")->ToCString(),"OBJY")) {
-       CPP_PersistentHandleOBJY(api,aName,aClass->GetInheritsNames()->Value(1),aHandleFile);
+       ///CPP_PersistentHandleOBJY(api,aName,aClass->GetInheritsNames()->Value(1),aHandleFile);
        CPP_PersistentClassOBJY(aMeta,api,aClass,outfile);
       }
       else if (!strcmp(api->GetVariableValue("%CPPEXTDBMS")->ToCString(),"MEM")) {
       }
       else if (!strcmp(api->GetVariableValue("%CPPEXTDBMS")->ToCString(),"OBJS")) {
-       CPP_PersistentHandleOBJS(api,aName,aClass->GetInheritsNames()->Value(1),aHandleFile);
+       ///CPP_PersistentHandleOBJS(api,aName,aClass->GetInheritsNames()->Value(1),aHandleFile);
        CPP_PersistentClassOBJS(aMeta,api,aClass,outfile);
       }
       else if (!strcmp(api->GetVariableValue("%CPPEXTDBMS")->ToCString(),"OO2")) {
       }
       else if (!strcmp(api->GetVariableValue("%CPPEXTDBMS")->ToCString(),"CSFDB")) {
-       CPP_PersistentHandleCSFDB(api,aName,aClass->GetInheritsNames()->Value(1),aHandleFile);
+       ///CPP_PersistentHandleCSFDB(api,aName,aClass->GetInheritsNames()->Value(1),aHandleFile);
        CPP_PersistentClassCSFDB(aMeta,api,aClass,outfile);
       }
     }
index 156144d3bd1c9d3da3144bf60c8422b47b8335a5..d262071c670c28903af8e09cd72b12570809ee97 100755 (executable)
@@ -60,10 +60,13 @@ $#define _%Class_HeaderFile
 $
 $#include <Standard.hxx>
 $#include <Standard_DefineHandle.hxx>
-$#include <Handle_%Class.hxx>
 $
 $%TICIncludes
 $
+$class Handle(%Inherits);
+$class %Class;
+$DEFINE_STANDARD_HANDLE(%Class, %Inherits)
+$
 $%ClassComment
 $class %Class : public %Inherits
 ${
@@ -361,7 +364,9 @@ $#include <Standard_DefineHandle.hxx>
 $#include <Standard_DefineException.hxx>
 $#include <Standard_SStream.hxx>
 $#include <%Inherits.hxx>
-$#include <Handle_%Class.hxx>
+$
+$class %Class;
+$DEFINE_STANDARD_HANDLE(%Class, %Inherits)
 $
 $#if !defined No_Exception && !defined No_%Class
 $  #define %Class_Raise_if(CONDITION, MESSAGE) \