From: kgv Date: Mon, 17 Mar 2014 06:49:51 +0000 (+0400) Subject: CPPExt - do not generate Handle_Class.hxx files X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=a7841b90e3c0bc5523832c3857b25665c7102492;p=occt-wok.git CPPExt - do not generate Handle_Class.hxx files --- diff --git a/src/CPPExt/CPPExt.cxx b/src/CPPExt/CPPExt.cxx index c91ed95..456bdc5 100755 --- a/src/CPPExt/CPPExt.cxx +++ b/src/CPPExt/CPPExt.cxx @@ -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); } } diff --git a/src/CPPExt/CPPExt_Template.edl b/src/CPPExt/CPPExt_Template.edl index 156144d..d262071 100755 --- a/src/CPPExt/CPPExt_Template.edl +++ b/src/CPPExt/CPPExt_Template.edl @@ -60,10 +60,13 @@ $#define _%Class_HeaderFile $ $#include $#include -$#include $ $%TICIncludes $ +$class Handle(%Inherits); +$class %Class; +$DEFINE_STANDARD_HANDLE(%Class, %Inherits) +$ $%ClassComment $class %Class : public %Inherits ${ @@ -361,7 +364,9 @@ $#include $#include $#include $#include <%Inherits.hxx> -$#include +$ +$class %Class; +$DEFINE_STANDARD_HANDLE(%Class, %Inherits) $ $#if !defined No_Exception && !defined No_%Class $ #define %Class_Raise_if(CONDITION, MESSAGE) \