From 7c55267b3029fc18393bd1563e9519a17a4910d5 Mon Sep 17 00:00:00 2001 From: cas Date: Fri, 9 Jun 2000 14:09:51 +0000 Subject: [PATCH] No comments --- src/WOKBuilder/WOKBuilder_Compiler.cxx | 4 +- src/WOKBuilder/WOKBuilder_Entity.lxx | 2 +- src/WOKBuilder/WOKBuilder_Linker.cxx | 31 ++- src/WOKBuilder/WOKBuilder_MSAction.lxx | 6 +- src/WOKBuilder/WOKBuilder_MSActionID.lxx | 6 +- src/WOKBuilder/WOKBuilder_MSEntity.lxx | 4 +- src/WOKBuilder/WOKBuilder_MSExtractor.cxx | 2 +- .../WOKBuilder_MSHeaderExtractor.cdl | 6 + .../WOKBuilder_MSHeaderExtractor.cxx | 188 ++++++++++-------- src/WOKBuilder/WOKBuilder_MSchema.lxx | 2 +- src/WOKBuilder/WOKBuilder_Tool.lxx | 2 +- src/WOKBuilder/WOKBuilder_WNTCollector.cxx | 13 -- 12 files changed, 149 insertions(+), 117 deletions(-) diff --git a/src/WOKBuilder/WOKBuilder_Compiler.cxx b/src/WOKBuilder/WOKBuilder_Compiler.cxx index cfbea08..a5a0a67 100755 --- a/src/WOKBuilder/WOKBuilder_Compiler.cxx +++ b/src/WOKBuilder/WOKBuilder_Compiler.cxx @@ -281,7 +281,9 @@ WOKBuilder_BuildStatus WOKBuilder_Compiler::Execute() if ( !astr -> IsEmpty () ) { - OSD_Path dPath ( OutputDir () -> Name () -> ToCString () ); +// OSD_Path dPath ( OutputDir () -> Name () -> ToCString () ); + TCollection_AsciiString atstr = OutputDir () -> Name () -> ToCString () ; + OSD_Path dPath ( atstr ); dPath.SetName ( Compilable () -> Path () -> BaseName () -> ToCString () ); dPath.SetExtension ( ".d" ); diff --git a/src/WOKBuilder/WOKBuilder_Entity.lxx b/src/WOKBuilder/WOKBuilder_Entity.lxx index 9dae91d..e957fb9 100755 --- a/src/WOKBuilder/WOKBuilder_Entity.lxx +++ b/src/WOKBuilder/WOKBuilder_Entity.lxx @@ -9,7 +9,7 @@ //function : Path //purpose : //======================================================================= -const Handle(WOKUtils_Path)& WOKBuilder_Entity::Path() const +inline const Handle(WOKUtils_Path)& WOKBuilder_Entity::Path() const { return mypath; } diff --git a/src/WOKBuilder/WOKBuilder_Linker.cxx b/src/WOKBuilder/WOKBuilder_Linker.cxx index 1484c77..e9c7dfd 100755 --- a/src/WOKBuilder/WOKBuilder_Linker.cxx +++ b/src/WOKBuilder/WOKBuilder_Linker.cxx @@ -456,7 +456,9 @@ WOKBuilder_BuildStatus WOKBuilder_Linker::Execute() objstream.close(); Params().Set("%LD_ObjList", objlistpath->Name()->ToCString()); -#if defined( LIN ) || defined( SOLARIS ) +// CheckUndef +//#if defined( LIN ) || defined( SOLARIS ) || defined( IRIX ) || defined( HPUX ) +#ifndef WNT Handle( TCollection_HAsciiString ) args[ 10 ]; #else Handle( TCollection_HAsciiString ) args[ 4 ]; @@ -472,7 +474,8 @@ WOKBuilder_BuildStatus WOKBuilder_Linker::Execute() Shell () -> Send ( args[ 0 ] ); Shell () -> Send ( args[ 1 ] ); Shell () -> Send ( args[ 2 ] ); -#if !defined( LIN ) && !defined( SOLARIS ) +//#if !defined( LIN ) && !defined( SOLARIS ) && !defined( IRIX ) && !defined( HPUX ) +#ifdef WNT Shell () -> Execute ( args[ 3 ] ); } else { @@ -482,15 +485,21 @@ WOKBuilder_BuildStatus WOKBuilder_Linker::Execute() } // end if Handle( TCollection_HAsciiString ) target = Params ().Value ( "%Target", 1 ); -#if defined( LIN ) +# if defined( LIN ) static Handle( TCollection_HAsciiString ) skipStr = new TCollection_HAsciiString ( "/usr/bin/ld: warning: cannot find entry symbol _start" ); -#elif defined ( SOLARIS ) +# elif defined ( SOLARIS ) static Handle( TCollection_HAsciiString ) skipStr = new TCollection_HAsciiString ( "ld: fatal: Symbol referencing errors." ); static Handle( TCollection_HAsciiString ) skipStr1 = new TCollection_HAsciiString ( "/crt1.o" ); -#endif // LIN || SOLARIS +# elif defined ( IRIX ) + static Handle( TCollection_HAsciiString ) skipStr = + new TCollection_HAsciiString ( "ld: fatal: Symbol referencing errors." ); +# elif defined ( HPUX ) + static Handle( TCollection_HAsciiString ) skipStr = + new TCollection_HAsciiString ( "ld: fatal: Symbol referencing errors." ); +# endif // LIN || SOLARIS Handle( TCollection_HAsciiString ) uType = Params ().Value ( "%UnitType", 0 ); if ( !uType.IsNull () && @@ -559,7 +568,8 @@ WOKBuilder_BuildStatus WOKBuilder_Linker::Execute() f.Build ( OSD_WriteOnly, OSD_Protection () ); if ( !f.Failed () ) { -#if !defined( LIN ) && !defined( SOLARIS ) +//#if !defined( LIN ) && !defined( SOLARIS ) && !defined( IRIX ) && !defined( HPUX ) +#ifdef WNT for ( i = 0; i < 4; ++i ) { #else // for ( i = 0; i < 11; ++i ) { JR : @@ -570,7 +580,8 @@ WOKBuilder_BuildStatus WOKBuilder_Linker::Execute() f.Write ( args[ i ] -> String (), args[ i ] -> Length () ); } // end for -#if !defined( LIN ) && !defined( SOLARIS ) +//#if !defined( LIN ) && !defined( SOLARIS ) && !defined( IRIX ) && !defined( HPUX ) +#ifdef WNT f.Write ( "\n", 1 ); #endif // LIN f.Close (); @@ -591,7 +602,8 @@ WOKBuilder_BuildStatus WOKBuilder_Linker::Execute() ErrorMsg.DontPrintHeader(); for(Standard_Integer i=1; i<= errmsgs->Length(); i++) { -#if defined( LIN ) || defined( SOLARIS ) +//#if defined( LIN ) || defined( SOLARIS ) || defined( IRIX ) || defined( HPUX ) +#ifndef WNT if ( errmsgs -> Value ( i ) -> Search ( skipStr ) == 1 ) continue; #endif // LIN || SOLARIS #ifdef SOLARIS @@ -618,7 +630,8 @@ WOKBuilder_BuildStatus WOKBuilder_Linker::Execute() #endif // SOLARIS for(Standard_Integer i=1; i<= errmsgs->Length(); i++) { -#if defined( LIN ) || defined( SOLARIS ) +//#if defined( LIN ) || defined( SOLARIS ) || defined( IRIX ) || defined( HPUX ) +#ifndef WNT if ( errmsgs -> Value ( i ) -> Search ( skipStr ) == 1 ) continue; #endif // LIN || SOLARIS #ifdef SOLARIS diff --git a/src/WOKBuilder/WOKBuilder_MSAction.lxx b/src/WOKBuilder/WOKBuilder_MSAction.lxx index 52d3714..29e1e31 100755 --- a/src/WOKBuilder/WOKBuilder_MSAction.lxx +++ b/src/WOKBuilder/WOKBuilder_MSAction.lxx @@ -9,7 +9,7 @@ //function : Entity //purpose : //======================================================================= -const Handle(WOKBuilder_MSEntity)& WOKBuilder_MSAction::Entity() const +inline const Handle(WOKBuilder_MSEntity)& WOKBuilder_MSAction::Entity() const { return myent; } @@ -19,7 +19,7 @@ const Handle(WOKBuilder_MSEntity)& WOKBuilder_MSAction::Entity() const //function : Type //purpose : //======================================================================= -WOKBuilder_MSActionType WOKBuilder_MSAction::Type() const +inline WOKBuilder_MSActionType WOKBuilder_MSAction::Type() const { return mytype; } @@ -29,7 +29,7 @@ WOKBuilder_MSActionType WOKBuilder_MSAction::Type() const //function : Date //purpose : //======================================================================= -WOKUtils_TimeStat WOKBuilder_MSAction::Date() const +inline WOKUtils_TimeStat WOKBuilder_MSAction::Date() const { return mydate; } diff --git a/src/WOKBuilder/WOKBuilder_MSActionID.lxx b/src/WOKBuilder/WOKBuilder_MSActionID.lxx index 8926d0a..0fba81f 100755 --- a/src/WOKBuilder/WOKBuilder_MSActionID.lxx +++ b/src/WOKBuilder/WOKBuilder_MSActionID.lxx @@ -11,7 +11,7 @@ //function : WOKBuilder_MSActionID //purpose : //======================================================================= - WOKBuilder_MSActionID::WOKBuilder_MSActionID(const Handle(TCollection_HAsciiString)& aname, + inline WOKBuilder_MSActionID::WOKBuilder_MSActionID(const Handle(TCollection_HAsciiString)& aname, const WOKBuilder_MSActionType atype) : myname(aname), mytype(atype) { @@ -21,7 +21,7 @@ //function : Name //purpose : //======================================================================= -const Handle(TCollection_HAsciiString)& WOKBuilder_MSActionID::Name() const +inline const Handle(TCollection_HAsciiString)& WOKBuilder_MSActionID::Name() const { return myname; } @@ -30,7 +30,7 @@ const Handle(TCollection_HAsciiString)& WOKBuilder_MSActionID::Name() const //function : Type //purpose : //======================================================================= -WOKBuilder_MSActionType WOKBuilder_MSActionID::Type() const +inline WOKBuilder_MSActionType WOKBuilder_MSActionID::Type() const { return mytype; } diff --git a/src/WOKBuilder/WOKBuilder_MSEntity.lxx b/src/WOKBuilder/WOKBuilder_MSEntity.lxx index bd9e285..31743b9 100755 --- a/src/WOKBuilder/WOKBuilder_MSEntity.lxx +++ b/src/WOKBuilder/WOKBuilder_MSEntity.lxx @@ -4,12 +4,12 @@ // -const Handle(TCollection_HAsciiString)& WOKBuilder_MSEntity::Name() const +inline const Handle(TCollection_HAsciiString)& WOKBuilder_MSEntity::Name() const { return myname; } -const Handle(WOKBuilder_Specification)& WOKBuilder_MSEntity::File() const +inline const Handle(WOKBuilder_Specification)& WOKBuilder_MSEntity::File() const { return myfile; } diff --git a/src/WOKBuilder/WOKBuilder_MSExtractor.cxx b/src/WOKBuilder/WOKBuilder_MSExtractor.cxx index 14ec9c5..713561d 100755 --- a/src/WOKBuilder/WOKBuilder_MSExtractor.cxx +++ b/src/WOKBuilder/WOKBuilder_MSExtractor.cxx @@ -90,7 +90,7 @@ void WOKBuilder_MSExtractor::Load() if(libpath.IsNull()) { ErrorMsg << "WOKBuilder_MSExtractor::Load" - << "Could not find file : " << myshared << endm; + << "WOKBuilder_MSExtractor::Load Could not find file : " << myshared << endm; } } diff --git a/src/WOKBuilder/WOKBuilder_MSHeaderExtractor.cdl b/src/WOKBuilder/WOKBuilder_MSHeaderExtractor.cdl index 87b7023..a5d635f 100755 --- a/src/WOKBuilder/WOKBuilder_MSHeaderExtractor.cdl +++ b/src/WOKBuilder/WOKBuilder_MSHeaderExtractor.cdl @@ -25,6 +25,12 @@ is searchlist : HSequenceOfHAsciiString from TColStd) returns mutable MSHeaderExtractor from WOKBuilder; + Create ( + aname : HAsciiString from TCollection; + ashared : HAsciiString from TCollection; + searchlist : HSequenceOfHAsciiString from TColStd + ) returns mutable MSHeaderExtractor from WOKBuilder; + Create(aname : HAsciiString from TCollection; params : Param from WOKUtils) returns mutable MSHeaderExtractor from WOKBuilder; diff --git a/src/WOKBuilder/WOKBuilder_MSHeaderExtractor.cxx b/src/WOKBuilder/WOKBuilder_MSHeaderExtractor.cxx index 735a0b1..d86aa99 100755 --- a/src/WOKBuilder/WOKBuilder_MSHeaderExtractor.cxx +++ b/src/WOKBuilder/WOKBuilder_MSHeaderExtractor.cxx @@ -23,6 +23,11 @@ #include +WOKBuilder_MSHeaderExtractor :: WOKBuilder_MSHeaderExtractor ( + const Handle( TCollection_HAsciiString )& aname, + const Handle( TCollection_HAsciiString )& ashared, + const Handle( TColStd_HSequenceOfHAsciiString )& searchlist + ) : WOKBuilder_MSExtractor ( aname, ashared, searchlist ) {} //======================================================================= //function : WOKBuilder_MSHeaderExtractor @@ -56,102 +61,121 @@ WOKBuilder_MSHeaderExtractor::WOKBuilder_MSHeaderExtractor(const Handle(TCollect //function : GetTypeDepList //purpose : //======================================================================= -Handle(TColStd_HSequenceOfHAsciiString) WOKBuilder_MSHeaderExtractor::GetTypeDepList(const Handle(TCollection_HAsciiString)& aname) const -{ - Handle(TColStd_HSequenceOfHAsciiString) result = new TColStd_HSequenceOfHAsciiString; - Handle(TColStd_HSequenceOfHAsciiString) aList = new TColStd_HSequenceOfHAsciiString; - Handle(TCollection_HAsciiString) astr; - Handle(MS_MetaSchema) ameta = MSchema()->MetaSchema(); - Handle(MS_Type) atype; - Standard_Integer i; +Handle( TColStd_HSequenceOfHAsciiString ) + WOKBuilder_MSHeaderExtractor :: GetTypeDepList ( + const Handle( TCollection_HAsciiString )& aname + ) const { - result->Append(aname); + Standard_Integer i; + Handle( MS_Type ) atype; + Handle( TCollection_HAsciiString ) astr; + Handle( TCollection_HAsciiString ) aName = aname -> Token ( "@" ); + Handle( TColStd_HSequenceOfHAsciiString ) result = new TColStd_HSequenceOfHAsciiString (); + Handle( TColStd_HSequenceOfHAsciiString ) aList = new TColStd_HSequenceOfHAsciiString (); + Handle( MS_MetaSchema ) ameta = MSchema () -> MetaSchema (); - if(ameta->IsPackage(aname)) - { - WOK_TRACE { - VerboseMsg("WOK_EXTRACT") << "WOKBuilder_MSHeaderExtractor::ExtractionStatus" - << "Package not yet Implemented : Out of date" << endm; - } - return result; - } + result -> Append ( aName ); + + if ( ameta -> IsPackage ( aName ) ) { + + WOK_TRACE { + + VerboseMsg ( "WOK_EXTRACT" ) << "WOKBuilder_MSHeaderExtractor::ExtractionStatus" + << "Package not yet Implemented : out of date" + << endm; + } // end WOK_TRACE + + return result; + + } // end if - atype = ameta->GetType(aname); + atype = ameta -> GetType ( aName ); - if(atype.IsNull()) - { - Handle(MS_Package) apk = ameta->GetPackage(aname); + if ( atype.IsNull () ) { + + Handle( MS_Package ) apk = ameta -> GetPackage ( aName ); - if(apk.IsNull()) - { - ErrorMsg << "WOKBuilder_MSHeaderExtractor::ExtractionStatus" - << aname << " is not a known package and not a known type" << endm; - return result; - } - } + if ( apk.IsNull () ) { + + ErrorMsg << "WOKBuilder_MSHeaderExtractor::ExtractionStatus" + << aName + << " is not a known package and not a known type" + << endm; + + return result; + + } // end if + + } // end if - if(atype->IsKind(STANDARD_TYPE(MS_Class))) - { - Handle(MS_Class) aclass = Handle(MS_Class)::DownCast(atype); + if ( atype -> IsKind ( STANDARD_TYPE( MS_Class ) ) ) { + + Handle( MS_Class ) aclass = Handle( MS_Class ) :: DownCast ( atype ); - if(!aclass->IsKind(STANDARD_TYPE(MS_GenClass))) - { - MS::ClassUsedTypes(ameta, aclass, aList, aList); + if ( !aclass -> IsKind ( STANDARD_TYPE( MS_GenClass ) ) ) { + + MS :: ClassUsedTypes (ameta, aclass, aList, aList ); - if(atype->IsKind(STANDARD_TYPE(MS_StdClass))) - { - Handle(MS_StdClass) msclass = Handle(MS_StdClass)::DownCast(atype); + if ( atype -> IsKind ( STANDARD_TYPE( MS_StdClass ) ) ) { + + Handle( MS_StdClass ) msclass = Handle( MS_StdClass ) :: DownCast ( atype ); - if(!msclass->GetMyCreator().IsNull()) - { - // instantiation - result->Append(MSchema()->AssociatedEntity(aname)); - } - if(atype->IsKind(STANDARD_TYPE(MS_Error))) - { - // exception - result->Append(MSchema()->AssociatedEntity(aname)); - } - } + if ( !msclass -> GetMyCreator ().IsNull () ) + + result -> Append ( MSchema () -> AssociatedEntity ( aName ) ); + + if ( atype -> IsKind ( STANDARD_TYPE( MS_Error ) ) ) + + result -> Append ( MSchema () -> AssociatedEntity ( aName ) ); + + } // end if - WOKTools_MapOfHAsciiString amap; + WOKTools_MapOfHAsciiString amap; - for(i=1; i<=aList->Length(); i++) - { - astr = aList->Value(i); - if(!strncmp("Handle_", aList->Value(i)->ToCString(), strlen("Handle_"))) - { - astr = astr->SubString(strlen("Handle_")+1, astr->Length()); - } - if(!amap.Contains(astr)) - { - amap.Add(astr); - result->Append(astr); - } - } - } - } - else - { - if(atype->IsKind(STANDARD_TYPE(MS_Pointer))) - { - Handle(MS_Pointer) apointer = Handle(MS_Pointer)::DownCast(atype); + for ( i = 1; i <= aList -> Length (); ++i ) { + + astr = aList -> Value ( i ); + + if ( !strncmp ( "Handle_", aList -> Value ( i ) -> ToCString (), strlen ( "Handle_" ) ) ) + + astr = astr -> SubString ( strlen ( "Handle_" ) + 1, astr -> Length () ); + + if ( !amap.Contains ( astr ) ) { + + amap.Add ( astr ); + result -> Append ( astr ); + + } // end if + + } // end for + + } // end if + + } else { + + if ( atype -> IsKind ( STANDARD_TYPE( MS_Pointer ) ) ) { + + Handle( MS_Pointer ) apointer = Handle( MS_Pointer ) :: DownCast ( atype ); - result->Append(apointer->Type()); - } - else - { - if(atype->IsKind(STANDARD_TYPE(MS_Alias))) - { - Handle(MS_Alias) analias = Handle(MS_Alias)::DownCast(atype); + result -> Append ( apointer -> Type () ); + + } else { + + if ( atype -> IsKind ( STANDARD_TYPE( MS_Alias ) ) ) { + + Handle( MS_Alias ) analias = Handle( MS_Alias ) :: DownCast ( atype ); - result->Append(analias->Type()); - } - } - } - return result; -} + result -> Append ( analias -> Type () ); + + } // end if + + } // end else + + } // end else + + return result; +} // end WOKBuilder_MSHeaderExtractor :: GetTypeDepList //======================================================================= //function : GetTypeMDate //purpose : diff --git a/src/WOKBuilder/WOKBuilder_MSchema.lxx b/src/WOKBuilder/WOKBuilder_MSchema.lxx index 4f50344..43733aa 100755 --- a/src/WOKBuilder/WOKBuilder_MSchema.lxx +++ b/src/WOKBuilder/WOKBuilder_MSchema.lxx @@ -8,7 +8,7 @@ //function : MetaSchema //purpose : //======================================================================= -const Handle(MS_MetaSchema)& WOKBuilder_MSchema::MetaSchema() const +inline const Handle(MS_MetaSchema)& WOKBuilder_MSchema::MetaSchema() const { return myschema; } diff --git a/src/WOKBuilder/WOKBuilder_Tool.lxx b/src/WOKBuilder/WOKBuilder_Tool.lxx index 957fdb8..1e96626 100755 --- a/src/WOKBuilder/WOKBuilder_Tool.lxx +++ b/src/WOKBuilder/WOKBuilder_Tool.lxx @@ -4,7 +4,7 @@ //function : Params //purpose : //======================================================================= -const WOKUtils_Param& WOKBuilder_Tool::Params() const +inline const WOKUtils_Param& WOKBuilder_Tool::Params() const { return myparams; } diff --git a/src/WOKBuilder/WOKBuilder_WNTCollector.cxx b/src/WOKBuilder/WOKBuilder_WNTCollector.cxx index 1f695bb..679dc42 100755 --- a/src/WOKBuilder/WOKBuilder_WNTCollector.cxx +++ b/src/WOKBuilder/WOKBuilder_WNTCollector.cxx @@ -24,9 +24,6 @@ #endif //WNT static void FASTCALL _print_output ( Standard_CString, WOKBuilder_Tool* ); -#ifdef DEB -static void FASTCALL _delete_file ( const Handle( TCollection_HAsciiString )& ); -#endif //---> EUG4YAN Standard_IMPORT Standard_Boolean g_fCompOrLnk; //<--- EUG4YAN @@ -243,13 +240,3 @@ static void FASTCALL _print_output( Standard_CString msg, WOKBuilder_Tool* tool InfoMsg << endm; } - -// Unused : -#ifdef DEB -static void FASTCALL _delete_file(const Handle(TCollection_HAsciiString)& name) -{ - Handle(WOKUtils_Path) path = new WOKUtils_Path(name); - - if(path->Exists()) path->RemoveFile(); -} -#endif -- 2.39.5