--- /dev/null
+ORBIX.edl
+IDLFRONT.edl
+WOKOrbix_ClientObjects.tcl
+WOKOrbix_ServerObjects.tcl
+
--- /dev/null
+-- File: IDLFRONT.edl
+-- Author: Jean GAUTIER
+-- History: Mon Aug 25 11:46:53 1997 Jean GAUTIER Creation
+-- Copyright: Matra Datavision 1997
+
+@ifnotdefined ( %IDLFRONT_EDL) then
+@set %IDLFRONT_EDL = "";
+
+@if ( %Station != "wnt" ) then
+ @if ( %LocalArch != "hp" ) then
+ @set %IDLFRONT_SHARED = "libIDLFront.so";
+ @endif;
+
+ @if ( %LocalArch == "hp" ) then
+ @set %IDLFRONT_SHARED = "libIDLFront.sl";
+ @endif;
+@else
+ @set %IDLFRONT_SHARED = "IDLFront.dll";
+@endif;
+
+@set %IDLFRONT_NAME = "IDLTranslate";
+
+@endif;
--- /dev/null
+-- File: ORBIX.edl
+-- Author: Jean GAUTIER
+-- History: Mon Aug 18 16:20:03 1997 Jean GAUTIER Creation
+-- Copyright: Matra Datavision 1997
+
+@ifnotdefined ( %ORBIX_EDL) then
+@set %ORBIX_EDL = "";
+
+
+@set %ORBIX_Tools = "ORBIX_IDL";
+
+@set %ORBIX_Home = "/opt/Orbix_2.2";
+
+@set %ORBIX_IDL_Extensions = "toto.idl";
+@set %ORBIX_IDL_Template = "CmdLine";
+
+@template ORBIX_IDL_Production ( %OutputDir, %BaseName ) is
+ $ %BaseName.m %BaseName_i.cxx.template %BaseName_i.hxx.template %BaseName_S.cxx %BaseName_C.cxx %BaseName.hxx
+@end;
+
+@template ORBIX_IncDirective (%IncDirectory) is
+$ -I%IncDirectory \
+@end;
+
+@string %ORBIX_IDL_Command = %ORBIX_Home "/bin/idl -I" %ORBIX_Home "/include/idl";
+@set %ORBIX_IDL_Options = "-B -S -h .hxx -s _S.cxx -c _C.cxx";
+
+-- Options liees aux BDs Objet
+@if ( %DBMS == "DFLT" ) then
+ @set %DBMSOpt = "-DCSFDB";
+@endif;
+
+@if ( %Station == "sun" ) then
+ @string %ORBIX_IDL_Options += " -DSOLARIS";
+ -- Options liees aux BDs Objet
+ @if ( %DBMS == "OBJS" ) then
+ @set %DBMSOpt = " -mt -vdelx -DOBJS -I/PRODUCTS/OS4.0.2/sunpro/include ";
+ @endif;
+@endif;
+
+@if ( %Station == "ao1" ) then
+ @string %ORBIX_IDL_Options += " -DDECOSF1";
+ -- Options liees aux BDs Objet
+ @if ( %DBMS == "OBJS" ) then
+ @set %DBMSOpt = " -DOBJS -I/PRODUCTS/OS4.0.2/include ";
+ @endif;
+@endif;
+
+@if ( %Station == "sil" ) then
+ @string %ORBIX_IDL_Options += " -DIRIX";
+ -- Options liees aux BDs Objet
+ @if ( %DBMS == "OBJS" ) then
+ @set %DBMSOpt = " -DOBJS -I/PRODUCTS/OS4.0.3/include ";
+ @endif;
+@endif;
+
+@if ( %Station == "hp" ) then
+ @string %ORBIX_IDL_Options += " -DHPUX";
+ -- Options liees aux BDs Objet
+ @if ( %DBMS == "OBJS" ) then
+ @set %DBMSOpt = " -DOBJS -I/PRODUCTS/OS4.0.2/include ";
+ @endif;
+@endif;
+
+@if ( %Station == "wnt" ) then
+ @string %ORBIX_IDL_Options += " -DWNT";
+ -- Options liees aux BDs Objet
+ @if ( %DBMS == "OBJS" ) then
+ @set %DBMSOpt = " -DOBJS -ID:/DevTools/OS4.0.2/include ";
+ @endif;
+@endif;
+
+@template ORBIX_IDL_OptLine ( %ORBIX_IDL_Command, %ORBIX_IDL_Options, %DBMSOpt, %IncDirectives ) is
+ $IDL compiler: \^
+ $%ORBIX_IDL_Command %ORBIX_IDL_Options %DBMSOpt \
+ $%IncDirectives <Source.idl>
+@end;
+
+@template ORBIX_IDL_CmdLine ( %ORBIX_IDL_Command, %ORBIX_IDL_Options, %DBMSOpt, %IncDirectives,
+ %Source, %BaseName, %OutputDir, %TmpFile ) is
+ $cp %Source %OutputDir
+ $%ORBIX_IDL_Command %ORBIX_IDL_Options %DBMSOpt \
+ $%IncDirectives \
+ $%OutputDir%BaseName.idl
+ $set idl_status = $status
+ $if( $idl_status == 0 ) then
+ $ %ORBIX_IDL_Command -O %DBMSOpt \
+ $ %IncDirectives \
+ $ %Source | sed -e "s/.*://g" -e "s/\\//g" | tr " " "\n" | sort -u | sed -e "1d" | grep -v %Source > %OutputDir/%BaseName.m
+ $ sed -e 's/\#include \"\(.*\)\.h\"/\#include \<\1.hxx\>/g' -e 's/\#include \"\(.*\)\.hxx\"/\#include \<\1.hxx\>/g' %OutputDir%BaseName.ih > %OutputDir%BaseName_i.hxx.template
+ $ rm -f %OutputDir%BaseName.ih
+ $ sed -e 's/\#include \"\(.*\)\.ih\"/\#include \<\1_i.hxx\>/g' %OutputDir%BaseName.ic > %OutputDir%BaseName_i.cxx.template
+ $ rm -f %OutputDir%BaseName.ic
+ $endif
+ $rm -f %OutputDir%BaseName.idl
+ $set status = $idl_status
+@end;
+
+
+@string %ORBIX_ServerLibs = "-L " %ORBIX_Home "/lib -l IRclt -l ITini -l iiop -l orbix -l DSI -lsocket";
+@string %ORBIX_ClientLibs = "-L " %ORBIX_Home "/lib -l IRclt -l ITini -l iiop -l orbix -l DSI -lsocket";
+
+@endif;
--- /dev/null
+-- File: WOKOrbix.cdl
+-- Created: Mon Aug 18 11:45:41 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+package WOKOrbix
+
+ ---Purpose:
+
+uses
+ WOKTools,
+ WOKUtils,
+ WOKernel,
+ WOKBuilder,
+ WOKMake,
+ WOKStep,
+ TColStd,
+ TCollection
+
+is
+
+ -- Orbix files
+ class IDLFile;
+
+ -- Orbix Tools
+ class IDLCompiler;
+ class IDLCompilerIterator;
+ class IDLTranslator;
+
+ -- Orbix Steps
+ class IDLSource;
+ class IDLCompile;
+ class IDLFill;
+ class IDLSourceExtract;
+
+ class ServerSource;
+ class ExtractServerList;
+
+ private class DataMapOfHAsciiStringOfHAsciiString
+ instantiates DataMap from WOKTools ( HAsciiString from TCollection,
+ HAsciiString from TCollection,
+ HAsciiStringHasher from WOKTools );
+
+end WOKOrbix;
--- /dev/null
+
+proc WOKOrbix_ClientObjects::AdmFileType {} {
+
+ return dbadmfile;
+}
+
+proc WOKOrbix_ClientObjects::OutputDirTypeName {} {
+ return dbtmpdir;
+}
+
+proc WOKOrbix_ClientObjects::HandleInputFile { ID } {
+
+ scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name
+
+ set list [split $name "_"]
+
+ switch [lindex $list [expr [llength $list] -1 ]] {
+ C.cxx { return 1;}
+ }
+ return 0;
+}
+
+proc WOKOrbix_ClientObjects::Execute { unit args } {
+
+ msgprint -i -c "WOKOrbix_ClientObjects::Execute" "Processing client objects : $unit"
+ msgprint -i -c "WOKOrbix_ClientObjects::Execute"
+
+ set unitname [wokinfo -n $unit]
+
+ foreach file $args {
+ stepoutputadd -R $file
+ stepaddexecdepitem $file $file
+ }
+
+ return 0;
+}
--- /dev/null
+-- File: WOKOrbix_ExtractServerList.cdl
+-- Created: Mon Aug 25 17:58:16 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class ExtractServerList from WOKOrbix
+inherits Step from WOKMake
+
+ ---Purpose:
+
+uses
+ BuildProcess from WOKMake,
+ HSequenceOfInputFile from WOKMake,
+ InputFile from WOKMake,
+ DevUnit from WOKernel,
+ HSequenceOfHAsciiString from TColStd,
+ HAsciiString from TCollection
+
+is
+ Create( abp : BuildProcess from WOKMake;
+ aunit : DevUnit from WOKernel;
+ acode : HAsciiString from TCollection;
+ checked, hidden : Boolean from Standard)
+ returns mutable ExtractServerList from WOKOrbix;
+
+ HandleInputFile(me:mutable; anitem : InputFile from WOKMake)
+ returns Boolean from Standard
+ is redefined protected;
+
+ AdmFileType(me)
+ returns HAsciiString from TCollection
+ is redefined protected;
+
+ OutputDirTypeName(me)
+ returns HAsciiString from TCollection
+ is redefined protected;
+
+ OutOfDateEntities(me:mutable)
+ returns HSequenceOfInputFile from WOKMake
+ is redefined protected;
+
+ Execute(me:mutable; execlist : HSequenceOfInputFile from WOKMake)
+ ---Purpose: Executes underlying steps
+ -- Computes output files
+ is redefined private;
+
+end ExtractServerList;
--- /dev/null
+// File: WOKOrbix_ExtractServerList.cxx
+// Created: Mon Aug 25 18:00:08 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+
+#include <fstream.h>
+
+#include <WOKTools_Messages.hxx>
+
+#include <WOKUtils_Path.hxx>
+
+#include <WOKernel_Locator.hxx>
+#include <WOKernel_File.hxx>
+
+#include <WOKBuilder_MSEntity.hxx>
+
+#include <WOKMake_AdmFileTypes.hxx>
+#include <WOKMake_OutputFile.hxx>
+
+#include <WOKOrbix_DataMapOfHAsciiStringOfHAsciiString.hxx>
+
+#include <WOKOrbix_ExtractServerList.ixx>
+
+#define READBUF_SIZE 1024
+
+//=======================================================================
+//function : WOKOrbix_ExtractServerList
+//purpose :
+//=======================================================================
+WOKOrbix_ExtractServerList::WOKOrbix_ExtractServerList(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)
+{
+}
+
+//=======================================================================
+//function : HandleInputFile
+//purpose :
+//=======================================================================
+Standard_Boolean WOKOrbix_ExtractServerList::HandleInputFile(const Handle(WOKMake_InputFile)& infile)
+{
+ if(!infile.IsNull())
+ {
+ if(!strcmp("msentity", infile->ID()->Token(":",2)->ToCString()))
+ {
+ infile->SetDirectFlag(Standard_True);
+ infile->SetBuilderEntity(new WOKBuilder_MSEntity(infile->ID()->Token(":",3)));
+ return Standard_True;
+ }
+ }
+ return Standard_False;
+}
+
+//=======================================================================
+//function : AdmFileType
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKOrbix_ExtractServerList::AdmFileType() const
+{
+ static Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString((char*)ADMFILE);
+ return result;
+}
+
+//=======================================================================
+//function : OutputDirTypeName
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKOrbix_ExtractServerList::OutputDirTypeName() const
+{
+ static Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString((char*)TMPDIR);
+ return result;
+}
+
+//=======================================================================
+//function : OutOfDateEntities
+//purpose :
+//=======================================================================
+Handle(WOKMake_HSequenceOfInputFile) WOKOrbix_ExtractServerList::OutOfDateEntities()
+{
+ return ForceBuild();
+}
+
+//=======================================================================
+//function : Execute
+//purpose :
+//=======================================================================
+void WOKOrbix_ExtractServerList::Execute(const Handle(WOKMake_HSequenceOfInputFile)& execlist)
+{
+ WOKOrbix_DataMapOfHAsciiStringOfHAsciiString amap;
+
+ for(Standard_Integer i=1; i<=execlist->Length(); i++)
+ {
+ const Handle(WOKMake_InputFile)& infile = execlist->Value(i);
+
+ Handle(TCollection_HAsciiString) fullname = infile->ID()->Token(":",3);
+ Standard_Integer apos = fullname->Search("_");
+ Standard_Boolean found = Standard_False;
+
+ Handle(TCollection_HAsciiString) idlunit = fullname->SubString(1, apos-1);
+ Handle(TCollection_HAsciiString) interfacename = fullname->SubString(apos+1, fullname->Length());
+
+ if(apos < 0 )
+ {
+ ErrorMsg << "WOKOrbix_ExtractServerList::Execute"
+ << "Cannot determine idl interface name in " << fullname << ": underscore is missing" << endm;
+ }
+
+ if(!amap.IsBound(fullname))
+ {
+ static Handle(TCollection_HAsciiString) admtype = new TCollection_HAsciiString("admfile");
+
+
+ Handle(TCollection_HAsciiString) declfilename = new TCollection_HAsciiString(idlunit);
+ declfilename->AssignCat(".IdlDecl");
+
+ Handle(WOKernel_File) declarfile = Locator()->Locate(idlunit, admtype, declfilename);
+
+ if(declarfile.IsNull())
+ {
+ ErrorMsg << "WOKOrbix_ExtractServerList::Execute"
+ << "Could not find IDL unit interface declaration list file : "
+ << idlunit << ":" << admtype << ":" << declfilename << endm;
+ SetFailed();
+ }
+
+ ifstream stream(declarfile->Path()->Name()->ToCString());
+ static char intbuf[READBUF_SIZE], modbuf[READBUF_SIZE];
+
+ while(stream >> setw(READBUF_SIZE) >> intbuf >> setw(READBUF_SIZE) >> modbuf)
+ {
+ Handle(TCollection_HAsciiString) thename = new TCollection_HAsciiString(idlunit);
+ thename->AssignCat("_");
+ thename->AssignCat(intbuf);
+
+ amap.Bind(thename, new TCollection_HAsciiString(modbuf));
+ }
+ stream.close();
+
+ if(!amap.IsBound(fullname))
+ {
+ ErrorMsg << "WOKOrbix_ExtractServerList::Execute"
+ << "IDL unit " << idlunit << " does not declare interface: " << interfacename << endm;
+ SetFailed();
+ }
+ else
+ {
+ found = Standard_True;
+ }
+
+ }
+ else found = Standard_True;
+
+ if(found)
+ {
+ static Handle(TCollection_HAsciiString) objtype = new TCollection_HAsciiString("object");
+ const Handle(TCollection_HAsciiString)& amodule = amap.Find(fullname);
+
+
+ Handle(TCollection_HAsciiString) filename[2];
+
+ //Server file
+ filename[0] = new TCollection_HAsciiString(amodule);
+ filename[0]->AssignCat("_S.o");
+
+ //Implementation File
+ filename[1] = new TCollection_HAsciiString(amodule);
+ filename[1]->AssignCat("_i.o");
+
+ for(Standard_Integer j=0; j<2; j++)
+ {
+ if(!filename[j].IsNull())
+ {
+ const Handle(WOKernel_File)& servobj = Locator()->Locate(idlunit, objtype, filename[j]);
+
+ if(servobj.IsNull())
+ {
+ ErrorMsg << "WOKOrbix_ExtractServerList::Execute"
+ << "Could not find objfile: " << WOKernel_File::FileLocatorName(idlunit, objtype, filename[j]);
+ SetFailed();
+ }
+
+ Handle(WOKMake_OutputFile) outsrv = new WOKMake_OutputFile(servobj->LocatorName(), servobj,
+ Handle(WOKBuilder_Entity)(), servobj->Path());
+ outsrv->SetLocateFlag(Standard_True);
+ outsrv->SetReference();
+ outsrv->SetExtern();
+
+ AddExecDepItem(infile, outsrv, Standard_True);
+ }
+ }
+ Handle(WOKernel_File) NULLFILE;
+ Handle(WOKBuilder_Entity) NULLENTITY;
+ Handle(WOKUtils_Path) NULLPATH;
+ Handle(TCollection_HAsciiString) externid = new TCollection_HAsciiString(Unit()->Name());
+
+ externid->AssignCat(":external:ORBIX_ServerLibs");
+
+ Handle(WOKMake_OutputFile) outfile = new WOKMake_OutputFile(externid, NULLFILE, NULLENTITY, NULLPATH);
+
+ outfile->SetLocateFlag(Standard_True);
+ outfile->SetProduction();
+ outfile->SetPhysicFlag(Standard_False);
+ outfile->SetExtern();
+
+ AddExecDepItem(infile, outfile, Standard_True);
+
+ }
+ }
+
+ if(Status() == WOKMake_Unprocessed) SetSucceeded();
+}
+
--- /dev/null
+-- File: WOKOrbix_IDLCompile.cdl
+-- Created: Mon Aug 18 16:43:34 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+class IDLCompile from WOKOrbix
+inherits ProcessStep from WOKStep
+ ---Purpose: Compile files
+
+uses
+ BuildProcess from WOKMake,
+ HSequenceOfInputFile from WOKMake,
+ InputFile from WOKMake,
+ DevUnit from WOKernel,
+ HSequenceOfFile from WOKernel,
+ File from WOKernel,
+ HSequenceOfEntity from WOKBuilder,
+ IDLCompilerIterator from WOKOrbix,
+ HSequenceOfPath from WOKUtils,
+ HAsciiString from TCollection,
+ DataMapOfHAsciiStringOfFile from WOKernel
+is
+ Create(abp : BuildProcess from WOKMake;
+ aunit : DevUnit from WOKernel;
+ acode : HAsciiString from TCollection;
+ checked, hidden : Boolean from Standard)
+ returns mutable IDLCompile from WOKOrbix;
+
+ AdmFileType(me)
+ returns HAsciiString from TCollection
+ is redefined protected;
+
+ OutputDirTypeName(me)
+ returns HAsciiString from TCollection
+ is redefined protected;
+
+ Init(me:mutable)
+ is redefined protected;
+
+ HandleInputFile(me:mutable; item : 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;
+
+ Execute(me:mutable; execlist : HSequenceOfInputFile from WOKMake)
+ is redefined private;
+
+fields
+
+ myiterator : IDLCompilerIterator from WOKOrbix;
+
+end Compile;
--- /dev/null
+// File: WOKOrbix_IDLCompile.cxx
+// Created: Mon Aug 18 16:43:12 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+#include <unistd.h>
+#include <fstream.h>
+
+#include <TCollection_HAsciiString.hxx>
+
+#include <TColStd_HArray2OfInteger.hxx>
+#include <TColStd_HSequenceOfHAsciiString.hxx>
+
+#include <WOKTools_Messages.hxx>
+#include <WOKTools_MapOfHAsciiString.hxx>
+
+#include <WOKUtils_Path.hxx>
+#include <WOKUtils_Param.hxx>
+#include <WOKUtils_Shell.hxx>
+
+#ifndef WNT
+# include <WOKUtils_RemoteShell.hxx>
+#else
+# include <WOKUtils_Shell.hxx>
+# include <WOKNT_WNT_BREAK.hxx>
+#endif // WNT
+
+#include <WOKernel_BasicUnitTypes.hxx>
+#include <WOKernel_DevUnit.hxx>
+#include <WOKernel_Session.hxx>
+#include <WOKernel_File.hxx>
+#include <WOKernel_FileType.hxx>
+#include <WOKernel_FileTypeBase.hxx>
+#include <WOKernel_UnitNesting.hxx>
+#include <WOKernel_Workbench.hxx>
+#include <WOKernel_HSequenceOfFile.hxx>
+#include <WOKernel_Locator.hxx>
+
+
+#include <WOKBuilder_HSequenceOfToolInShell.hxx>
+#include <WOKBuilder_HSequenceOfEntity.hxx>
+
+#include <WOKMake_InputFile.hxx>
+#include <WOKMake_OutputFile.hxx>
+#include <WOKMake_HSequenceOfStepOption.hxx>
+#include <WOKMake_AdmFileTypes.hxx>
+
+#include <WOKOrbix_IDLFile.hxx>
+#include <WOKOrbix_IDLCompiler.hxx>
+#include <WOKOrbix_IDLCompilerIterator.hxx>
+
+#include <WOKOrbix_IDLCompile.ixx>
+
+//=======================================================================
+//function : WOKOrbix_IDLCompile
+//purpose :
+//=======================================================================
+WOKOrbix_IDLCompile::WOKOrbix_IDLCompile(const Handle(WOKMake_BuildProcess)& abp,
+ const Handle(WOKernel_DevUnit)& aunit,
+ const Handle(TCollection_HAsciiString)& acode,
+ const Standard_Boolean checked,
+ const Standard_Boolean hidden)
+: WOKStep_ProcessStep(abp,aunit, acode, checked, hidden),
+ myiterator(new TCollection_HAsciiString("ORBIX"), aunit->Params())
+{
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AdmFileType
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKOrbix_IDLCompile::AdmFileType() const
+{
+ static Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString((char*)DBADMFILE);
+ return result;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : OutputDirTypeName
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKOrbix_IDLCompile::OutputDirTypeName() const
+{
+ static Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString((char*)DBTMPDIR);
+ return result;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : Init
+//purpose :
+//=======================================================================
+void WOKOrbix_IDLCompile::Init()
+{
+ if(IsToExecute())
+ {
+ WOKStep_ProcessStep::Init();
+
+ if(myiterator.LoadGroup())
+ {
+ ErrorMsg << "WOKOrbix_IDLCompile::Init"
+ << "Could not load idl compilers definition" << endm;
+ SetFailed();
+ return;
+ }
+ }
+}
+
+//=======================================================================
+//function : HandleInputFile
+//purpose :
+//=======================================================================
+Standard_Boolean WOKOrbix_IDLCompile::HandleInputFile(const Handle(WOKMake_InputFile)& infile)
+{
+ Handle(WOKBuilder_Entity) result;
+ Handle(WOKUtils_Path) apath;
+
+ if(!infile->File().IsNull())
+ {
+ apath = infile->File()->Path();
+ }
+ else if(!infile->LastPath().IsNull())
+ {
+ apath = infile->LastPath();
+ }
+
+ if(!apath.IsNull())
+ {
+ if(myiterator.IsTreatedExtension(apath->ExtensionName()))
+ {
+ result = new WOKOrbix_IDLFile(apath);
+ }
+ else
+ return Standard_False;
+
+ infile->SetBuilderEntity(result);
+ infile->SetDirectFlag(Standard_True);
+ return Standard_True;
+ }
+ return Standard_False;
+}
+
+//=======================================================================
+//function : Execute
+//purpose :
+//=======================================================================
+void WOKOrbix_IDLCompile::Execute(const Handle(WOKMake_HSequenceOfInputFile)& execlist)
+{
+ Standard_Integer i,j;
+ Handle(WOKMake_InputFile) infile;
+ Handle(WOKMake_OutputFile) outfile;
+ Handle(WOKMake_HSequenceOfInputFile) fails = new WOKMake_HSequenceOfInputFile;
+ Handle(WOKMake_HSequenceOfInputFile) succeeds = new WOKMake_HSequenceOfInputFile;
+
+ Handle(WOKernel_FileType) srctype = Unit()->FileTypeBase()->Type("source");
+ Handle(WOKernel_FileType) inctype = Unit()->FileTypeBase()->Type("pubinclude");
+ Handle(WOKernel_FileType) drvtype = Unit()->FileTypeBase()->Type("derivated");
+ Handle(WOKernel_File) aoutfile;
+
+ Handle(WOKUtils_HSequenceOfPath) incdirs = ComputeIncDirectories();
+
+ // Set du debug mode
+ // Obtention d'un shell
+ Handle(WOKUtils_Shell) ashell = Shell();
+ ashell->Lock();
+
+ myiterator.Init(ashell, OutputDir(), incdirs);
+
+ for(j=1; j<=execlist->Length(); j++)
+ {
+#ifdef WNT
+_TEST_BREAK();
+#endif // WNT
+
+ infile = execlist->Value(j);
+
+ Handle(WOKOrbix_IDLFile) anidlfile = Handle(WOKOrbix_IDLFile)::DownCast(infile->BuilderEntity());
+
+ if(infile->File()->Nesting()->IsSameString(Unit()->FullName()))
+ {
+ InfoMsg << "WOKOrbix_IDLCompile::Execute" << "-------> " << infile->File()->Name() << endm;
+ }
+ else
+ {
+ InfoMsg << "WOKOrbix_IDLCompile::Execute" << "-------> " << infile->File()->UserPathName() << endm;
+ }
+
+ switch(myiterator.Execute(anidlfile))
+ {
+ case WOKBuilder_Success:
+ {
+ WOK_TRACE {
+ if(VerboseMsg("WOK_ORBIX").IsSet())
+ {
+ VerboseMsg << "WOKOrbix_IDLCompile::Execute"
+ << anidlfile->Path()->Name() << " produces : " << endm;
+ for(i=1; i<=myiterator.Produces()->Length(); i++)
+ {
+ VerboseMsg << "WOKOrbix_IDLCompile::Execute"
+ << "\t\t" << myiterator.Produces()->Value(i)->Path()->Name() << endm;
+ }
+ }
+ }
+
+ TreatOutput(infile, myiterator.Produces());
+
+ succeeds->Append(infile);
+ }
+ break;
+ case WOKBuilder_Failed:
+ fails->Append(infile);
+ ErrorMsg << "WOKOrbix_IDLCompile::Execute" << "Failed : " << infile->File()->Name() << endm;
+ break;
+ }
+ }
+
+ ashell->UnLock();
+
+ if(execlist->Length() == 0)
+ {
+ SetUptodate();
+ return;
+ }
+
+ if(fails->Length())
+ {
+ InfoMsg << "WOKOrbix_IDLCompile::Execute"
+ << "----------------------- IDL Compilation Report -----------------------" << endm;
+
+ for(i=1; i<= fails->Length(); i++)
+ {
+ InfoMsg << "WOKOrbix_IDLCompile::Execute"
+ << "Failed : " << fails->Value(i)->File()->UserPathName() << endm;
+ }
+ InfoMsg << "WOKOrbix_IDLCompile::Execute"
+ << "-----------------------------------------------------------------" << endm;
+ }
+
+ if(fails->Length() && succeeds->Length())
+ {
+ SetIncomplete();
+ return;
+ }
+ if(fails->Length())
+ {
+ SetFailed();
+ return;
+ }
+ SetSucceeded();
+ return;
+}
+
+
--- /dev/null
+-- File: WOKOrbix_IDLCompiler.cdl
+-- Created: Mon Aug 18 16:00:28 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class IDLCompiler from WOKOrbix
+inherits ToolInShell from WOKBuilder
+
+ ---Purpose: Compilers Management
+uses
+ IDLFile from WOKOrbix,
+ HSequenceOfEntity from WOKBuilder,
+ BuildStatus from WOKBuilder,
+ HSequenceOfPath from WOKUtils,
+ Param from WOKUtils,
+ HAsciiString from TCollection
+
+raises
+ ProgramError from Standard
+is
+
+ Create(aname : HAsciiString from TCollection; params : Param from WOKUtils)
+ returns mutable IDLCompiler from WOKOrbix;
+
+ IncludeDirectories(me) returns HSequenceOfPath from WOKUtils;
+ SetIncludeDirectories(me:mutable; incdirs : HSequenceOfPath from WOKUtils);
+
+ IDLFile(me) returns mutable IDLFile from WOKOrbix;
+ SetIDLFile(me:mutable; afile : IDLFile from WOKOrbix);
+
+ Execute(me:mutable)
+ returns BuildStatus from WOKBuilder
+ raises ProgramError from Standard;
+
+fields
+ myname : HAsciiString from TCollection;
+ mysource : IDLFile from WOKOrbix;
+ myincdirs : HSequenceOfPath from WOKUtils;
+ myoptions : HAsciiString from TCollection;
+end Compiler;
--- /dev/null
+// File: WOKBuilder_IDLCompiler.cxx
+// Created: Wed Aug 23 20:09:00 1995
+// Author: Jean GAUTIER
+// <jga@cobrax>
+
+
+#include <WOKOrbix_IDLCompiler.ixx>
+
+
+#include <WOKBuilder_HSequenceOfEntity.hxx>
+
+
+#include <WOKUtils_Path.hxx>
+#include <WOKUtils_Shell.hxx>
+#include <WOKUtils_Param.hxx>
+#include <WOKTools_Messages.hxx>
+
+#include <TColStd_HSequenceOfHAsciiString.hxx>
+
+#include <EDL_API.hxx>
+
+#include <stdio.h>
+
+//=======================================================================
+//function : WOKOrbix_IDLCompiler
+//purpose :
+//=======================================================================
+WOKOrbix_IDLCompiler::WOKOrbix_IDLCompiler(const Handle(TCollection_HAsciiString)& aname, const WOKUtils_Param& params)
+ : WOKBuilder_ToolInShell(aname, params)
+{
+}
+
+//=======================================================================
+//function : IncludeDirectories
+//purpose :
+//=======================================================================
+Handle(WOKUtils_HSequenceOfPath) WOKOrbix_IDLCompiler::IncludeDirectories() const
+{
+ return myincdirs;
+}
+
+//=======================================================================
+//function : SetIncludeDirectories
+//purpose :
+//=======================================================================
+void WOKOrbix_IDLCompiler::SetIncludeDirectories(const Handle(WOKUtils_HSequenceOfPath)& incdirs)
+{
+ Handle(TCollection_HAsciiString) afile;
+ Handle(TCollection_HAsciiString) atempl;
+ Handle(TCollection_HAsciiString) astr = new TCollection_HAsciiString;
+
+ Load();
+
+ myincdirs = incdirs;
+
+ atempl = new TCollection_HAsciiString("ORBIX_IncDirective");
+
+ for(Standard_Integer i=1; i<= IncludeDirectories()->Length(); i++)
+ {
+ Params().Set("%IncDirectory", myincdirs->Value(i)->Name()->ToCString());
+
+ astr->AssignCat(Params().Eval("ORBIX_IncDirective"));
+ }
+ Params().Set("%IncDirectives", astr->ToCString());
+ return;
+}
+
+//=======================================================================
+//function : Compilable
+//purpose :
+//=======================================================================
+Handle(WOKOrbix_IDLFile) WOKOrbix_IDLCompiler::IDLFile() const
+{
+ return mysource;
+}
+
+//=======================================================================
+//function : SetCompilable
+//purpose :
+//=======================================================================
+void WOKOrbix_IDLCompiler::SetIDLFile(const Handle(WOKOrbix_IDLFile)& afile)
+{
+ mysource = afile;
+}
+
+//=======================================================================
+//function : Execute
+//purpose :
+//=======================================================================
+WOKBuilder_BuildStatus WOKOrbix_IDLCompiler::Execute()
+{
+ int start;
+
+#ifdef WNT
+ start = 2;
+#else
+ start = 1;
+#endif // WNT
+
+ Handle(TCollection_HAsciiString) astr;
+ Handle(WOKBuilder_HSequenceOfEntity) aseq = new WOKBuilder_HSequenceOfEntity;
+
+
+ if(Shell()->IsLaunched() == Standard_False) Shell()->Launch();
+
+ Load();
+
+
+ Params().Set("%Source", IDLFile()->Path()->Name()->ToCString());
+ Params().Set("%BaseName", IDLFile()->Path()->BaseName()->ToCString());
+ Params().Set("%TmpFile", tmpnam(NULL));
+ Params().Set("%OutputDir", OutputDir()->Name()->ToCString());
+
+ astr = EvalToolTemplate(Template()->ToCString());
+
+ WOK_TRACE {
+ VerboseMsg("WOK_ORBIX") << "WOKOrbix_IDLCompiler::Execute" << "Compilation line : " << endm;
+ VerboseMsg("WOK_ORBIX") << "WOKOrbix_IDLCompiler::Execute" << astr << endm;
+ }
+
+ Shell()->ClearOutput();
+ Shell()->Execute(astr);
+
+ Handle(TColStd_HSequenceOfHAsciiString) resseq = Shell()->Errors();
+
+ if(Shell()->Status())
+ {
+ Standard_Boolean ph = ErrorMsg.PrintHeader();
+
+ ErrorMsg << "WOKOrbix_IDLCompiler::Execute" << "Errors occured in Shell" << endm;
+ ErrorMsg.DontPrintHeader();
+ for(Standard_Integer i=start; i<= resseq->Length(); i++)
+ {
+ ErrorMsg << "WOKOrbix_IDLCompiler::Execute" << resseq->Value(i) << endm;
+ }
+ if(ph) ErrorMsg.DoPrintHeader();
+ return WOKBuilder_Failed;
+ }
+ else
+ {
+ Standard_Boolean ph = InfoMsg.PrintHeader();
+ InfoMsg.DontPrintHeader();
+ for(Standard_Integer i=start; i<= resseq->Length(); i++)
+ {
+ InfoMsg << "WOKOrbix_IDLCompiler::Execute" << resseq->Value(i) << endm;
+ }
+ if(ph) InfoMsg.DoPrintHeader();
+ }
+ Shell()->ClearOutput();
+
+ SetProduction(EvalProduction());
+ return WOKBuilder_Success;
+}
+
--- /dev/null
+-- File: WOKOrbix_IDLCompilerIterator.cdl
+-- Created: Mon Aug 18 16:07:56 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+class IDLCompilerIterator from WOKOrbix
+inherits ToolInShellIterator from WOKBuilder
+ ---Purpose:
+
+uses
+ HSequenceOfEntity from WOKBuilder,
+ IDLFile from WOKOrbix,
+ IDLCompiler from WOKOrbix,
+ BuildStatus from WOKBuilder,
+ ToolInShell from WOKBuilder,
+ HSequenceOfToolInShell from WOKBuilder,
+ HSequenceOfPath from WOKUtils,
+ Param from WOKUtils,
+ Path from WOKUtils,
+ Shell from WOKUtils,
+ HAsciiString from TCollection
+is
+
+ Create(toolgroup : HAsciiString from TCollection; params : Param from WOKUtils)
+ returns IDLCompilerIterator from WOKOrbix;
+
+
+ Create(tools : HSequenceOfToolInShell from WOKBuilder)
+ returns IDLCompilerIterator from WOKOrbix;
+
+ Create(toolgroup : HAsciiString from TCollection;
+ ashell : Shell from WOKUtils;
+ adir : Path from WOKUtils;
+ incdirs : HSequenceOfPath from WOKUtils;
+ params : Param from WOKUtils)
+ returns IDLCompilerIterator from WOKOrbix;
+
+ Init(me:out; ashell : Shell from WOKUtils;
+ adir : Path from WOKUtils;
+ incdirs : HSequenceOfPath from WOKUtils);
+
+ SetIncludeDirectories(me:out; incdirs : HSequenceOfPath from WOKUtils);
+ IncludeDirectories(me) returns HSequenceOfPath from WOKUtils;
+
+ GetTool(me;aname : HAsciiString from TCollection; params : Param from WOKUtils)
+ returns ToolInShell from WOKBuilder
+ is redefined;
+
+ Execute(me:out; anidl : IDLFile from WOKOrbix)
+ returns BuildStatus from WOKBuilder;
+
+fields
+
+ myincdirs : HSequenceOfPath from WOKUtils;
+
+end IDLCompilerIterator;
--- /dev/null
+
+
+#include <WOKOrbix_IDLCompilerIterator.ixx>
+
+#include <WOKTools_Messages.hxx>
+#include <WOKUtils_Path.hxx>
+#include <WOKUtils_HSequenceOfPath.hxx>
+
+#include <WOKBuilder_Compilable.hxx>
+#include <WOKOrbix_IDLCompiler.hxx>
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : WOKOrbix_IDLCompilerIterator
+//purpose :
+//=======================================================================
+WOKOrbix_IDLCompilerIterator::WOKOrbix_IDLCompilerIterator(const Handle(TCollection_HAsciiString)& agroup,
+ const WOKUtils_Param& params)
+: WOKBuilder_ToolInShellIterator(agroup, params)
+{
+}
+
+
+//=======================================================================
+//function : WOKOrbix_IDLCompilerIterator
+//purpose :
+//=======================================================================
+WOKOrbix_IDLCompilerIterator::WOKOrbix_IDLCompilerIterator(const Handle(WOKBuilder_HSequenceOfToolInShell)& compilers)
+ : WOKBuilder_ToolInShellIterator(compilers)
+{
+}
+
+//=======================================================================
+//function : WOKOrbix_IDLCompilerIterator
+//purpose :
+//=======================================================================
+WOKOrbix_IDLCompilerIterator::WOKOrbix_IDLCompilerIterator(const Handle(TCollection_HAsciiString)& agroup,
+ const Handle(WOKUtils_Shell)& ashell,
+ const Handle(WOKUtils_Path)& outdir,
+ const Handle(WOKUtils_HSequenceOfPath)& incdirs,
+ const WOKUtils_Param& params)
+ : WOKBuilder_ToolInShellIterator(agroup,ashell,outdir,params), myincdirs(incdirs)
+{
+}
+
+//=======================================================================
+//function : WOKOrbix_IDLCompilerIterator
+//purpose :
+//=======================================================================
+void WOKOrbix_IDLCompilerIterator::Init(const Handle(WOKUtils_Shell)& ashell,
+ const Handle(WOKUtils_Path)& outdir,
+ const Handle(WOKUtils_HSequenceOfPath)& incdirs)
+{
+ Standard_Integer i;
+ Handle(TCollection_HAsciiString) optline;
+
+ WOKBuilder_ToolInShellIterator::Init(ashell,outdir);
+
+ myincdirs = incdirs;
+
+ Handle(WOKBuilder_HSequenceOfToolInShell) tools = Tools();
+
+ if(!tools.IsNull())
+ {
+ for(i=1; i<=tools->Length(); i++)
+ {
+ Handle(WOKOrbix_IDLCompiler) acompiler = Handle(WOKOrbix_IDLCompiler)::DownCast(tools->Value(i));
+
+ if(!acompiler.IsNull())
+ {
+ acompiler->SetIncludeDirectories(myincdirs);
+ }
+
+ optline = acompiler->OptionLine();
+
+ if(optline.IsNull())
+ {
+ ErrorMsg << "WOKOrbix_IDLCompilerIterator::Init"
+ << "Could not eval compiler " << acompiler->Name() << " options" << endm;
+ return;
+ }
+
+ InfoMsg << "WOKOrbix_IDLCompilerIterator::Init" << optline << endm;
+ }
+ }
+}
+
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : GetTool
+//purpose :
+//=======================================================================
+Handle(WOKBuilder_ToolInShell) WOKOrbix_IDLCompilerIterator::GetTool(const Handle(TCollection_HAsciiString)& aname,
+ const WOKUtils_Param& params) const
+{
+ return new WOKOrbix_IDLCompiler(aname,params);
+}
+
+//=======================================================================
+//function : Execute
+//purpose :
+//=======================================================================
+WOKBuilder_BuildStatus WOKOrbix_IDLCompilerIterator::Execute(const Handle(WOKOrbix_IDLFile)& anidlfile)
+{
+ Handle(WOKOrbix_IDLCompiler) acompiler;
+ WOKBuilder_BuildStatus status;
+
+ myproduction.Nullify();
+
+ acompiler = Handle(WOKOrbix_IDLCompiler)::DownCast(AppropriateTool(anidlfile));
+
+ if(acompiler.IsNull())
+ {
+ ErrorMsg << "WOKOrbix_IDLCompilerIterator::Execute"
+ << "Could not find appropriate Compiler for " << anidlfile->Path()->Name() << endm;
+ return WOKBuilder_Failed;
+ }
+
+ // setter le .compilable
+ acompiler->SetIDLFile(anidlfile);
+
+ status = acompiler->Execute();
+
+ if(status == WOKBuilder_Success)
+ {
+ myproduction = acompiler->Produces();
+ }
+ return status;
+}
+
--- /dev/null
+-- File: WOKOrbix_IDLFile.cdl
+-- Created: Mon Aug 18 11:59:06 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+class IDLFile from WOKOrbix
+inherits Specification from WOKBuilder
+
+ ---Purpose:
+
+uses
+ Path from WOKUtils
+
+is
+
+ Create(apath : Path from WOKUtils) returns mutable IDLFile from WOKOrbix;
+
+end IDLFile;
--- /dev/null
+// File: WOKOrbix_IDLFile.cxx
+// Created: Mon Aug 18 12:03:25 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+
+
+#include <WOKOrbix_IDLFile.ixx>
+
+//=======================================================================
+//function : WOKOrbix_IDLFile
+//purpose :
+//=======================================================================
+WOKOrbix_IDLFile::WOKOrbix_IDLFile(const Handle(WOKUtils_Path)& apath)
+ : WOKBuilder_Specification(apath)
+{
+
+}
+
--- /dev/null
+-- File: WOKOrbix_IDLFill.cdl
+-- Created: Mon Aug 25 11:35:36 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class IDLFill from WOKOrbix
+inherits Step from WOKMake
+
+ ---Purpose:
+
+uses
+ BuildProcess from WOKMake,
+ InputFile from WOKMake,
+ HSequenceOfInputFile from WOKMake,
+ DevUnit from WOKernel,
+ File from WOKernel,
+ Entity from WOKBuilder,
+ HAsciiString from TCollection
+
+is
+
+ Create(abp : BuildProcess from WOKMake;
+ aunit : DevUnit from WOKernel;
+ acode : HAsciiString from TCollection;
+ checked, hidden : Boolean from Standard)
+ returns mutable IDLFill from WOKOrbix;
+
+
+ AdmFileType(me)
+ returns HAsciiString from TCollection
+ is redefined protected;
+
+ OutputDirTypeName(me)
+ returns HAsciiString from TCollection
+ is redefined protected;
+
+ HandleInputFile(me:mutable; item : InputFile from WOKMake)
+ returns Boolean from Standard
+ is redefined protected;
+
+ Execute(me:mutable; execlist : HSequenceOfInputFile from WOKMake)
+ is redefined private;
+
+end IDLFill;
--- /dev/null
+// File: WOKOrbix_IDLFill.cxx
+// Created: Mon Aug 25 11:35:24 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+#include <WOKTools_Messages.hxx>
+
+#include <WOKUtils_Extension.hxx>
+#include <WOKUtils_Path.hxx>
+
+#include <WOKernel_File.hxx>
+
+#include <WOKBuilder_HSequenceOfEntity.hxx>
+#include <WOKBuilder_MSEntity.hxx>
+
+#include <WOKMake_AdmFileTypes.hxx>
+#include <WOKMake_OutputFile.hxx>
+
+#include <WOKOrbix_IDLFile.hxx>
+#include <WOKOrbix_IDLTranslator.hxx>
+
+#include <WOKOrbix_IDLFill.ixx>
+
+//=======================================================================
+//function : WOKOrbix_IDLFill
+//purpose :
+//=======================================================================
+WOKOrbix_IDLFill::WOKOrbix_IDLFill(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)
+{
+}
+
+//=======================================================================
+//function : AdmFileType
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKOrbix_IDLFill::AdmFileType() const
+{
+ static Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString((char*)ADMFILE);
+ return result;
+}
+
+//=======================================================================
+//function : OutputDirTypeName
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKOrbix_IDLFill::OutputDirTypeName() const
+{
+ static Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString((char*)TMPDIR);
+ return result;
+}
+
+//=======================================================================
+//function : HandleInputFile
+//purpose :
+//=======================================================================
+Standard_Boolean WOKOrbix_IDLFill::HandleInputFile(const Handle(WOKMake_InputFile)& infile)
+{
+ if(infile->File()->Path()->Extension() == WOKUtils_IDLFile)
+ {
+ infile->SetBuilderEntity(new WOKOrbix_IDLFile(infile->File()->Path()));
+ infile->SetDirectFlag(Standard_True);
+ infile->SetLocateFlag(Standard_True);
+ return Standard_True;
+ }
+ return Standard_False;
+}
+
+//=======================================================================
+//function : Execute
+//purpose :
+//=======================================================================
+void WOKOrbix_IDLFill::Execute(const Handle(WOKMake_HSequenceOfInputFile)& execlist)
+{
+
+ Handle(WOKOrbix_IDLTranslator) atrans = new WOKOrbix_IDLTranslator(new TCollection_HAsciiString("IDLFRONT"), Unit()->Params());
+
+ atrans->Load();
+ atrans->SetMSchema(WOKBuilder_MSTool::GetMSchema());
+
+ Handle(TCollection_HAsciiString) declname = new TCollection_HAsciiString(Unit()->Name());
+
+ declname->AssignCat(".IdlDecl");
+
+ Handle(WOKernel_File) declfile = new WOKernel_File(declname, Unit(), Unit()->GetFileType(AdmFileType()));
+
+ declfile->GetPath();
+
+ Handle(WOKMake_OutputFile) outfile = new WOKMake_OutputFile(declfile->LocatorName(), declfile,
+ Handle(WOKBuilder_Entity)(), declfile->Path());
+
+ outfile->SetLocateFlag(Standard_True);
+ outfile->SetProduction();
+
+ ofstream stream(declfile->Path()->Name()->ToCString());
+
+ for(Standard_Integer i=1; i<=execlist->Length(); i++)
+ {
+ Handle(WOKMake_InputFile) infile = execlist->Value(i);
+ Handle(WOKOrbix_IDLFile) idlfile = Handle(WOKOrbix_IDLFile)::DownCast(infile->BuilderEntity());
+
+
+ if(idlfile.IsNull())
+ {
+
+ ErrorMsg << "WOKOrbix_IDLFill::Execute"
+ << "Invalid input : " << infile->BuilderEntity()->Path()->Name() << endm;
+ SetFailed();
+ return;
+ }
+
+ if(infile->File()->Nesting()->IsSameString(Unit()->FullName()))
+ {
+ InfoMsg << "WOKOrbix_IDLFill::Execute" << "-------> " << infile->File()->Name() << endm;
+ }
+ else
+ {
+ InfoMsg << "WOKOrbix_IDLFill::Execute" << "-------> " << infile->File()->UserPathName() << endm;
+ }
+
+ switch(atrans->Execute(idlfile))
+ {
+ case WOKBuilder_Success:
+ {
+
+ Handle(WOKBuilder_HSequenceOfEntity) production = atrans->Produces();
+
+ for(Standard_Integer i=1; i<=production->Length(); i++)
+ {
+ Handle(WOKBuilder_MSEntity) anent = *((Handle(WOKBuilder_MSEntity) *) & production->Value(i));
+
+ stream << anent->Name()->ToCString() << " " << infile->File()->Path()->BaseName()->ToCString() << endl;
+ }
+ AddExecDepItem(infile, outfile, Standard_True);
+
+ }
+
+ break;
+ default:
+ SetFailed();
+ stream.close();
+ return;
+ }
+ }
+ stream.close();
+ SetSucceeded();
+ return;
+}
+
--- /dev/null
+-- File: WOKOrbix_IDLSource.cdl
+-- Created: Mon Aug 18 11:46:23 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class IDLSource from WOKOrbix
+inherits Source from WOKStep
+
+ ---Purpose:
+
+uses
+ BuildProcess from WOKMake,
+ HSequenceOfInputFile from WOKMake,
+ InputFile from WOKMake,
+ DevUnit from WOKernel,
+ File from WOKernel,
+ HSequenceOfFile from WOKernel,
+ HSequenceOfEntity from WOKBuilder,
+ HAsciiString from TCollection
+
+is
+
+ Create(abp : BuildProcess from WOKMake;
+ aunit : DevUnit from WOKernel;
+ acode : HAsciiString from TCollection;
+ checked, hidden : Boolean from Standard)
+ returns mutable IDLSource from WOKOrbix;
+
+ GetUnitDescr(me)
+ returns File from WOKernel
+ is protected;
+
+ Execute(me:mutable; execlist : HSequenceOfInputFile from WOKMake)
+ ---Purpose: Executes step
+ -- Computes output files
+ is redefined private;
+
+end IDLSource;
--- /dev/null
+
+
+#include <TColStd_HSequenceOfHAsciiString.hxx>
+
+#include <WOKTools_Messages.hxx>
+
+#include <WOKUtils_Path.hxx>
+#include <WOKUtils_Param.hxx>
+
+#include <WOKernel_File.hxx>
+#include <WOKernel_Locator.hxx>
+
+#include <WOKMake_DepItem.hxx>
+#include <WOKMake_OutputFile.hxx>
+#include <WOKMake_InputFile.hxx>
+
+
+#include <WOKOrbix_IDLFile.hxx>
+
+#include <WOKOrbix_IDLSource.ixx>
+
+//=======================================================================
+//function : WOKOrbix_IDLSource
+//purpose :
+//=======================================================================
+WOKOrbix_IDLSource::WOKOrbix_IDLSource(const Handle(WOKMake_BuildProcess)& abp,
+ const Handle(WOKernel_DevUnit)& aunit,const Handle(TCollection_HAsciiString)& acode,
+ const Standard_Boolean checked,const Standard_Boolean hidden)
+ : WOKStep_Source(abp,aunit,acode,checked,hidden)
+{
+}
+
+//=======================================================================
+//function : GetUnitDescr
+//purpose :
+//=======================================================================
+Handle(WOKernel_File) WOKOrbix_IDLSource::GetUnitDescr() const
+{
+ Handle(TCollection_HAsciiString) astr;
+ Handle(TCollection_HAsciiString) asourcetype = new TCollection_HAsciiString("source");
+ Handle(WOKernel_File) afile;
+
+ astr = new TCollection_HAsciiString(Unit()->Name());
+ astr->AssignCat(".idl");
+ afile = Locator()->Locate(Unit()->Name(), asourcetype, astr);
+ return afile;
+}
+
+//=======================================================================
+//function : Execute
+//purpose :
+//=======================================================================
+void WOKOrbix_IDLSource::Execute(const Handle(WOKMake_HSequenceOfInputFile)& execlist)
+{
+ Handle(WOKernel_File) FILES = GetFILES();
+ Handle(WOKernel_File) PKIDL = GetUnitDescr();
+
+ if(execlist->Length())
+ {
+ Standard_Integer i;
+
+ for(i=1; i<=execlist->Length(); i++)
+ {
+ if(!strcmp(execlist->Value(i)->File()->Name()->ToCString(), FILES->Name()->ToCString()))
+ {
+ ReadFILES(execlist->Value(i));
+ }
+ if(!strcmp(execlist->Value(i)->File()->Name()->ToCString(), PKIDL->Name()->ToCString()))
+ {
+ ReadFILES(execlist->Value(i));
+ }
+ }
+ }
+ else
+ {
+ if(!FILES.IsNull())
+ {
+ Handle(WOKMake_InputFile) infile = new WOKMake_InputFile(FILES->LocatorName(), FILES,
+ Handle(WOKBuilder_Entity)(), FILES->Path());
+ execlist->Append(infile);
+ infile->SetDirectFlag(Standard_True);
+ infile->SetLocateFlag(Standard_True);
+
+ ReadFILES(infile);
+ }
+
+ if(CheckStatus("FILES reading")) return;
+ if(!PKIDL.IsNull())
+ {
+ Handle(WOKBuilder_Specification) cdlent = new WOKOrbix_IDLFile(PKIDL->Path());
+ Handle(WOKMake_InputFile) infile = new WOKMake_InputFile(PKIDL->LocatorName(), PKIDL,
+ cdlent , PKIDL->Path());
+ execlist->Append(infile);
+ infile->SetDirectFlag(Standard_True);
+ infile->SetLocateFlag(Standard_True);
+
+
+ Handle(WOKMake_OutputFile) outfile = new WOKMake_OutputFile(PKIDL->LocatorName(), PKIDL,
+ cdlent , PKIDL->Path());
+
+ outfile->SetLocateFlag(Standard_True);
+ outfile->SetProduction();
+ AddExecDepItem(infile, outfile, Standard_True);
+ }
+ if(CheckStatus("IDL processing")) return;
+ }
+
+ SetSucceeded();
+
+ return;
+}
+
--- /dev/null
+-- File: WOKOrbix_IDLSourceExtract.cdl
+-- Created: Mon Aug 25 19:23:56 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class IDLSourceExtract from WOKOrbix
+inherits Step from WOKMake
+
+ ---Purpose:
+
+uses
+ BuildProcess from WOKMake,
+ HSequenceOfInputFile from WOKMake,
+ InputFile from WOKMake,
+ DevUnit from WOKernel,
+ HSequenceOfHAsciiString from TColStd,
+ HAsciiString from TCollection
+
+is
+ Create( abp : BuildProcess from WOKMake;
+ aunit : DevUnit from WOKernel;
+ acode : HAsciiString from TCollection;
+ checked, hidden : Boolean from Standard)
+ returns mutable IDLSourceExtract from WOKOrbix;
+
+ HandleInputFile(me:mutable; anitem : InputFile from WOKMake)
+ returns Boolean from Standard
+ is redefined protected;
+
+ AdmFileType(me)
+ returns HAsciiString from TCollection
+ is redefined protected;
+
+ OutputDirTypeName(me)
+ returns HAsciiString from TCollection
+ is redefined protected;
+
+ Execute(me:mutable; execlist : HSequenceOfInputFile from WOKMake)
+ ---Purpose: Executes underlying steps
+ -- Computes output files
+ is redefined private;
+
+end IDLSourceExtract;
--- /dev/null
+// File: WOKOrbix_IDLSourceExtract.cxx
+// Created: Mon Aug 25 19:25:55 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+
+#include <WOKTools_Messages.hxx>
+
+#include <WOKUtils_Extension.hxx>
+#include <WOKUtils_Path.hxx>
+
+
+#include <WOKernel_Locator.hxx>
+#include <WOKernel_File.hxx>
+
+#include <WOKMake_OutputFile.hxx>
+#include <WOKMake_AdmFileTypes.hxx>
+
+#include <WOKOrbix_IDLSourceExtract.ixx>
+
+//=======================================================================
+//function : WOKOrbix_IDLSourceExtract
+//purpose :
+//=======================================================================
+WOKOrbix_IDLSourceExtract::WOKOrbix_IDLSourceExtract(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)
+{
+}
+
+//=======================================================================
+//function : HandleInputFile
+//purpose :
+//=======================================================================
+Standard_Boolean WOKOrbix_IDLSourceExtract::HandleInputFile(const Handle(WOKMake_InputFile)& infile)
+{
+ if(!infile->File().IsNull())
+ {
+ if(infile->File()->Path()->Extension() == WOKUtils_TemplateFile)
+ {
+ infile->SetDirectFlag(Standard_True);
+ return Standard_True;
+ }
+ }
+ return Standard_False;
+}
+
+//=======================================================================
+//function : AdmFileType
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKOrbix_IDLSourceExtract::AdmFileType() const
+{
+ static Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString((char*)ADMFILE);
+ return result;
+}
+
+//=======================================================================
+//function : OutputDirTypeName
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKOrbix_IDLSourceExtract::OutputDirTypeName() const
+{
+ static Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString((char*)TMPDIR);
+ return result;
+}
+
+//=======================================================================
+//function : Execute
+//purpose :
+//=======================================================================
+void WOKOrbix_IDLSourceExtract::Execute(const Handle(WOKMake_HSequenceOfInputFile)& execlist)
+{
+ Handle(TCollection_HAsciiString) srctype = new TCollection_HAsciiString("source");
+
+ for(Standard_Integer i=1; i<=execlist->Length(); i++)
+ {
+ const Handle(WOKMake_InputFile)& infile = execlist->Value(i);
+
+ Handle(TCollection_HAsciiString) filename = new TCollection_HAsciiString(infile->File()->Path()->FileName());
+
+ Standard_Integer apos = filename->Search(".template");
+
+ if(apos>0)
+ {
+ filename->Trunc(apos-1);
+
+ Handle(WOKernel_File) srcfile = Locator()->Locate(Unit()->Name(), srctype, filename);
+
+ if(srcfile.IsNull())
+ {
+ WarningMsg << "WOKOrbix_IDLSourceExtract::Execute"
+ << "Extraction deducted source file " << filename << " is missing" << endm;
+ srcfile = new WOKernel_File(filename, Unit(), Unit()->GetFileType(srctype));
+ srcfile->GetPath();
+ }
+
+ Handle(WOKMake_OutputFile) outfile = new WOKMake_OutputFile(srcfile->LocatorName(), srcfile,
+ Handle(WOKBuilder_Entity)(), srcfile->Path());
+ outfile->SetLocateFlag(Standard_True);
+ outfile->SetProduction();
+
+ AddExecDepItem(infile, outfile, Standard_True);
+ }
+ else
+ {
+ ErrorMsg << "WOKOrbix_IDLSourceExtract::Execute"
+ << "Invalid extension for " << filename << " should be .template" << endm;
+ SetFailed();
+ }
+ }
+
+ if(Status() == WOKMake_Unprocessed) SetSucceeded();
+}
+
--- /dev/null
+-- File: WOKOrbix_IDLTranslator.cdl
+-- Created: Fri Aug 22 18:24:41 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class IDLTranslator from WOKOrbix
+inherits MSTool from WOKBuilder
+
+ ---Purpose: Translates an IDL file
+
+uses
+ Entity from WOKBuilder,
+ IDLFile from WOKOrbix,
+ BuildStatus from WOKBuilder,
+ MSTranslatorPtr from WOKBuilder,
+ HSequenceOfHAsciiString from TColStd,
+ HAsciiString from TCollection,
+ Path from WOKUtils,
+ Param from WOKUtils
+raises ProgramError from Standard
+is
+
+ Create(aname : HAsciiString from TCollection; params : Param from WOKUtils)
+ returns mutable IDLTranslator from WOKOrbix;
+
+ Load(me:mutable)
+ is redefined;
+
+ Translate(me:mutable; afile : IDLFile from WOKOrbix;
+ globlist : out HSequenceOfHAsciiString from TColStd;
+ inctypes : out HSequenceOfHAsciiString from TColStd;
+ insttypes : out HSequenceOfHAsciiString from TColStd;
+ gentypes : out HSequenceOfHAsciiString from TColStd
+ ) returns BuildStatus from WOKBuilder is private;
+
+
+ Execute(me:mutable; afile : IDLFile from WOKOrbix)
+ ---Purpose: Executes an action
+ -- and updates Iterator and MSchema
+ returns BuildStatus from WOKBuilder
+ raises ProgramError from Standard;
+
+fields
+ mytranslator : MSTranslatorPtr from WOKBuilder;
+
+end IDLTranslator;
--- /dev/null
+// File: WOKOrbix_IDLTranslator.cxx
+// Created: Mon Aug 25 10:53:48 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+
+#include <WOKTools_Messages.hxx>
+
+#include <WOKUtils_Path.hxx>
+
+#include <WOKBuilder_MSchema.hxx>
+#include <WOKBuilder_HSequenceOfEntity.hxx>
+#include <WOKBuilder_MSEntity.hxx>
+
+
+#include <WOKOrbix_IDLTranslator.ixx>
+
+
+//=======================================================================
+//function : WOKOrbix_IDLTranslator
+//purpose :
+//=======================================================================
+WOKOrbix_IDLTranslator::WOKOrbix_IDLTranslator(const Handle(TCollection_HAsciiString)& aname,const WOKUtils_Param& params)
+ : WOKBuilder_MSTool(aname, params)
+{
+ mytranslator = NULL;
+}
+
+//=======================================================================
+//function : Load
+//purpose :
+//=======================================================================
+void WOKOrbix_IDLTranslator::Load()
+{
+ Handle(TCollection_HAsciiString) astr;
+
+ if(Shared().IsNull())
+ {
+ astr = EvalToolParameter("SHARED");
+
+ if(astr.IsNull())
+ {
+ ErrorMsg << "WOKOrbix_IDLTranslator::Load"
+ << "Invalid SHARED parameter for tool: " << Name() << endm;
+ return;
+ }
+ SetShared(astr);
+ }
+
+ Handle(WOKUtils_Path) libpath = new WOKUtils_Path(Shared());
+
+ if(!libpath->Exists())
+ {
+ libpath = Params().SearchFile(Shared());
+
+ if(libpath.IsNull())
+ {
+ ErrorMsg << "WOKOrbix_IDLTranslator::Load"
+ << "Could not find file : " << Shared() << endm;
+ return;
+ }
+ }
+
+ Handle(TCollection_HAsciiString) name = EvalToolParameter("NAME");
+
+ if(name.IsNull())
+ {
+ ErrorMsg << "WOKOrbix_IDLTranslator::Load" << "Could not eval NAME for IDLTranslator" << endm;
+ return;
+ }
+
+ WOKBuilder_ToolInProcess::Load(libpath, name);
+
+ mytranslator = (WOKBuilder_MSTranslatorPtr) (Function());
+
+}
+
+//=======================================================================
+//function : Translate
+//purpose :
+//=======================================================================
+WOKBuilder_BuildStatus WOKOrbix_IDLTranslator::Translate(const Handle(WOKOrbix_IDLFile)& afile,
+ Handle(TColStd_HSequenceOfHAsciiString)& globlist,
+ Handle(TColStd_HSequenceOfHAsciiString)& inctypes,
+ Handle(TColStd_HSequenceOfHAsciiString)& insttypes,
+ Handle(TColStd_HSequenceOfHAsciiString)& gentypes)
+{
+ if(mytranslator == NULL)
+ {
+ ErrorMsg << "WOKOrbix_IDLTranslator::Translate" << "Null Translator : Cannot Perform" << endm;
+ return WOKBuilder_Failed;
+ }
+
+ globlist = new TColStd_HSequenceOfHAsciiString;
+ inctypes = new TColStd_HSequenceOfHAsciiString;
+ insttypes = new TColStd_HSequenceOfHAsciiString;
+ gentypes = new TColStd_HSequenceOfHAsciiString;
+
+ if((*mytranslator)(MSchema()->MetaSchema(),afile->Path()->Name(),globlist,inctypes,insttypes,gentypes))
+ {
+ ErrorMsg << "WOKOrbix_IDLTranslator::Translate" << "Errors occured" << endm;
+ return WOKBuilder_Failed;
+ }
+ return WOKBuilder_Success;
+}
+
+//=======================================================================
+//function : Execute
+//purpose :
+//=======================================================================
+WOKBuilder_BuildStatus WOKOrbix_IDLTranslator::Execute(const Handle(WOKOrbix_IDLFile)& afile)
+{
+ Handle(TColStd_HSequenceOfHAsciiString) globlist, inctypes, insttypes, gentypes;
+
+ WOKBuilder_BuildStatus status = Translate(afile, globlist, inctypes, insttypes, gentypes);
+
+ switch(status)
+ {
+ case WOKBuilder_Success:
+ {
+ Handle(WOKBuilder_HSequenceOfEntity) production = new WOKBuilder_HSequenceOfEntity;
+
+ for(Standard_Integer i=1; i<= globlist->Length(); i++)
+ {
+ Handle(WOKBuilder_MSEntity) anent = new WOKBuilder_MSEntity(globlist->Value(i));
+ production->Append(anent);
+ }
+ SetProduction(production);
+ }
+ break;
+ default:
+ break;
+ }
+ return status;
+}
+
--- /dev/null
+
+proc WOKOrbix_ServerObjects::AdmFileType {} {
+
+ return dbadmfile;
+}
+
+proc WOKOrbix_ServerObjects::OutputDirTypeName {} {
+ return dbtmpdir;
+}
+
+proc WOKOrbix_ServerObjects::HandleInputFile { ID } {
+
+ scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name
+
+ set list [split $name "_"]
+
+ switch [lindex $list [expr [llength $list] -1 ]] {
+ S.cxx { return 1;}
+ i.cxx { return 1;}
+ }
+ return 0;
+}
+
+proc WOKOrbix_ServerObjects::Execute { unit args } {
+
+ msgprint -i -c "WOKOrbix_ServerObjects::Execute" "Processing server objects : $unit"
+ msgprint -i -c "WOKOrbix_ServerObjects::Execute"
+
+ set unitname [wokinfo -n $unit]
+
+ foreach file $args {
+ stepoutputadd -R $file
+ stepaddexecdepitem $file $file
+ }
+
+ return 0;
+}
--- /dev/null
+-- File: WOKOrbix_ServerSource.cdl
+-- Created: Mon Aug 25 18:41:59 1997
+-- Author: Jean GAUTIER
+-- <jga@hourax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+class ServerSource from WOKOrbix
+inherits CDLUnitSource from WOKStep
+
+ ---Purpose: Computes CDLUnitSource File List.
+
+uses
+ BuildProcess from WOKMake,
+ InputFile from WOKMake,
+ HSequenceOfInputFile from WOKMake,
+ DevUnit from WOKernel,
+ File from WOKernel,
+ HSequenceOfFile from WOKernel,
+ HSequenceOfEntity from WOKBuilder,
+ HAsciiString from TCollection
+
+is
+
+ Create(abp : BuildProcess from WOKMake;
+ aunit : DevUnit from WOKernel;
+ acode : HAsciiString from TCollection;
+ checked, hidden : Boolean from Standard)
+ returns mutable ServerSource from WOKOrbix;
+
+ ReadUnitDescr(me:mutable; unitcdl : InputFile from WOKMake) is redefined protected;
+ ---Purpose: Read Unit.cdl file to obtain CDL files list
+
+ Execute(me:mutable; execlist : HSequenceOfInputFile from WOKMake)
+ ---Purpose: Executes step
+ -- Computes output files
+ is redefined private;
+
+end ServerSource;
--- /dev/null
+// File: WOKOrbix_ServerSource.cxx
+// Created: Mon Aug 25 18:43:29 1997
+// Author: Jean GAUTIER
+// <jga@hourax.paris1.matra-dtv.fr>
+
+
+#include <TColStd_HSequenceOfHAsciiString.hxx>
+
+#include <WOKTools_Messages.hxx>
+
+#include <WOKBuilder_CDLFile.hxx>
+#include <WOKBuilder_MSchema.hxx>
+#include <WOKBuilder_MSEntity.hxx>
+#include <WOKBuilder_MSTool.hxx>
+
+#include <WOKernel_Locator.hxx>
+#include <WOKernel_File.hxx>
+
+#include <WOKMake_InputFile.hxx>
+#include <WOKMake_OutputFile.hxx>
+#include <WOKMake_HSequenceOfInputFile.hxx>
+
+#include <WOKOrbix_ServerSource.ixx>
+
+#ifdef WNT
+# include <WOKNT_WNT_BREAK.hxx>
+#endif // WNT
+
+//=======================================================================
+//function : WOKOrbix_ServerSource
+//purpose :
+//=======================================================================
+WOKOrbix_ServerSource::WOKOrbix_ServerSource(const Handle(WOKMake_BuildProcess)& abp,
+ const Handle(WOKernel_DevUnit)& aunit,
+ const Handle(TCollection_HAsciiString)& acode,
+ const Standard_Boolean checked,
+ const Standard_Boolean hidden)
+: WOKStep_CDLUnitSource(abp,aunit, acode, checked, hidden)
+{
+}
+
+//=======================================================================
+//function : ReadUnitDescr
+//purpose :
+//=======================================================================
+void WOKOrbix_ServerSource::ReadUnitDescr(const Handle(WOKMake_InputFile)& ServerCDL)
+{
+ Standard_Integer i;
+ Handle(WOKBuilder_MSchema) ameta = WOKBuilder_MSTool::GetMSchema();
+ Handle(TColStd_HSequenceOfHAsciiString) aseq;
+ Handle(WOKernel_File) gefile, thefile, NULLFILE;
+
+ WOKStep_CDLUnitSource::ReadUnitDescr(ServerCDL);
+
+ switch(Status())
+ {
+ case WOKMake_Failed:
+ return;
+ default:
+ break;
+ }
+
+ Handle(TCollection_HAsciiString) msentity = new TCollection_HAsciiString("msentity");
+
+ aseq = ameta->ComponentParts(Unit()->Name());
+
+ for(i=1; i<=aseq->Length(); i++)
+ {
+#ifdef WNT
+_TEST_BREAK();
+#endif // WNT
+ Handle(TCollection_HAsciiString) msid = WOKernel_File::FileLocatorName(Unit()->Name(), msentity, aseq->Value(i));
+ Handle(WOKBuilder_Specification) cdlen = new WOKBuilder_CDLFile(ServerCDL->File()->Path());
+ Handle(WOKBuilder_MSEntity) msent = new WOKBuilder_MSEntity(cdlen, aseq->Value(i));
+
+ Handle(WOKMake_OutputFile) outfile = new WOKMake_OutputFile(msid,
+ NULLFILE,
+ msent, msent->Path());
+ outfile->SetLocateFlag(Standard_True);
+ outfile->SetProduction();
+ outfile->SetPhysicFlag(Standard_False);
+ AddExecDepItem(ServerCDL, outfile, Standard_True);
+ }
+}
+
+
+
+//=======================================================================
+//function : Execute
+//purpose :
+//=======================================================================
+void WOKOrbix_ServerSource::Execute(const Handle(WOKMake_HSequenceOfInputFile)& execlist)
+{
+ Handle(WOKernel_File) FILES = GetFILES();
+ Handle(WOKernel_File) PKCDL = GetUnitDescr();
+
+ if(execlist->Length())
+ {
+ Standard_Integer i;
+
+ for(i=1; i<=execlist->Length(); i++)
+ {
+ if(!strcmp(execlist->Value(i)->File()->Name()->ToCString(), FILES->Name()->ToCString()))
+ {
+ ReadFILES(execlist->Value(i));
+ }
+ if(!strcmp(execlist->Value(i)->File()->Name()->ToCString(), PKCDL->Name()->ToCString()))
+ {
+ ReadUnitDescr(execlist->Value(i));
+ }
+ }
+ }
+ else
+ {
+ if(!FILES.IsNull())
+ {
+ Handle(WOKMake_InputFile) infile = new WOKMake_InputFile(FILES->LocatorName(), FILES,
+ Handle(WOKBuilder_Entity)(), FILES->Path());
+ execlist->Append(infile);
+ infile->SetDirectFlag(Standard_True);
+ infile->SetLocateFlag(Standard_True);
+
+ ReadFILES(infile);
+ }
+
+ if(CheckStatus("FILES reading")) return;
+ if(!PKCDL.IsNull())
+ {
+ Handle(WOKMake_InputFile) infile = new WOKMake_InputFile(PKCDL->LocatorName(), PKCDL,
+ Handle(WOKBuilder_Entity)(), PKCDL->Path());
+ execlist->Append(infile);
+ infile->SetDirectFlag(Standard_True);
+ infile->SetLocateFlag(Standard_True);
+
+ ReadUnitDescr(infile);
+ }
+ if(CheckStatus("CDL processing")) return;
+
+
+ }
+
+ Handle(TCollection_HAsciiString) astr;
+ Handle(TCollection_HAsciiString) asourcetype = new TCollection_HAsciiString("source");
+ Handle(WOKernel_File) afile;
+
+ astr = new TCollection_HAsciiString(Unit()->Name());
+ astr->AssignCat(".cxx");
+ afile = Locator()->Locate(Unit()->Name(), asourcetype, astr);
+
+ if(afile.IsNull())
+ {
+ WarningMsg << "WOKOrbix_ServerSource::Execute"
+ << "Missing server main file " << astr << endm;
+ afile = new WOKernel_File(astr, Unit(), Unit()->GetFileType(asourcetype));
+ afile->GetPath();
+ }
+
+ Handle(WOKMake_InputFile) infile = new WOKMake_InputFile(afile->LocatorName(), afile,
+ Handle(WOKBuilder_Entity)() , afile->Path());
+ execlist->Append(infile);
+ infile->SetDirectFlag(Standard_True);
+ infile->SetLocateFlag(Standard_True);
+
+
+ Handle(WOKMake_OutputFile) outfile = new WOKMake_OutputFile(afile->LocatorName(), afile,
+ Handle(WOKBuilder_Entity)() , afile->Path());
+
+ outfile->SetLocateFlag(Standard_True);
+ outfile->SetProduction();
+ AddExecDepItem(infile, outfile, Standard_True);
+
+ SetSucceeded();
+
+ return;
+}
+