]> OCCT Git - occt-wok.git/commitdiff
No comments
authorcas <cas@opencascade.com>
Fri, 9 Jun 2000 14:09:51 +0000 (14:09 +0000)
committercas <cas@opencascade.com>
Fri, 9 Jun 2000 14:09:51 +0000 (14:09 +0000)
12 files changed:
src/WOKBuilder/WOKBuilder_Compiler.cxx
src/WOKBuilder/WOKBuilder_Entity.lxx
src/WOKBuilder/WOKBuilder_Linker.cxx
src/WOKBuilder/WOKBuilder_MSAction.lxx
src/WOKBuilder/WOKBuilder_MSActionID.lxx
src/WOKBuilder/WOKBuilder_MSEntity.lxx
src/WOKBuilder/WOKBuilder_MSExtractor.cxx
src/WOKBuilder/WOKBuilder_MSHeaderExtractor.cdl
src/WOKBuilder/WOKBuilder_MSHeaderExtractor.cxx
src/WOKBuilder/WOKBuilder_MSchema.lxx
src/WOKBuilder/WOKBuilder_Tool.lxx
src/WOKBuilder/WOKBuilder_WNTCollector.cxx

index cfbea08829b9d5892e018ad0797dfa5a66368966..a5a0a674dbd266a34aa8d6bbdef5c9c02cf39c32 100755 (executable)
@@ -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" );
index 9dae91d8123a78d19f49aeb4de0508df3b4d4b11..e957fb9520d53b1b4bde79d24234fb3e8092f747 100755 (executable)
@@ -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;
 }
index 1484c7701424b6492730024ef0ed00a265653372..e9c7dfd57fbb89f7c42f488d8373583665a4b524 100755 (executable)
@@ -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
index 52d37143c7e5477b9536a1315fef3890f6b6f0a9..29e1e31282bad124224857336257dc3e4ea39ca4 100755 (executable)
@@ -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;
 }
index 8926d0aedebd7cf3034b4601daf919c8dc0f52a1..0fba81fbfdb9fb0a1087924770530faedf96afc7 100755 (executable)
@@ -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;
 }
index bd9e285d711fd0a60e714abf68e356f5301a463f..31743b963b2d742175078cbca9982ca45e7bf307 100755 (executable)
@@ -4,12 +4,12 @@
 //             <jga@cobrax.paris1.matra-dtv.fr>
 
 
-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;
 }
index 14ec9c5be0ea7153ce141d430779523674523617..713561d5209e86eb157e51ab0dff3750e44ce38e 100755 (executable)
@@ -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;
        }
     }
 
index 87b7023402ae164c0d2fdaf3e5c03855921bf515..a5d635f1c3afd21f571b7201899b0d174bcbf198 100755 (executable)
@@ -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;
 
index 735a0b1f440318cd3e4c673d922b84743a8a2223..d86aa998a37e0d2cf3ac3b4f555fc83106585bd2 100755 (executable)
 #include <WOKBuilder_MSHeaderExtractor.ixx>
 
 
+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  : 
index 4f503446530b10c7f989f1fd1636e076a1a264b5..43733aa2e99653b127fb985bffd4379fe4dd3de0 100755 (executable)
@@ -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;
 }
index 957fdb830e31dc3f82a8b4b5197af2e338e6d8ea..1e96626e69a567ad3af344a759872a346c772c90 100755 (executable)
@@ -4,7 +4,7 @@
 //function : Params
 //purpose  : 
 //=======================================================================
-const WOKUtils_Param& WOKBuilder_Tool::Params() const
+inline const WOKUtils_Param& WOKBuilder_Tool::Params() const
 {
   return myparams;
 }
index 1f695bbbc7325d6b537af13373cd99bcfb0f01f4..679dc428d10b99ab6fb02b266f53d6f7e3435c6f 100755 (executable)
@@ -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