--- /dev/null
+OBJS.edl
+OBJSSCHEMA.edl
--- /dev/null
+-- File: OBJS.edl
+-- Author: Jean GAUTIER
+-- History: Mon Feb 24 15:46:57 1997 Jean GAUTIER Creation
+-- Copyright: Matra Datavision 1997
+
+@ifnotdefined ( %OBJS_EDL) then
+@set %OBJS_EDL = "";
+
+
+ @template OBJS_LibSchemaFileName ( %OBJS_LibSchemaName ) is
+ $lib%OBJS_LibSchemaName.ldb\^
+ @end;
+
+ @template OBJS_AppSchemaFileName ( %OBJS_AppSchemaName ) is
+ $lib%OBJS_AppSchemaName.asdb\^
+ @end;
+
+ @template OBJS_AppSchemaCxxFileName ( %OBJS_AppSchemaName ) is
+ $%OBJS_AppSchemaName_os_schema.cxx\^
+ @end;
+
+ @if ( %Station == "sun" ) then
+ @set %OBJS_Root = "/PRODUCTS/OS4.0.2/sunpro";
+ @set %OBJS_OSSG_Options = "-Usun -DSOLARIS -DOBJS -no_default_includes -sopt /PRODUCTS/OS4.0.2/sunpro/etc/schema.opt -padm -arch set5 -I/opt/DEV4_2/SUNWspro/SC4.0/include/CC cargox:/PRODUCTS/OS4.0.2/sunpro/lib/liboscol.ldb";
+ @endif;
+
+ @if ( %Station == "sil" ) then
+ @set %OBJS_Root = "/PRODUCTS/OS4.0.3";
+ @set %OBJS_OSSG_Options = "-DIRIX -DOBJS -no_default_includes -sopt /PRODUCTS/OS4.0.3/etc/schema.opt -padm -arch set5 -I/usr/include/CC detax:/PRODUCTS/OS4.0.3/lib/liboscol.ldb";
+ @endif;
+
+ @if ( %Station == "ao1" ) then
+ @set %OBJS_Root = "/PRODUCTS/OS4.0.2";
+ @set %OBJS_OSSG_Options = "-DDECOSF1 -DOBJS -no_default_includes -sopt /PRODUCTS/OS4.0.2/etc/schema.opt -padm -arch set5 -xtaso_short -vptr_size_short -I/usr/include -I/usr/include/cxx decalon:/PRODUCTS/OS4.0.2/lib/liboscol.ldb";
+ @endif;
+
+ @if ( %Station == "hp" ) then
+ @set %OBJS_Root = "/PRODUCTS/OS4.0.2";
+ @set %OBJS_OSSG_Options = "-DHPUX -DOBJS -no_default_includes -sopt /PRODUCTS/OS4.0.2/etc/schema.opt -padm -arch set5 -I/opt/CC/include/CC fourbux:/PRODUCTS/OS4.0.2/lib/liboscol.ldb";
+ @endif;
+
+ @template OBJS_OSSG_IncDirective ( %OBJS_IncDir ) is
+ $ -I%OBJS_IncDir \
+ @end;
+
+ @set %OBJS_OSSG_ArchDirective = "";
+
+ @if ( %Station != "hp" ) then
+ @set %LDPATHVAR = "LD_LIBRARY_PATH";
+ @else
+ @set %LDPATHVAR = "SHLIB_PATH";
+ @endif;
+
+ @set %OBJS_OSSG_Suffix = " >& /tmp/ossg.$$";
+
+ @template OBJS_OSSG_CmdLine ( %OBJS_Root, %OBJS_IncDirectives, %OBJS_OSSG_Options, %LDPATHVAR, %OBJS_OSSG_Suffix, %Station,
+ %OBJS_SchFile, %OBJS_OutputDir, %OBJS_OSSG_ArchDirective, %OBJS_TargetDir, %OBJS_AppSchemaName) is
+ $echo "%OBJS_IncDirectives"
+ $setenv OS_ROOTDIR "%OBJS_Root"
+ $setenv OS_COMP_SCHEMA_CHANGE_ACTION warn
+ $setenv OS_CACHE_SIZE 8192000
+ $/bin/env %LDPATHVAR=/usr/local/shlib:%OBJS_Root/lib %OBJS_Root/bin/ossg %OBJS_OSSG_ArchDirective %OBJS_IncDirectives -I%OBJS_Root/include %OBJS_OSSG_Options \
+ $ -asdb %OBJS_OutputDir/lib%OBJS_AppSchemaName.asdb -final_asdb %OBJS_TargetDir/lib%OBJS_AppSchemaName.asdb %OBJS_SchFile \
+ $ -assf %OBJS_OutputDir/%OBJS_AppSchemaName_os_schema.cxx %OBJS_OSSG_Suffix
+ $set wok_csh_status = $status
+ $if ( $wok_csh_status != 0 ) then
+ $ echo "Error : errors occured in ossg"
+ $endif
+ $cat /tmp/ossg.$$
+ $rm -f /tmp/ossg.$$
+ $set status = $wok_csh_status
+ @end;
+
+@endif;
--- /dev/null
+-- File: OBJSSCHEMA.edl
+-- Author: Jean GAUTIER
+-- History: Mon Feb 24 15:51:26 1997 Jean GAUTIER Creation
+-- Copyright: Matra Datavision 1997
+
+@ifnotdefined ( %OBJSSCHEMA_EDL) then
+@set %OBJSSCHEMA_EDL = "";
+
+
+@if ( %Station == "hp" ) then
+ @set %OBJSSCHEMA_Shared = "libOBJSSchema.sl";
+@endif;
+
+@if ( %Station != "hp" ) then
+ @set %OBJSSCHEMA_Shared = "libOBJSSchema.so";
+@endif;
+
+
+@if ( %Station == "wnt" ) then
+ @set %OBJSSCHEMA_Shared = "OBJSSchema.dll";
+@endif;
+
+@set %OBJSSCHEMA_Name = "OBJSSchema";
+
+@endif;
--- /dev/null
+-- File: WOKOBJS.cdl
+-- Created: Mon Feb 24 14:48:34 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+package WOKOBJS
+
+ ---Purpose: Handles WOK specific treatments for Objectstore
+
+uses
+ TCollection,
+ TColStd,
+ WOKTools,
+ WOKUtils,
+ WOKBuilder,
+ WOKernel,
+ WOKMake,
+ WOKStep
+
+is
+
+ -- Manipulated Entities
+ class LibSchema;
+ class AppSchema;
+ class AppSchCxxFile;
+
+ -- Tools (Builder) used
+ class MSSchExtractor;
+ class OSSG;
+
+ -- Construction steps
+ class SchExtract;
+ class SchGen;
+ class EngLinkList;
+
+end WOKOBJS;
+
--- /dev/null
+-- File: WOKOBJS_AppSchCxxFile.cdl
+-- Created: Mon Feb 24 17:20:35 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+
+class AppSchCxxFile from WOKOBJS
+inherits Entity from WOKBuilder
+
+ ---Purpose:
+
+uses
+ Path from WOKUtils,
+ Param from WOKUtils,
+ HAsciiString from TCollection
+
+is
+
+ Create(apth : Path from WOKUtils)
+ returns mutable AppSchCxxFile from WOKOBJS;
+
+ GetAppSchSourceFileName(myclass; params : Param from WOKUtils; aname : HAsciiString from TCollection)
+ returns HAsciiString from TCollection;
+
+
+end AppSchCxxFile;
--- /dev/null
+// File: WOKOBJS_AppSchCxxFile.cxx
+// Created: Mon Feb 24 17:21:27 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+
+#include <WOKOBJS_AppSchCxxFile.ixx>
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : WOKOBJS_AppSchCxxFile
+//purpose :
+//=======================================================================
+WOKOBJS_AppSchCxxFile::WOKOBJS_AppSchCxxFile(const Handle(WOKUtils_Path)& apth)
+: WOKBuilder_Entity(apth)
+{
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : GetAppSchSourceFileName
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKOBJS_AppSchCxxFile::GetAppSchSourceFileName(const WOKUtils_Param& params,
+ const Handle(TCollection_HAsciiString)& aname)
+{
+ Handle(TCollection_HAsciiString) astr;
+ params.Set("%OBJS_AppSchemaName", aname->ToCString());
+ astr = params.Eval("OBJS_AppSchemaCxxFileName", Standard_True);
+ return astr;
+}
+
--- /dev/null
+-- File: WOKOBJS_AppSchema.cdl
+-- Created: Mon Feb 24 15:08:34 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+
+
+class AppSchema from WOKOBJS
+inherits Entity from WOKBuilder
+
+ ---Purpose:
+
+uses
+ Path from WOKUtils,
+ Param from WOKUtils,
+ HAsciiString from TCollection
+
+is
+
+ Create(apth : Path from WOKUtils)
+ returns mutable AppSchema from WOKOBJS;
+
+ GetAppFileName(myclass; params : Param from WOKUtils; aname : HAsciiString from TCollection)
+ returns HAsciiString from TCollection;
+
+
+end AppSchema;
--- /dev/null
+// File: WOKOBJS_AppSchema.cxx
+// Created: Mon Feb 24 15:43:57 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+#include <WOKOBJS_AppSchema.ixx>
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : WOKOBJS_AppSchema
+//purpose :
+//=======================================================================
+WOKOBJS_AppSchema::WOKOBJS_AppSchema(const Handle(WOKUtils_Path)& apth)
+: WOKBuilder_Entity(apth)
+{
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : GetAppFileName
+//purpose :
+//=======================================================================
+ Handle(TCollection_HAsciiString) WOKOBJS_AppSchema::GetAppFileName(const WOKUtils_Param& params,
+ const Handle(TCollection_HAsciiString)& aname)
+{
+ Handle(TCollection_HAsciiString) astr;
+
+ params.Set("%OBJS_AppSchemaName", aname->ToCString());
+
+ astr = params.Eval("OBJS_AppSchemaFileName", Standard_True);
+
+ return astr;
+}
+
+
--- /dev/null
+-- File: WOKOBJS_EngLinkList.cdl
+-- Created: Mon Apr 28 18:02:30 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class EngLinkList from WOKOBJS
+inherits EngLinkList from WOKStep
+
+ ---Purpose:
+
+uses
+ BuildProcess from WOKMake,
+ InputFile from WOKMake,
+ DevUnit from WOKernel,
+ HAsciiString from TCollection
+
+is
+
+
+ Create(abp : BuildProcess from WOKMake;
+ aunit : DevUnit from WOKernel;
+ acode : HAsciiString from TCollection;
+ checked, hidden : Boolean from Standard)
+ returns mutable EngLinkList from WOKOBJS;
+
+ ComputeSchema(me:mutable; aunit : DevUnit from WOKernel; infile : InputFile from WOKMake)
+ is redefined private;
+
+end EngLinkList;
--- /dev/null
+// File: WOKOBJS_EngLinkList.cxx
+// Created: Mon Apr 28 18:03:48 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+
+#include <WOKernel_DevUnit.hxx>
+#include <WOKernel_Locator.hxx>
+#include <WOKernel_File.hxx>
+
+#include <WOKBuilder_SharedLibrary.hxx>
+
+
+#include <WOKMake_OutputFile.hxx>
+
+#include <WOKOBJS_EngLinkList.ixx>
+
+#include <WOKTools_Messages.hxx>
+
+//=======================================================================
+//function : WOKOBJS_EngLinkList
+//purpose :
+//=======================================================================
+WOKOBJS_EngLinkList::WOKOBJS_EngLinkList(const Handle(WOKMake_BuildProcess)& abp,
+ const Handle(WOKernel_DevUnit)& aunit,
+ const Handle(TCollection_HAsciiString)& acode,
+ const Standard_Boolean checked,
+ const Standard_Boolean hidden)
+: WOKStep_EngLinkList(abp, aunit, acode, checked, hidden)
+{
+}
+
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : ComputeSchema
+//purpose :
+//=======================================================================
+void WOKOBJS_EngLinkList::ComputeSchema(const Handle(WOKernel_DevUnit)& aunit,
+ const Handle(WOKMake_InputFile)& infile)
+{
+ Handle(TCollection_HAsciiString) astr;
+ Handle(WOKernel_File) libfile;
+ static Handle(TCollection_HAsciiString) libtype = new TCollection_HAsciiString("library");
+ Handle(WOKMake_OutputFile) outfile;
+
+ astr = WOKBuilder_SharedLibrary::GetLibFileName(aunit->Params(), aunit->Name());
+
+ libfile = Locator()->Locate(aunit->Name(), libtype, astr);
+
+ if(libfile.IsNull())
+ {
+ ErrorMsg << "WOKStep_EngLinkList::Execute"
+ << "Could not locate library file for schema : " << aunit->Name() << endm;
+ }
+ else
+ {
+ outfile = new WOKMake_OutputFile(libfile->LocatorName(), libfile,
+ new WOKBuilder_SharedLibrary(libfile->Path()), libfile->Path());
+ outfile->SetLocateFlag(Standard_True);
+ outfile->SetReference();
+
+ AddExecDepItem(infile,outfile, Standard_True);
+ }
+ return;
+}
--- /dev/null
+-- File: WOKOBJS_LibSchema.cdl
+-- Created: Mon Feb 24 15:04:40 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class LibSchema from WOKOBJS
+inherits Entity from WOKBuilder
+
+ ---Purpose:
+
+uses
+ Path from WOKUtils,
+ Param from WOKUtils,
+ HAsciiString from TCollection
+
+is
+
+ Create(apth : Path from WOKUtils)
+ returns mutable LibSchema from WOKOBJS;
+
+ GetLibFileName(myclass; params : Param from WOKUtils; aname : HAsciiString from TCollection)
+ returns HAsciiString from TCollection;
+
+
+end LibSchema;
--- /dev/null
+// File: WOKOBJS_LibSchema.cxx
+// Created: Mon Feb 24 15:41:51 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+
+#include <WOKOBJS_LibSchema.ixx>
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : WOKOBJS_LibSchema
+//purpose :
+//=======================================================================
+WOKOBJS_LibSchema::WOKOBJS_LibSchema(const Handle(WOKUtils_Path)& apth)
+: WOKBuilder_Entity(apth)
+{
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : GetLibFileName
+//purpose :
+//=======================================================================
+ Handle(TCollection_HAsciiString) WOKOBJS_LibSchema::GetLibFileName(const WOKUtils_Param& params,
+ const Handle(TCollection_HAsciiString)& aname)
+{
+ Handle(TCollection_HAsciiString) astr;
+
+ params.Set("%OBJS_LibSchemaName", aname->ToCString());
+
+ astr = params.Eval("OBJS_LibSchemaFileName", Standard_True);
+
+ return astr;
+}
+
--- /dev/null
+-- File: WOKOBJS_MSSchExtractor.cdl
+-- Created: Mon Feb 24 15:10:17 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+
+
+class MSSchExtractor from WOKOBJS
+inherits MSExtractor from WOKBuilder
+
+ ---Purpose: Coucou
+
+uses
+ MSActionStatus from WOKBuilder,
+ MSAction from WOKBuilder,
+ MSActionType from WOKBuilder,
+ Param from WOKUtils,
+ TimeStat from WOKUtils,
+ HAsciiString from TCollection,
+ HSequenceOfHAsciiString from TColStd
+
+is
+
+ Create(ashared : HAsciiString from TCollection;
+ searchlist : HSequenceOfHAsciiString from TColStd)
+ returns mutable MSSchExtractor from WOKOBJS;
+
+ Create(params : Param from WOKUtils)
+ returns mutable MSSchExtractor from WOKOBJS;
+
+ GetTypeDepList(me; atype : HAsciiString from TCollection)
+ returns HSequenceOfHAsciiString from TColStd
+ is private;
+
+ GetTypeMDate(me; atype : HAsciiString from TCollection)
+ returns TimeStat from WOKUtils;
+
+ ExtractionStatus(me:mutable; anaction : MSAction from WOKBuilder)
+ returns MSActionStatus from WOKBuilder
+ is redefined;
+
+ ExtractorID(me)
+ returns MSActionType from WOKBuilder
+ is redefined;
+
+end MSSchExtractor;
--- /dev/null
+// File: WOKOBJS_MSSchExtractor.cxx
+// Created: Mon Feb 24 15:48:57 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+#include <TColStd_HSequenceOfHAsciiString.hxx>
+
+#include <MS_GenClass.hxx>
+#include <MS_InstClass.hxx>
+#include <MS_Pointer.hxx>
+#include <MS_Alias.hxx>
+#include <MS_Error.hxx>
+#include <MS_Package.hxx>
+#include <MS.hxx>
+
+
+#include <WOKTools_Messages.hxx>
+#include <WOKTools_MapOfHAsciiString.hxx>
+
+#include <WOKBuilder_MSActionID.hxx>
+#include <WOKBuilder_MSAction.hxx>
+#include <WOKBuilder_MSEntity.hxx>
+#include <WOKBuilder_MSchema.hxx>
+
+#include <WOKOBJS_MSSchExtractor.ixx>
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : WOKOBJS_MSSchExtractor
+//purpose :
+//=======================================================================
+WOKOBJS_MSSchExtractor::WOKOBJS_MSSchExtractor(const Handle(TCollection_HAsciiString)& ashared,
+ const Handle(TColStd_HSequenceOfHAsciiString)& searchlist)
+ : WOKBuilder_MSExtractor(new TCollection_HAsciiString("OBJSSCHEMA"), ashared, searchlist)
+{
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : WOKOBJS_MSSchExtractor
+//purpose :
+//=======================================================================
+WOKOBJS_MSSchExtractor::WOKOBJS_MSSchExtractor(const WOKUtils_Param& params)
+ : WOKBuilder_MSExtractor(new TCollection_HAsciiString("OBJSSCHEMA"), params)
+{
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : GetTypeDepList
+//purpose :
+//=======================================================================
+Handle(TColStd_HSequenceOfHAsciiString) WOKOBJS_MSSchExtractor::GetTypeDepList(const Handle(TCollection_HAsciiString)& atype) const
+{
+ return new TColStd_HSequenceOfHAsciiString;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : GetTypeMDate
+//purpose :
+//=======================================================================
+WOKUtils_TimeStat WOKOBJS_MSSchExtractor::GetTypeMDate(const Handle(TCollection_HAsciiString)& atype) const
+{
+ WOKUtils_TimeStat atruc = 0;
+
+ return atruc;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : ExtractorID
+//purpose :
+//=======================================================================
+WOKBuilder_MSActionType WOKOBJS_MSSchExtractor::ExtractorID() const
+{
+ return WOKBuilder_SchemaExtract;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : ExtractionStatus
+//purpose :
+//=======================================================================
+WOKBuilder_MSActionStatus WOKOBJS_MSSchExtractor::ExtractionStatus(const Handle(WOKBuilder_MSAction)& anaction)
+{
+ return WOKBuilder_OutOfDate;
+}
+
--- /dev/null
+-- File: WOKOBJS_OSSG.cdl
+-- Created: Mon Feb 24 15:17:16 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class OSSG from WOKOBJS
+inherits ToolInShell from WOKBuilder
+
+ ---Purpose:
+
+uses
+
+ Entity from WOKBuilder,
+ AppSchema from WOKOBJS,
+ Compilable from WOKBuilder,
+ Include from WOKBuilder,
+ HSequenceOfEntity from WOKBuilder,
+ BuildStatus from WOKBuilder,
+ Path from WOKUtils,
+ HSequenceOfPath from WOKUtils,
+ Param from WOKUtils,
+ HAsciiString from TCollection
+
+is
+
+ Create(aname : HAsciiString from TCollection; params : Param from WOKUtils)
+ returns mutable OSSG from WOKOBJS;
+
+ IncludeDirectories(me) returns HSequenceOfPath from WOKUtils;
+ SetIncludeDirectories(me:mutable; incdirs : HSequenceOfPath from WOKUtils);
+
+ SetTargetDir(me: mutable; adir : Path from WOKUtils);
+ TargetDir(me) returns Path from WOKUtils;
+
+ SchFile(me) returns mutable Compilable from WOKBuilder;
+ SetSchFile(me:mutable; afile : Compilable from WOKBuilder);
+
+ AppSchema(me) returns mutable HAsciiString from TCollection;
+ SetAppSchema(me:mutable; asdb : HAsciiString from TCollection);
+
+ Load(me:mutable)
+ is redefined;
+
+ Execute(me:mutable)
+ returns BuildStatus from WOKBuilder;
+
+fields
+
+ myname : HAsciiString from TCollection;
+ myschname : HAsciiString from TCollection;
+ mytarget : Path from WOKUtils;
+ myschfile : Compilable from WOKBuilder;
+ mypersclass : HAsciiString from TCollection;
+ myincdirs : HSequenceOfPath from WOKUtils;
+
+end OSSG;
+
--- /dev/null
+// File: WOKOBJS_OSSG.cxx
+// Created: Mon Feb 24 15:53:10 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+#include <TColStd_HSequenceOfHAsciiString.hxx>
+
+#include <WOKTools_Messages.hxx>
+
+#include <WOKUtils_Shell.hxx>
+
+#include <WOKBuilder_HSequenceOfEntity.hxx>
+
+#include <WOKOBJS_AppSchema.hxx>
+#include <WOKOBJS_AppSchCxxFile.hxx>
+
+#include <WOKOBJS_OSSG.ixx>
+
+#define WOK_VERBOSE 1
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : WOKOBJS_OSSG
+//purpose :
+//=======================================================================
+WOKOBJS_OSSG::WOKOBJS_OSSG(const Handle(TCollection_HAsciiString)& aname,const WOKUtils_Param& params)
+: WOKBuilder_ToolInShell(aname, params)
+{
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : IncludeDirectories
+//purpose :
+//=======================================================================
+Handle(WOKUtils_HSequenceOfPath) WOKOBJS_OSSG::IncludeDirectories() const
+{
+ return myincdirs;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : SetIncludeDirectories
+//purpose :
+//=======================================================================
+void WOKOBJS_OSSG::SetIncludeDirectories(const Handle(WOKUtils_HSequenceOfPath)& incdirs)
+{
+ Handle(TCollection_HAsciiString) afile;
+ Handle(TCollection_HAsciiString) astr = new TCollection_HAsciiString;
+
+ Load();
+
+ myincdirs = incdirs;
+
+ for(Standard_Integer i=1; i<= IncludeDirectories()->Length(); i++)
+ {
+ Params().Set("%OBJS_IncDir", myincdirs->Value(i)->Name()->ToCString());
+
+ astr->AssignCat(Params().Eval("OBJS_OSSG_IncDirective"));
+ }
+ Params().Set("%OBJS_IncDirectives", astr->ToCString());
+
+ return;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : SetTargetDir
+//purpose :
+//=======================================================================
+void WOKOBJS_OSSG::SetTargetDir(const Handle(WOKUtils_Path)& adir)
+{
+ Params().Set("%OBJS_TargetDir", adir->Name()->ToCString());
+ mytarget = adir;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : TargetDir
+//purpose :
+//=======================================================================
+Handle(WOKUtils_Path) WOKOBJS_OSSG::TargetDir() const
+{
+ return mytarget;
+}
+
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : SchFile
+//purpose :
+//=======================================================================
+ Handle(WOKBuilder_Compilable) WOKOBJS_OSSG::SchFile() const
+{
+ return myschfile;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : SetSchFile
+//purpose :
+//=======================================================================
+ void WOKOBJS_OSSG::SetSchFile(const Handle(WOKBuilder_Compilable)& afile)
+{
+ Params().Set("%OBJS_SchFile", afile->Path()->Name()->ToCString());
+ myschfile = afile;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AppSchema
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKOBJS_OSSG::AppSchema() const
+{
+ return myschname;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : SetAppSchema
+//purpose :
+//=======================================================================
+void WOKOBJS_OSSG::SetAppSchema(const Handle(TCollection_HAsciiString)& aschema)
+{
+ Params().Set("%OBJS_AppSchemaName", aschema->ToCString());
+ myschname = aschema;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : Load
+//purpose :
+//=======================================================================
+void WOKOBJS_OSSG::Load()
+{
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : Execute
+//purpose :
+//=======================================================================
+WOKBuilder_BuildStatus WOKOBJS_OSSG::Execute()
+{
+ Handle(WOKBuilder_HSequenceOfEntity) aseq = new WOKBuilder_HSequenceOfEntity;
+ Handle(TCollection_HAsciiString) astr;
+
+ if(Shell()->IsLaunched() == Standard_False) Shell()->Launch();
+
+ Load();
+
+ Params().Set("%OBJS_OutputDir", OutputDir()->Name()->ToCString());
+
+ astr = Params().Eval("OBJS_OSSG_CmdLine", Standard_True);
+
+ WOK_TRACE {
+ VerboseMsg("WOK_OBJS") << "WOKOBJS_OSSG::Execute" << "OSSG line : " << endm;
+ VerboseMsg("WOK_OBJS") << "WOKOBJS_OSSG::Execute" << astr << endm;
+ }
+
+ Shell()->Execute(astr);
+
+
+ Handle(TColStd_HSequenceOfHAsciiString) resseq = Shell()->Errors();
+
+ if(Shell()->Status())
+ {
+ Standard_Boolean ph = ErrorMsg.PrintHeader();
+
+ ErrorMsg << "WOKOBJS_OSSG::Execute" << "Errors occured in Shell" << endm;
+ ErrorMsg.DontPrintHeader();
+ for(Standard_Integer i=1; i<= resseq->Length(); i++)
+ {
+ ErrorMsg << "WOKOBJS_OSSG::Execute" << resseq->Value(i) << endm;
+ }
+ if(ph) ErrorMsg.DoPrintHeader();
+ return WOKBuilder_Failed;
+ }
+ else
+ {
+ Standard_Boolean ph = InfoMsg.PrintHeader();
+ InfoMsg.DontPrintHeader();
+ for(Standard_Integer i=1; i<= resseq->Length(); i++)
+ {
+ InfoMsg << "WOKOBJS_OSSG::Execute" << resseq->Value(i) << endm;
+ }
+ if(ph) InfoMsg.DoPrintHeader();
+ }
+
+ Shell()->ClearOutput();
+
+ Handle(TCollection_HAsciiString) acxxname =
+ WOKOBJS_AppSchCxxFile::GetAppSchSourceFileName(Params(), AppSchema());
+
+ Handle(WOKBuilder_Compilable) acxx = new WOKBuilder_Compilable
+ (new WOKUtils_Path(OutputDir()->Name(), acxxname));
+ aseq->Append(acxx);
+
+ Handle(TCollection_HAsciiString) appschname =
+ WOKOBJS_AppSchema::GetAppFileName(Params(), AppSchema());
+
+
+ Handle(WOKOBJS_AppSchema) appsch = new WOKOBJS_AppSchema
+ (new WOKUtils_Path(OutputDir()->Name(), appschname));
+ aseq->Append(appsch);
+
+ SetProduction(aseq);
+ return WOKBuilder_Success;
+}
+
--- /dev/null
+-- File: WOKOBJS_SchExtract.cdl
+-- Created: Mon Feb 24 15:35:28 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class SchExtract from WOKOBJS
+inherits Extract from WOKStep
+
+ ---Purpose:
+
+uses
+
+ InputFile from WOKMake,
+ HSequenceOfInputFile from WOKMake,
+ BuildProcess from WOKMake,
+ DevUnit from WOKernel,
+ HSequenceOfFile from WOKernel,
+ File from WOKernel,
+ HSequenceOfEntity from WOKBuilder,
+ HSequenceOfPath from WOKUtils,
+ HAsciiString from TCollection
+
+is
+
+ Create(abp : BuildProcess from WOKMake;
+ aunit : DevUnit from WOKernel;
+ acode : HAsciiString from TCollection;
+ checked, hidden : Boolean from Standard)
+ returns mutable SchExtract from WOKOBJS;
+
+
+ OutOfDateEntities(me:mutable)
+ returns HSequenceOfInputFile from WOKMake
+ is redefined protected;
+
+end SchExtract;
--- /dev/null
+// File: WOKOBJS_SchExtract.cxx
+// Created: Mon Feb 24 16:49:03 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+
+#include <WOKBuilder_MSTool.hxx>
+
+#include <WOKOBJS_MSSchExtractor.hxx>
+
+#include <WOKOBJS_SchExtract.ixx>
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : WOKOBJS_SchExtract
+//purpose :
+//=======================================================================
+WOKOBJS_SchExtract::WOKOBJS_SchExtract(const Handle(WOKMake_BuildProcess)& abp, const Handle(WOKernel_DevUnit)& aunit,const Handle(TCollection_HAsciiString)& acode,
+ const Standard_Boolean checked,const Standard_Boolean hidden)
+: WOKStep_Extract(abp, aunit, acode, checked,hidden)
+{
+ Handle(WOKOBJS_MSSchExtractor) anextractor = new WOKOBJS_MSSchExtractor(Unit()->Params());
+
+ anextractor->SetMSchema(WOKBuilder_MSTool::GetMSchema());
+ SetExtractor(anextractor);
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : OutOfDateEntities
+//purpose :
+//=======================================================================
+Handle(WOKMake_HSequenceOfInputFile) WOKOBJS_SchExtract::OutOfDateEntities()
+{
+ return ForceBuild();
+}
+
--- /dev/null
+-- File: WOKOBJS_SchGen.cdl
+-- Created: Mon Feb 24 15:36:43 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class SchGen from WOKOBJS
+inherits Step from WOKMake
+
+uses
+ BuildProcess from WOKMake,
+ InputFile from WOKMake,
+ HSequenceOfInputFile from WOKMake,
+ DevUnit from WOKernel,
+ HSequenceOfPath from WOKUtils,
+ HAsciiString from TCollection
+is
+
+ Create(abp : BuildProcess from WOKMake;
+ aunit : DevUnit from WOKernel;
+ acode : HAsciiString from TCollection;
+ checked, hidden : Boolean from Standard)
+ returns mutable SchGen from WOKOBJS;
+
+ AdmFileType(me)
+ returns HAsciiString from TCollection
+ is redefined protected;
+
+ OutputDirTypeName(me)
+ returns HAsciiString from TCollection
+ is redefined protected;
+
+ HandleInputFile(me:mutable; infile : InputFile from WOKMake)
+ ---Purpose: 1 - Adds File In list if file is compilable or an admfile
+ -- 2 - Sets Build Flag if file is a compilable
+ returns Boolean from Standard
+ is redefined protected;
+
+ OutOfDateEntities(me:mutable)
+ returns HSequenceOfInputFile from WOKMake
+ is redefined protected;
+
+ ComputeIncDirectories(me)
+ returns HSequenceOfPath from WOKUtils is private;
+
+ Execute(me:mutable; execlist : HSequenceOfInputFile from WOKMake)
+ is redefined private;
+
+end SchGen;
--- /dev/null
+// File: WOKOBJS_SchGen.cxx
+// Created: Mon Feb 24 16:56:12 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+
+#include <TColStd_HSequenceOfHAsciiString.hxx>
+
+#include <WOKTools_Messages.hxx>
+
+#include <WOKUtils_Extension.hxx>
+#include <WOKUtils_Path.hxx>
+#include <WOKUtils_Shell.hxx>
+
+#include <WOKBuilder_Compilable.hxx>
+#include <WOKBuilder_HSequenceOfEntity.hxx>
+#include <WOKBuilder_Command.hxx>
+
+#include <WOKernel_FileTypeKeyWords.hxx>
+#include <WOKernel_UnitNesting.hxx>
+#include <WOKernel_Workbench.hxx>
+#include <WOKernel_DevUnit.hxx>
+#include <WOKernel_File.hxx>
+#include <WOKernel_Session.hxx>
+#include <WOKernel_Locator.hxx>
+
+#include <WOKMake_AdmFileTypes.hxx>
+#include <WOKMake_OutputFile.hxx>
+#include <WOKMake_InputFile.hxx>
+
+#include <WOKOBJS_AppSchema.hxx>
+#include <WOKOBJS_OSSG.hxx>
+
+#include <WOKOBJS_SchGen.ixx>
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : WOKOBJS_SchGen
+//purpose :
+//=======================================================================
+WOKOBJS_SchGen::WOKOBJS_SchGen(const Handle(WOKMake_BuildProcess)& abp, const Handle(WOKernel_DevUnit)& aunit,const Handle(TCollection_HAsciiString)& acode,
+ const Standard_Boolean checked,const Standard_Boolean hidden)
+: WOKMake_Step(abp, aunit, acode, checked, hidden)
+{
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AdmFileType
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKOBJS_SchGen::AdmFileType() const
+{
+ static Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString((char*)STADMFILE);
+ return result;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : OutputDirTypeName
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKOBJS_SchGen::OutputDirTypeName() const
+{
+ static Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString((char*)STTMPDIR);
+ return result;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : HandleInputFile
+//purpose :
+//=======================================================================
+Standard_Boolean WOKOBJS_SchGen::HandleInputFile(const Handle(WOKMake_InputFile)& infile)
+{
+ Handle(WOKBuilder_Entity) result;
+ Handle(WOKUtils_Path) apath;
+
+ if(!infile->File().IsNull())
+ {
+ apath = infile->File()->Path();
+ switch(apath->Extension())
+ {
+ case WOKUtils_CXXFile: result = new WOKBuilder_Compilable(apath); break;
+ default:
+ return Standard_False;
+ }
+
+ infile->SetBuilderEntity(result);
+ infile->SetDirectFlag(Standard_True);
+ return Standard_True;
+ }
+ return Standard_False;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : OutOfDateEntities
+//purpose :
+//=======================================================================
+Handle(WOKMake_HSequenceOfInputFile) WOKOBJS_SchGen::OutOfDateEntities()
+{
+ return ForceBuild();
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : ComputeIncDirectories
+//purpose :
+//=======================================================================
+Handle(WOKUtils_HSequenceOfPath) WOKOBJS_SchGen::ComputeIncDirectories() const
+{
+ Handle(TColStd_HSequenceOfHAsciiString) nestingseq = Unit()->Session()->GetWorkbench(Unit()->Nesting())->Visibility();
+ Handle(TCollection_HAsciiString) aname;
+ Handle(WOKUtils_HSequenceOfPath) aseq = new WOKUtils_HSequenceOfPath;
+ Handle(WOKernel_File) afile;
+ Handle(WOKernel_FileType) atype;
+ Handle(WOKernel_DevUnit) aunit;
+ Handle(TCollection_HAsciiString) DOT = new TCollection_HAsciiString(".");
+ Standard_Integer i;
+
+ for(i=1; i<=nestingseq->Length(); i++)
+ {
+ // l'ud est-elle dans ce nesting
+ Handle(WOKernel_UnitNesting) thenesting = Unit()->Session()->GetUnitNesting(nestingseq->Value(i));
+ aname = thenesting->NestedUniqueName(Unit()->Name());
+
+ if(Unit()->Session()->IsKnownEntity(aname))
+ {
+ aunit = Unit()->Session()->GetDevUnit(aname);
+
+ Handle(WOKernel_UnitNesting) anesting = Unit()->Session()->GetUnitNesting(aunit->Nesting());
+ if(anesting->IsKind(STANDARD_TYPE(WOKernel_Workbench)))
+ {
+ atype = aunit->GetFileType("userinclude");
+
+ afile = new WOKernel_File(DOT, aunit, atype);
+ afile->GetPath();
+
+ aseq->Append(afile->Path());
+
+ atype = aunit->GetFileType("privinclude");
+ afile = new WOKernel_File(DOT, aunit, atype);
+ afile->GetPath();
+ aseq->Append(afile->Path());
+ }
+ }
+
+ //nesting de la visibilite
+ atype = thenesting->GetFileType("pubincdir");
+ afile = new WOKernel_File(DOT, thenesting, atype);
+ afile->GetPath();
+ aseq->Append(afile->Path());
+
+ }
+ return aseq;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : Execute
+//purpose :
+//=======================================================================
+void WOKOBJS_SchGen::Execute(const Handle(WOKMake_HSequenceOfInputFile)& execlist)
+{
+ Standard_Integer i,j;
+ Handle(TCollection_HAsciiString) aname = Unit()->Name();
+
+ // Used Types
+ Handle(WOKernel_FileType) libraryfile = Unit()->GetFileType("library");
+ Handle(WOKernel_FileType) schcxxfile = Unit()->GetFileType("schcxxfile");
+
+ // Obtention d'un shell
+ Handle(WOKUtils_Shell) ashell = Shell();
+ ashell->Lock();
+
+ // Commande
+ Handle(WOKBuilder_Command) acmd = new WOKBuilder_Command(new TCollection_HAsciiString("COMMAND"), Unit()->Params());
+ acmd->SetShell(ashell);
+
+ // Verification du profile DB
+ if( Unit()->Session()->DBMSystem() != WOKernel_OBJS )
+ {
+ ErrorMsg << "WOKOBJS_SchGen::Execute"
+ << "Wrong profile for this step : Only OBJS is valid" << endm;
+ SetFailed();
+ return;
+ }
+
+ // La FDDB
+ Handle(WOKernel_File) appsch = new WOKernel_File(WOKOBJS_AppSchema::GetAppFileName(Unit()->Params(), Unit()->Name()),
+ Unit(),
+ Unit()->GetFileType("library"));
+ appsch->GetPath();
+
+ // les repertoires d'includes
+ Handle(WOKUtils_HSequenceOfPath) incdirs = ComputeIncDirectories();
+
+ // Obtention du processeur OSSG
+ Handle(WOKOBJS_OSSG) ossg = new WOKOBJS_OSSG(new TCollection_HAsciiString("OBJS"),
+ Unit()->Params());
+ ossg->SetOutputDir(OutputDir());
+ ossg->SetIncludeDirectories(incdirs);
+ ossg->SetAppSchema(Unit()->Name());
+ ossg->SetTargetDir(new WOKUtils_Path(appsch->Path()->DirName()));
+ ossg->SetShell(ashell);
+
+ // Obtention de la liste des classes
+ Handle(WOKernel_DevUnit) aunit;
+ Handle(WOKernel_File) ddlfile;
+
+ Handle(WOKMake_InputFile) infile;
+
+ for(i=1; i<=execlist->Length(); i++)
+ {
+ infile = execlist->Value(i);
+
+ ossg->SetSchFile(new WOKBuilder_Compilable(infile->File()->Path()));
+
+ InfoMsg << "WOKOBJS_DDLFile"
+ << "Extracting " << Unit()->Name() << endm;
+
+ switch(ossg->Execute())
+ {
+ case WOKBuilder_Success:
+ {
+ WOK_TRACE {
+ if(VerboseMsg("WOK_OBJS").IsSet())
+ {
+ Standard_Integer i;
+ VerboseMsg << "WOKOBJS_SchGen::Execute"
+ << infile->File()->Name() << " produces : " << endm;
+ for(i=1; i<=ossg->Produces()->Length(); i++)
+ {
+ VerboseMsg << "WOKOBJS_SchGen::Execute"
+ << "\t\t" << ossg->Produces()->Value(i)->Path()->Name() << endm;
+ }
+ }
+ }
+
+ for(j=1; j<=ossg->Produces()->Length(); j++)
+ {
+ Handle(WOKBuilder_Entity) anent = ossg->Produces()->Value(j);
+ Handle(WOKernel_File) outfile;
+ Handle(WOKernel_File) basefile;
+
+ switch(anent->Path()->Extension())
+ {
+ case WOKUtils_CXXFile:
+ // Devivated Cxx file
+ outfile = new WOKernel_File(anent->Path()->FileName(), Unit(), schcxxfile);
+ break;
+ case WOKUtils_AppSchemaFile:
+ // Asdb file
+ outfile = new WOKernel_File(anent->Path()->FileName(), Unit(), libraryfile);
+ break;
+ default:
+ ErrorMsg << "WOKOBJS_SchGen::Execute"
+ << "Unrecognized output file : " << anent->Path()->FileName() << endm;
+ break;
+ }
+
+ outfile->GetPath();
+
+ if(anent->Path()->Extension() != WOKUtils_AppSchemaFile)
+ {
+
+ basefile = Locator()->Locate(Unit()->Name(), outfile->TypeName(), outfile->Name());
+ }
+ else
+ {
+ basefile.Nullify();
+ }
+
+ WOKBuilder_BuildStatus astatus;
+
+ if(basefile.IsNull())
+ {
+ // pas encore de Fichier : Simply Move
+ astatus = acmd->Move(anent->Path(), outfile->Path());
+ }
+ else
+ {
+ astatus = acmd->ReplaceIfChangedWith(anent->Path(), basefile->Path(), outfile->Path());
+ }
+
+ switch(astatus)
+ {
+ case WOKBuilder_Success:
+ {
+ anent->SetPath(outfile->Path());
+ Handle(WOKMake_OutputFile) out = new WOKMake_OutputFile(outfile->LocatorName(), outfile, anent, outfile->Path());
+ out->SetLocateFlag(Standard_True);
+ out->SetProduction();
+ AddExecDepItem(execlist->Value(i), out, Standard_True);
+
+ InfoMsg << "WOKOBJS_SchGen::Execute" << "File : " << outfile->Path()->Name() << " is modified" << endm;
+ }
+ break;
+ case WOKBuilder_Unbuilt:
+ WOK_TRACE {
+ VerboseMsg("WOK_OBJS") << "WOKMake_Extract::Execute"
+ << "File : " << outfile->Path()->Name() << " is unchanged" << endm;
+ }
+ {
+ anent->SetPath(basefile->Path());
+ Handle(WOKMake_OutputFile) out = new WOKMake_OutputFile(basefile->LocatorName(), basefile, anent, basefile->Path());
+ out->SetLocateFlag(Standard_True);
+ out->SetProduction();
+ AddExecDepItem(execlist->Value(i), out, Standard_True);
+ }
+ break;
+ case WOKBuilder_Failed:
+ SetFailed();
+ ErrorMsg << "WOKOBJS_SchGen::Execute" << "Failed : " << outfile->Name() << endm;
+ break;
+ }
+ }
+ }
+ break;
+ case WOKBuilder_Failed:
+ ErrorMsg << "WOKOBJS_SchGen::Execute" << "Failed : " << Unit()->Name() << endm;
+ SetFailed();
+ break;
+ }
+ }
+ ashell->UnLock();
+ SetSucceeded();
+ return;
+}
+