--- /dev/null
+-- File: EDL.edl
+-- Author: Jean GAUTIER
+-- History: Wed Feb 21 14:22:13 1996 Jean GAUTIER Creation
+-- Copyright: Matra Datavision 1996
+
+@ifnotdefined ( %EDL_EDL ) then
+@set %EDL_EDL = "";
+
+@template EDL_FileHeader ( %FileName, %ParamClass ) is
+$-- File : %FileName
+$-- ParamClass : %ParamClass
+$-- Copyright : Matra Datavision 1996
+$
+$@ifnotdefined ( %%ParamClass_EDL ) then
+$@set %%ParamClass_EDL = "";
+$
+@end;
+
+@template EDL_SetLine ( %Name, %Value ) is
+$@set %Name = "%Value";
+@end;
+
+
+@template EDL_FileFooter ( %FileName, %ParamClass ) is
+$@ifdefined(%ShopName) then
+$@uses "USECONFIG.edl";
+$@endif;
+$@endif;
+@end;
+
+@endif;
--- /dev/null
+WOKUtils_CMPLRS.edl
+WOKUtils_Replace.tcl
+WOKUtils_TimeStat.hxx
+WOKUtils_Timeval.hxx
+WOKUtils_SigHandler.hxx
+WOKUtils_TriggerAction.hxx
+WOKUtils_TriggerHandler.hxx
+WOKUtils_TriggerControl.hxx
+WOKUtils_Triggers.hxx
+WOKUtils_ProcessManager.hxx
+WOKUtils_Signal.hxx
+WOKUtils_AdmFile.hxx
+WOKUtils_RegExp.hxx
+WOKUtils_WOKVersion.hxx
+Handle_WOKUtils_Path_proto.hxx
+Handle_WOKUtils_RegExp_proto.hxx
+Handle_WOKUtils_RemoteShell_proto.hxx
+Handle_WOKUtils_Shell_proto.hxx
+WOKUtils_Extension_proto.hxx
+WOKUtils_Path_proto.hxx
+WOKUtils_RESyntax_proto.hxx
+WOKUtils_RegExp_proto.hxx
+WOKUtils_RemoteShell_proto.hxx
+WOKUtils_Shell_proto.hxx
+WOKUtils_ShellManager_proto.hxx
+WOKUtils_PathIterator_proto.hxx
+EDL.edl
+WOKUtils_Trigger_proto.hxx
+WOKUtils_Param_proto.hxx
+WOKUtils_WOKSteps.edl
--- /dev/null
+// File: Handle_WOKUtils_Path_proto.hxx
+// Created: Fri Jan 31 19:55:45 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef Handle_WOKUtils_Path_HeaderFile
+#define Handle_WOKUtils_Path_HeaderFile
+
+
+#ifdef WNT
+
+#include <Handle_WOKNT_Path.hxx>
+
+typedef Handle_WOKNT_Path Handle_WOKUtils_Path;
+
+#else
+
+#include <Handle_WOKUnix_Path.hxx>
+
+typedef Handle_WOKUnix_Path Handle_WOKUtils_Path;
+
+#endif
+
+
+#endif
--- /dev/null
+// File: Handle_WOKUtils_RegExp_proto.hxx
+// Created: Mon Feb 3 19:26:55 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef Handle_WOKUtils_RegExp_proto_HeaderFile
+#define Handle_WOKUtils_RegExp_proto_HeaderFile
+
+
+#ifdef WNT
+
+#include <Handle_WOKNT_RegExp.hxx>
+
+typedef Handle_WOKNT_RegExp Handle_WOKUtils_RegExp;
+
+#else
+
+#include <Handle_WOKUnix_RegExp.hxx>
+
+typedef Handle_WOKUnix_RegExp Handle_WOKUtils_RegExp;
+
+#endif
+
+
+#endif
--- /dev/null
+// File: Handle_WOKUtils_RemoteShell.hxx
+// Created: Fri Jan 31 20:07:44 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef Handle_WOKUtils_RemoteShell_HeaderFile
+#define Handle_WOKUtils_RemoteShell_HeaderFile
+
+
+
+#ifdef WNT
+
+#include <Handle_WOKNT_Shell.hxx>
+
+typedef Handle_WOKNT_Shell Handle_WOKUtils_RemoteShell;
+
+#else
+
+#include <Handle_WOKUnix_RemoteShell.hxx>
+
+typedef Handle_WOKUnix_RemoteShell Handle_WOKUtils_RemoteShell;
+
+#endif
+
+
+#endif
--- /dev/null
+// File: Handle_WOKUtils_Shell_proto.hxx
+// Created: Fri Jan 31 20:07:10 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef Handle_WOKUtils_Shell_proto_HeaderFile
+#define Handle_WOKUtils_Shell_proto_HeaderFile
+
+
+
+
+#ifdef WNT
+
+#include <Handle_WOKNT_Shell.hxx>
+
+typedef Handle_WOKNT_Shell Handle_WOKUtils_Shell;
+
+#else
+
+#include <Handle_WOKUnix_Shell.hxx>
+
+typedef Handle_WOKUnix_Shell Handle_WOKUtils_Shell;
+
+#endif
+
+#endif
--- /dev/null
+-- File: WOKUtils.cdl
+-- Created: Thu May 4 16:20:32 1995
+-- Author: Jean GAUTIER
+-- <jga@cobrax>
+---Copyright: Matra Datavision 1995
+
+
+
+
+package WOKUtils
+
+uses
+ EDL,
+ OSD,
+ TCollection,
+ TColStd,
+ SortTools,
+ MMgt,
+ WOKTools
+
+is
+
+-- IMPORTED TYPES
+
+ imported TimeStat;
+ imported Timeval;
+ imported SigHandler;
+
+ imported TriggerHandler;
+ imported TriggerControl;
+
+ -- Classes imported from WOKUnix or WOKNT
+ --
+ imported ProcessManager;
+ class ShellManager;
+ imported Signal;
+ imported AdmFile;
+ imported Array1OfRegExp;
+
+ class RegExp;
+ class Path;
+ class PathIterator;
+
+ class Shell;
+ class RemoteShell;
+
+-- ENUMERATIONS
+
+ enumeration BufferIs is STDOUT, STDERR;
+ enumeration PopenOutputMode is POPEN_MIX_OUT_ERR, POPEN_OUT_ERR;
+ enumeration PopenBufferMode is POPEN_BUFFERED, POPEN_IMMEDIATE, POPEN_ECHOIFBLOCKED;
+ enumeration ShellMode is SynchronousMode, AsynchronousMode, DumpScriptMode;
+
+ enumeration Extension is CFile, HFile, CDLFile, ODLFile, IDLFile, CXXFile,
+ HXXFile, IXXFile, JXXFile, LXXFile, GXXFile, INCFile,
+ PXXFile, F77File, CSHFile,
+ DBFile, FDDBFile, DDLFile, HO2File,
+ LibSchemaFile, AppSchemaFile,
+ LexFile, YaccFile, PSWFile, LWSFile, TemplateFile,
+ ObjectFile, MFile, CompressedFile, ArchiveFile, DSOFile, DATFile,
+ LispFile, IconFile, TextFile, TarFile,
+ --- WNT extensions
+ LIBFile, DEFile, RCFile, RESFile, IMPFile, EXPFile, PDBFile, DLLFile, EXEFile,
+ UnknownFile, NoExtFile;
+
+ enumeration RESyntax is RESyntaxAWK, RESyntaxEGREP, RESyntaxGREP, RESyntaxEMACS;
+
+ enumeration TriggerStatus is Unknown, Succeeded, Failed, NotSetted;
+
+-- EXCEPTIONS
+
+ exception BufferOverflow inherits Failure from Standard;
+ exception ProcessTimeOut inherits Failure from Standard;
+
+
+-- CLASSES
+
+
+
+ class PathHasher;
+
+ class SearchList;
+ class SearchIterator;
+
+ class ParamItem;
+ class Param;
+
+
+ class Trigger;
+
+-- INSTANCIATIONS
+
+ class MapOfPath
+ instantiates Map from WOKTools (Path from WOKUtils,
+ PathHasher from WOKUtils);
+
+ class SequenceOfPath
+ instantiates Sequence from TCollection ( Path from WOKUtils);
+ class HSequenceOfPath
+ instantiates HSequence from TCollection ( Path from WOKUtils, SequenceOfPath from WOKUtils);
+
+ class SequenceOfParamItem
+ instantiates Sequence from TCollection ( ParamItem from WOKUtils);
+
+ class HSequenceOfParamItem
+ instantiates HSequence from TCollection ( ParamItem from WOKUtils, SequenceOfParamItem from WOKUtils);
+
+end;
+
--- /dev/null
+// File: WOKUtils_AdmFile.hxx
+// Created: Fri Jan 31 19:36:31 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_AdmFile_HeaderFile
+#define WOKUtils_AdmFile_HeaderFile
+
+
+#ifdef WNT
+
+#include <WOKNT_AdmFile.hxx>
+
+typedef WOKNT_AdmFile WOKUtils_AdmFile;
+
+#else
+
+#include <WOKUnix_AdmFile.hxx>
+
+typedef WOKUnix_AdmFile WOKUtils_AdmFile;
+
+#endif
+
+
+#endif
--- /dev/null
+-- File: WOKUtils_CMPLRS.edl
+-- Author: Prestataire Pascal BABIN
+-- History: Wed Jan 29 14:13:00 1997 Prestataire Pascal BABIN Creation
+-- Copyright: Matra Datavision 1997
+
+@ifnotdefined ( %WOKUtils_CMPLRS_EDL) then
+@set %WOKUtils_CMPLRS_EDL = "";
+
+@if ( %Station == "hp" ) then
+ @string %CMPLRS_C_Options = %CMPLRS_C_Options " -Ae";
+ @string %CMPLRS_CXX_Options = %CMPLRS_CXX_Options " +a1";
+@endif;
+
+@endif;
+
--- /dev/null
+// File: WOKUtils_Extension_Proto.hxx
+// Created: Fri Jan 31 20:31:18 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+#ifndef _WOKUtils_Extension_HeaderFile
+#define _WOKUtils_Extension_HeaderFile
+
+
+#ifdef WNT
+
+#include <WOKNT_Extension.hxx>
+
+typedef WOKNT_Extension WOKUtils_Extension;
+
+
+#define WOKUtils_CFile WOKNT_CFile
+#define WOKUtils_HFile WOKNT_HFile
+#define WOKUtils_CDLFile WOKNT_CDLFile
+#define WOKUtils_ODLFile WOKNT_ODLFile
+#define WOKUtils_IDLFile WOKNT_IDLFile
+#define WOKUtils_CXXFile WOKNT_CXXFile
+#define WOKUtils_HXXFile WOKNT_HXXFile
+#define WOKUtils_IXXFile WOKNT_IXXFile
+#define WOKUtils_JXXFile WOKNT_JXXFile
+#define WOKUtils_LXXFile WOKNT_LXXFile
+#define WOKUtils_GXXFile WOKNT_GXXFile
+#define WOKUtils_INCFile WOKNT_INCFile
+#define WOKUtils_PXXFile WOKNT_PXXFile
+#define WOKUtils_F77File WOKNT_F77File
+#define WOKUtils_CSHFile WOKNT_CSHFile
+#define WOKUtils_DBFile WOKNT_DBFile
+#define WOKUtils_FDDBFile WOKNT_FDDBFile
+#define WOKUtils_DDLFile WOKNT_DDLFile
+#define WOKUtils_HO2File WOKNT_HO2File
+#define WOKUtils_LibSchemaFile WOKNT_LibSchemaFile
+#define WOKUtils_AppSchemaFile WOKNT_AppSchemaFile
+#define WOKUtils_LexFile WOKNT_LexFile
+#define WOKUtils_YaccFile WOKNT_YaccFile
+#define WOKUtils_PSWFile WOKNT_PSWFile
+#define WOKUtils_LWSFile WOKNT_LWSFile
+#define WOKUtils_TemplateFile WOKNT_TemplateFile
+#define WOKUtils_ObjectFile WOKNT_ObjectFile
+#define WOKUtils_MFile WOKNT_MFile
+#define WOKUtils_CompressedFile WOKNT_CompressedFile
+#define WOKUtils_ArchiveFile WOKNT_ArchiveFile
+#define WOKUtils_DSOFile WOKNT_DSOFile
+#define WOKUtils_DATFile WOKNT_DATFile
+#define WOKUtils_LispFile WOKNT_LispFile
+#define WOKUtils_IconFile WOKNT_IconFile
+#define WOKUtils_TextFile WOKNT_TextFile
+#define WOKUtils_TarFile WOKNT_TarFile
+#define WOKUtils_LIBFile WOKNT_LIBFile
+#define WOKUtils_DEFile WOKNT_DEFile
+#define WOKUtils_RCFile WOKNT_RCFile
+#define WOKUtils_RESFile WOKNT_RESFile
+#define WOKUtils_IMPFile WOKNT_IMPFile
+#define WOKUtils_EXPFile WOKNT_EXPFile
+#define WOKUtils_DLLFile WOKNT_DLLFile
+#define WOKUtils_PDBFile WOKNT_PDBFile
+#define WOKUtils_EXEFile WOKNT_EXEFile
+
+#define WOKUtils_UnknownFile WOKNT_UnknownFile
+#define WOKUtils_NoExtFile WOKNT_NoExtFile
+
+#else
+
+#include <WOKUnix_Extension.hxx>
+
+typedef WOKUnix_Extension WOKUtils_Extension;
+
+#define WOKUtils_CFile WOKUnix_CFile
+#define WOKUtils_HFile WOKUnix_HFile
+#define WOKUtils_CDLFile WOKUnix_CDLFile
+#define WOKUtils_ODLFile WOKUnix_ODLFile
+#define WOKUtils_IDLFile WOKUnix_IDLFile
+#define WOKUtils_CXXFile WOKUnix_CXXFile
+#define WOKUtils_HXXFile WOKUnix_HXXFile
+#define WOKUtils_IXXFile WOKUnix_IXXFile
+#define WOKUtils_JXXFile WOKUnix_JXXFile
+#define WOKUtils_LXXFile WOKUnix_LXXFile
+#define WOKUtils_GXXFile WOKUnix_GXXFile
+#define WOKUtils_INCFile WOKUnix_INCFile
+#define WOKUtils_PXXFile WOKUnix_PXXFile
+#define WOKUtils_F77File WOKUnix_F77File
+#define WOKUtils_CSHFile WOKUnix_CSHFile
+#define WOKUtils_DBFile WOKUnix_DBFile
+#define WOKUtils_FDDBFile WOKUnix_FDDBFile
+#define WOKUtils_DDLFile WOKUnix_DDLFile
+#define WOKUtils_HO2File WOKUnix_HO2File
+#define WOKUtils_LibSchemaFile WOKUnix_LibSchemaFile
+#define WOKUtils_AppSchemaFile WOKUnix_AppSchemaFile
+#define WOKUtils_LexFile WOKUnix_LexFile
+#define WOKUtils_YaccFile WOKUnix_YaccFile
+#define WOKUtils_PSWFile WOKUnix_PSWFile
+#define WOKUtils_LWSFile WOKUnix_LWSFile
+#define WOKUtils_TemplateFile WOKUnix_TemplateFile
+#define WOKUtils_ObjectFile WOKUnix_ObjectFile
+#define WOKUtils_MFile WOKUnix_MFile
+#define WOKUtils_CompressedFile WOKUnix_CompressedFile
+#define WOKUtils_ArchiveFile WOKUnix_ArchiveFile
+#define WOKUtils_DSOFile WOKUnix_DSOFile
+#define WOKUtils_DATFile WOKUnix_DATFile
+#define WOKUtils_LispFile WOKUnix_LispFile
+#define WOKUtils_IconFile WOKUnix_IconFile
+#define WOKUtils_TextFile WOKUnix_TextFile
+#define WOKUtils_TarFile WOKUnix_TarFile
+#define WOKUtils_LIBFile WOKUnix_LIBFile
+#define WOKUtils_DEFile WOKUnix_DEFile
+#define WOKUtils_RCFile WOKUnix_RCFile
+#define WOKUtils_RESFile WOKUnix_RESFile
+#define WOKUtils_IMPFile WOKUnix_IMPFile
+#define WOKUtils_EXPFile WOKUnix_EXPFile
+#define WOKUtils_UnknownFile WOKUnix_UnknownFile
+#define WOKUtils_NoExtFile WOKUnix_NoExtFile
+#define WOKUtils_DLLFile WOKUnix_DLLFile
+#define WOKUtils_PDBFile WOKUnix_PDBFile
+#define WOKUtils_EXEFile WOKUnix_EXEFile
+
+#endif
+
+#ifndef _Standard_PrimitiveTypes_HeaderFile
+#include <Standard_PrimitiveTypes.hxx>
+#endif
+
+#endif
--- /dev/null
+-- File: WOKUtils_Param.cdl
+-- Created: Mon May 29 15:25:31 1995
+-- Author: Jean GAUTIER
+-- <jga@cobrax>
+---Copyright: Matra Datavision 1995
+
+
+class Param from WOKUtils
+
+ ---Purpose: WOK Parameters values
+
+uses
+ CString from Standard,
+ HAsciiString from TCollection,
+ API from EDL,
+ Path from WOKUtils,
+ HSequenceOfParamItem from WOKUtils,
+ MapOfHAsciiString from WOKTools,
+ HSequenceOfAsciiString from TColStd,
+ HSequenceOfHAsciiString from TColStd
+raises
+ ProgramError
+is
+ Create returns Param from WOKUtils;
+ ---Purpose: creates a WOK parameters map
+
+ Clear(me:out);
+ ---Purpose: clears all in Param List
+
+-- Liste des Reperoires de fichiers EDL
+
+ SetSearchDirectories(me:out; aseq : HSequenceOfAsciiString from TColStd);
+ SearchDirectories(me) returns HSequenceOfAsciiString from TColStd;
+
+ SearchFile(me; afilename : HAsciiString from TCollection)
+ returns Path from WOKUtils;
+
+-- Liste des SubClasses (facultatif)
+
+ SetSubClasses(me:out; aseq : HSequenceOfAsciiString from TColStd);
+ SubClasses(me) returns HSequenceOfAsciiString from TColStd;
+
+-- Set, Unset d'une ou plusieurs variables
+
+ IsSet(me; aname : CString from Standard)
+ ---Purpose: test is a param is setted
+ -- NB: does not try to load it
+ returns Boolean from Standard;
+
+ Set(me; aname : CString from Standard; avalue : CString from Standard);
+ ---Purpose: Sets a variable to a values
+ -- Overrides preceding value (if any)
+
+ Set(me; aseq : HSequenceOfParamItem from WOKUtils);
+
+ UnSet(me; aname : CString from Standard);
+ ---Purpose: Removes parameter from the map
+
+
+-- Obtention, Evaluation d'une variable
+
+ Value(me; aname : CString from Standard; usesubs : Boolean from Standard = Standard_True)
+ returns HAsciiString from TCollection;
+
+ Eval(me; aname : CString from Standard; usesubs : Boolean from Standard = Standard_True)
+ ---Purpose: Evaluates the contents of a parameter
+ -- Names beginning with % are Variables
+ -- Others are templates
+ returns HAsciiString from TCollection;
+
+-- Chargement de valeurs
+
+ IsClassVisible(me; aclass : CString from Standard)
+ returns Boolean from Standard;
+
+ IsFileVisible(me; afile : HAsciiString from TCollection)
+ returns Boolean from Standard;
+
+ VisiblePath(me; afile : HAsciiString from TCollection)
+ returns Path from WOKUtils;
+
+ ParamClass(me; aparamname : CString from Standard)
+ ---Purpose: Returns the Parameter Class of a param
+ returns HAsciiString from TCollection
+ is private;
+
+ ClassLoadFlag(me; aclass : CString from Standard)
+ ---Purpose: Returns the edl variable name for Class (ie. %MyClass_EDL)
+ returns HAsciiString from TCollection;
+
+ ClassSubLoadFlag(me; aclass,asub : CString from Standard)
+ ---Purpose: Returns the edl variable name for Class (ie. %MyClass_EDL)
+ returns HAsciiString from TCollection;
+
+ ClassFile(me; aclass : CString from Standard)
+ ---Purpose: Returns the file name for Class (ie. MyClass.edl)
+ returns HAsciiString from TCollection;
+
+ ClassSubFile(me; aclass, asub : CString from Standard)
+ ---Purpose: Returns the file name for Class (ie. MyClass.edl)
+ returns HAsciiString from TCollection;
+
+ LoadFile(me; afile : HAsciiString from TCollection; filemaynotexist : Boolean from Standard = Standard_False)
+ returns Boolean from Standard;
+
+ LoadParamClass(me; aclass : CString from Standard)
+ ---Purpose: Load a class
+ returns Boolean from Standard;
+
+ LoadParamClass(me; aclass, asub : CString from Standard)
+ ---Purpose: Load a class and SubClass
+ returns Boolean from Standard;
+
+ LoadParamClass(me; aclass : CString from Standard;
+ asubseq : HSequenceOfAsciiString from TColStd)
+ ---Purpose: Loads a class and its SubClasses
+ returns Boolean from Standard;
+
+ GetClassValues(me; aclass : CString from Standard)
+ ---Purpose: Gets all defined Values for a class
+ -- (used to implement tenv)
+ returns HSequenceOfParamItem from WOKUtils;
+
+-- Obtention de la liste des Arguments d'un parametre
+
+ GetArguments(me; aname : CString from Standard)
+ returns HSequenceOfHAsciiString from TColStd;
+
+ GetArguments(me; aname : CString from Standard;
+ aseq : mutable HSequenceOfHAsciiString from TColStd;
+ amap : in out MapOfHAsciiString from WOKTools);
+ ---Purpose: Private Purposes
+
+
+-- Ecriture de valeurs
+
+ Write(me; afile : Path from WOKUtils; somevars : HSequenceOfHAsciiString from TColStd)
+ returns Boolean from Standard raises ProgramError from Standard;
+
+ Write(me; afile : Path from WOKUtils; somevars : HSequenceOfParamItem from WOKUtils)
+ returns Boolean from Standard raises ProgramError from Standard;
+
+
+
+fields
+ myapi : API from EDL;
+ mysubs : HSequenceOfAsciiString from TColStd;
+
+end Param;
--- /dev/null
+// File: WOKUtils_Param.cxx
+// Created: Tue May 30 09:17:22 1995
+// Author: Jean GAUTIER
+// <jga@cobrax>
+
+#include <TCollection_HAsciiString.hxx>
+
+#include <TColStd_HSequenceOfHAsciiString.hxx>
+
+#include <EDL_Template.hxx>
+#include <EDL_Variable.hxx>
+#include <EDL_API.hxx>
+#include <EDL_DataMapIteratorOfMapOfVariable.hxx>
+#include <EDL_DataMapIteratorOfMapOfTemplate.hxx>
+
+
+#include <WOKTools_Messages.hxx>
+#include <WOKUtils_Path.hxx>
+
+
+#include <WOKUtils_ParamItem.hxx>
+#include <WOKUtils_HSequenceOfParamItem.hxx>
+
+
+#include <WOKUtils_WOKVersion.hxx>
+
+#include <WOKUtils_Param.ixx>
+
+#ifdef WNT
+#include <windows.h>
+#else
+#include <unistd.h>
+#endif
+
+
+//=======================================================================
+//function : WOKUtils_Param
+//purpose : Simply creates the param
+//=======================================================================
+WOKUtils_Param::WOKUtils_Param()
+{
+ myapi = new EDL_API;
+ myapi->AddVariable("%WOK_VERSION", WOK_VERSION);
+}
+
+//=======================================================================
+//function : Clear
+//purpose :
+//=======================================================================
+void WOKUtils_Param::Clear()
+{
+ myapi = new EDL_API;
+ myapi->AddVariable("%WOK_VERSION", WOK_VERSION);
+ mysubs.Nullify();
+}
+
+//=======================================================================
+//function : SetSearchDirectories
+//purpose :
+//=======================================================================
+void WOKUtils_Param::SetSearchDirectories(const Handle(TColStd_HSequenceOfAsciiString)& aseq)
+{
+ Standard_Integer i;
+
+ myapi->ClearIncludes();
+
+ for(i=1; i<=aseq->Length(); i++)
+ {
+ myapi->AddIncludeDirectory(aseq->Value(i).ToCString());
+ }
+
+ return;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : SearchFile
+//purpose :
+//=======================================================================
+Handle(WOKUtils_Path) WOKUtils_Param::SearchFile(const Handle(TCollection_HAsciiString)& aname) const
+{
+ Handle(WOKUtils_Path) apath;
+ Handle(TColStd_HSequenceOfAsciiString) dirs = SearchDirectories();
+ Standard_Integer i;
+
+ for(i=1; i<=dirs->Length(); i++)
+ {
+ Handle(WOKUtils_Path) apath = new WOKUtils_Path(dirs->Value(i).ToCString(), aname->ToCString());
+
+ if (apath->Exists()) return apath;
+ }
+ return apath;
+}
+
+//=======================================================================
+//function : SearchDirectories
+//purpose :
+//=======================================================================
+Handle(TColStd_HSequenceOfAsciiString) WOKUtils_Param::SearchDirectories() const
+{
+ return myapi->GetIncludeDirectory();
+}
+
+//=======================================================================
+//function : SetSubClasses
+//purpose :
+//=======================================================================
+void WOKUtils_Param::SetSubClasses(const Handle(TColStd_HSequenceOfAsciiString)& aseq)
+{
+ mysubs = aseq;
+}
+
+//=======================================================================
+//function : SubClasses
+//purpose :
+//=======================================================================
+Handle(TColStd_HSequenceOfAsciiString) WOKUtils_Param::SubClasses() const
+{
+ return mysubs;
+}
+
+//=======================================================================
+//function : IsSet
+//purpose :
+//=======================================================================
+Standard_Boolean WOKUtils_Param::IsSet(const Standard_CString aname) const
+{
+ return myapi->IsDefined(aname);
+}
+
+//=======================================================================
+//function : Set
+//purpose :
+//=======================================================================
+void WOKUtils_Param::Set(const Standard_CString aname, const Standard_CString avalue) const
+{
+ myapi->AddVariable(aname, avalue);
+}
+
+//=======================================================================
+//function : Set
+//purpose :
+//=======================================================================
+void WOKUtils_Param::Set(const Handle(WOKUtils_HSequenceOfParamItem)& aseq) const
+{
+ Standard_Integer i;
+
+ for(i=1; i<=aseq->Length(); i++)
+ {
+ myapi->AddVariable(aseq->Value(i).Name()->ToCString(), aseq->Value(i).Value()->ToCString());
+ }
+}
+
+
+
+//=======================================================================
+//function : UnSet
+//purpose :
+//=======================================================================
+void WOKUtils_Param::UnSet(const Standard_CString aname) const
+{
+ if(myapi->IsDefined(aname))
+ myapi->RemoveVariable(aname);
+}
+
+//=======================================================================
+//function : Value
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKUtils_Param::Value(const Standard_CString aname, const Standard_Boolean usesubs) const
+{
+ Handle(TCollection_HAsciiString) result;
+
+ if(!myapi->IsDefined(aname))
+ {
+ Handle(TCollection_HAsciiString) aclass;
+
+ aclass = ParamClass(aname);
+
+ if(!aclass.IsNull())
+ {
+ if(usesubs)
+ {
+ if(!LoadParamClass(aclass->ToCString(), mysubs)) return result;
+ }
+ else
+ {
+ if(!LoadParamClass(aclass->ToCString())) return result;
+ }
+ }
+ }
+
+ if(aname[0] == '%')
+ {
+ if(myapi->IsDefined(aname))
+ {
+ result = myapi->GetVariableValue(aname);
+ }
+ }
+ else
+ {
+ if(myapi->IsDefined(aname))
+ {
+ EDL_Template atempl = myapi->GetTemplate(aname);
+ Standard_Integer i=1;
+ Standard_CString astr;
+
+ result = new TCollection_HAsciiString;
+
+ astr = atempl.GetLine(i);
+
+ while(astr != NULL)
+ {
+ result->AssignCat(astr);
+ i++;
+ astr = atempl.GetLine(i);
+ }
+ }
+ }
+ return result;
+}
+
+//=======================================================================
+//function : Eval
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKUtils_Param::Eval(const Standard_CString aname, const Standard_Boolean usesubs) const
+{
+
+ Handle(TCollection_HAsciiString) result;
+
+ if(!myapi->IsDefined(aname))
+ {
+ Handle(TCollection_HAsciiString) aclass;
+
+ aclass = ParamClass(aname);
+
+ if(!aclass.IsNull())
+ {
+ if(usesubs)
+ {
+ if(!LoadParamClass(aclass->ToCString(), mysubs)) return result;
+ }
+ else
+ {
+ if(!LoadParamClass(aclass->ToCString())) return result;
+ }
+ }
+ }
+
+ if(aname[0] == '%')
+ {
+ if(myapi->IsDefined(aname))
+ {
+ result = myapi->GetVariableValue(aname);
+ }
+ }
+ else
+ {
+ if(myapi->IsDefined(aname))
+ {
+ myapi->Apply("%PARAM_RESULT", aname);
+ result = myapi->GetVariableValue("%PARAM_RESULT");
+ //myapi->RemoveVariable("%PARAM_RESULT");
+ }
+ }
+ return result;
+}
+
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : IsClassVisible
+//purpose :
+//=======================================================================
+Standard_Boolean WOKUtils_Param::IsClassVisible(const Standard_CString aclass) const
+{
+ Handle(TCollection_HAsciiString) afile = ClassFile(aclass);
+
+ return IsFileVisible(afile);
+}
+
+
+//=======================================================================
+//function : IsFileVisible
+//purpose :
+//=======================================================================
+Standard_Boolean WOKUtils_Param::IsFileVisible(const Handle(TCollection_HAsciiString)& afile) const
+{
+ Standard_Integer i;
+ Handle(WOKUtils_Path) apath;
+ Handle(TColStd_HSequenceOfAsciiString) dirs = SearchDirectories();
+
+ for(i=1; i<=dirs->Length(); i++)
+ {
+ apath = new WOKUtils_Path(dirs->Value(i).ToCString(), afile->ToCString());
+
+ if(apath->Exists()) return Standard_True;
+ }
+ return Standard_False;
+}
+
+//=======================================================================
+//function : VisiblePath
+//purpose :
+//=======================================================================
+Handle(WOKUtils_Path) WOKUtils_Param::VisiblePath(const Handle(TCollection_HAsciiString)& afile) const
+{
+ Standard_Integer i;
+ Handle(WOKUtils_Path) apath, nullpath;
+ Handle(TColStd_HSequenceOfAsciiString) dirs = SearchDirectories();
+
+ for(i=1; i<=dirs->Length(); i++)
+ {
+ apath = new WOKUtils_Path(dirs->Value(i).ToCString(), afile->ToCString());
+
+ if(apath->Exists()) return apath;
+ }
+ return nullpath;
+}
+
+//=======================================================================
+//function : ParamClass
+//purWOKMakepose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKUtils_Param::ParamClass(const Standard_CString aparam) const
+{
+ TCollection_AsciiString name(aparam);
+ Handle(TCollection_HAsciiString) result;
+ Standard_Integer deb, fin;
+
+ if(name.Value(1) == '%') deb = 2;
+ else deb = 1;
+
+ if((fin = name.Search("_")) != -1)
+ {
+ result = new TCollection_HAsciiString(name.SubString(deb, fin -1));
+ }
+
+ return result;
+}
+
+//=======================================================================
+//function : ClassLoadFlag
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKUtils_Param::ClassLoadFlag(const Standard_CString aclass) const
+{
+ TCollection_AsciiString name;
+ Handle(TCollection_HAsciiString) result;
+
+ name.AssignCat("%");
+ name.AssignCat(aclass);
+ name.AssignCat("_EDL");
+
+ result = new TCollection_HAsciiString(name);
+ return result;
+}
+
+//=======================================================================
+//function : ClassLoadFlag
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKUtils_Param::ClassSubLoadFlag(const Standard_CString aclass, const Standard_CString asub) const
+{
+ Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString("%");
+
+ result->AssignCat(asub);
+ result->AssignCat("_");
+ result->AssignCat(aclass);
+ result->AssignCat("_EDL");
+ return result;
+}
+
+//=======================================================================
+//function : ClassFile
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKUtils_Param::ClassFile(const Standard_CString aclass) const
+{
+ Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString(aclass);
+ result->AssignCat(".edl");
+ return result;
+}
+
+//=======================================================================
+//function : ClassSubFile
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKUtils_Param::ClassSubFile(const Standard_CString aclass, const Standard_CString asub) const
+{
+ Standard_CString thedir = strchr(asub, '@');
+
+ if(thedir)
+ {
+ Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString(&(thedir[1]));
+ result->AssignCat("/");
+ *thedir = '\0';
+ result->AssignCat(asub);
+ *thedir = '@';
+ result->AssignCat("_");
+ result->AssignCat(aclass);
+ result->AssignCat(".edl");
+ return result;
+ }
+
+ Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString(asub);
+ result->AssignCat("_");
+ result->AssignCat(aclass);
+ result->AssignCat(".edl");
+ return result;
+}
+
+//=======================================================================
+//function : LoadFile
+//purpose :
+//=======================================================================
+Standard_Boolean WOKUtils_Param::LoadFile(const Handle(TCollection_HAsciiString)& afile, const Standard_Boolean filemaynotexist) const
+{
+ switch(myapi->Execute(afile->ToCString()))
+ {
+ case EDL_NORMAL:
+ return Standard_True;
+ case EDL_SYNTAXERROR:
+ ErrorMsg << "WOKUtils_Param::LoadParamClass"
+ << "EDL Syntax errors occured while loading file : " << afile << endm;
+ break;
+ case EDL_VARNOTFOUND:
+ ErrorMsg << "WOKUtils_Param::LoadParamClass"
+ << "Variable not found while loading file : " << afile << endm;
+ break;
+ case EDL_TEMPMULTIPLEDEFINED:
+ case EDL_TEMPLATENOTDEFINED:
+ ErrorMsg << "WOKUtils_Param::LoadParamClass"
+ << "Template not found while loading file : " << afile << endm;
+ break;
+ case EDL_LIBRARYNOTFOUND:
+ case EDL_LIBNOTOPEN:
+ ErrorMsg << "WOKUtils_Param::LoadParamClass"
+ << "Library error while loading file : " << afile << endm;
+ break;
+ case EDL_FUNCTIONNOTFOUND:
+ ErrorMsg << "WOKUtils_Param::LoadParamClass"
+ << "Function not found while loading file : " << afile << endm;
+ break;
+ case EDL_FILEOPENED:
+ case EDL_FILENOTOPENED:
+ if(filemaynotexist) return Standard_True;
+// ErrorMsg << "WOKUtils_Param::LoadParamClass"
+// << "File " << afile << " could not be opened" << endm;
+ break;
+ case EDL_TOOMANYINCLUDELEVEL:
+ ErrorMsg << "WOKUtils_Param::LoadParamClass"
+ << "Too many include levels while loading file : " << afile << endm;
+ break;
+ }
+ return Standard_False;
+}
+
+//=======================================================================
+//function : LoadParamClass
+//purpose :
+//=======================================================================
+Standard_Boolean WOKUtils_Param::LoadParamClass(const Standard_CString aclass) const
+{
+ if(!myapi->IsDefined(ClassLoadFlag(aclass)->ToCString()))
+ {
+ WOK_TRACE {
+ VerboseMsg("WOK_PARAM") << "WOKUtils_Param::LoadParamClass"
+ << "Loading class : " << aclass << endm;
+ }
+ return LoadFile(ClassFile(aclass));
+ }
+ return Standard_True;
+}
+
+//=======================================================================
+//function : LoadParamClass
+//purpose :
+//=======================================================================
+Standard_Boolean WOKUtils_Param::LoadParamClass(const Standard_CString aclass, const Standard_CString asub) const
+{
+ TCollection_AsciiString astr;
+ Handle(TCollection_HAsciiString) thesubclass, thefile, theflag;
+
+ thefile = ClassSubFile(aclass, asub);
+ theflag = ClassSubLoadFlag(aclass, asub);
+
+ if(!myapi->IsDefined(theflag->ToCString()))
+ {
+ WOK_TRACE {
+ VerboseMsg("WOK_PARAM") << "WOKUtils_Param::LoadParamClass"
+ << "Loading subclass : " << asub << "_" << aclass << endm;
+ }
+ Standard_CString tok = strchr(asub,'@');
+ if(tok)
+ {
+#ifndef WNT
+ if( !access(thefile->ToCString(), F_OK) )
+#else
+ if ( GetFileAttributes(thefile->ToCString() ) != 0xFFFFFFFF )
+#endif
+ return LoadFile(thefile, Standard_True);
+ }
+ else
+ return LoadFile(thefile, Standard_True);
+ }
+ return Standard_True;
+}
+
+//=======================================================================
+//function : LoadParamClass
+//purpose :
+//=======================================================================
+Standard_Boolean WOKUtils_Param::LoadParamClass(const Standard_CString aclass, const Handle(TColStd_HSequenceOfAsciiString)& asubseq) const
+{
+ Standard_Integer i;
+
+ if(!LoadParamClass(aclass)) return Standard_False;
+
+ if(!asubseq.IsNull())
+ {
+ for(i=1; i<=asubseq->Length(); i++)
+ {
+ if(!LoadParamClass(aclass, asubseq->Value(i).ToCString())) return Standard_False;
+ }
+ }
+ return Standard_True;
+}
+
+//=======================================================================
+//function : GetClassValues
+//purpose :
+//=======================================================================
+Handle(WOKUtils_HSequenceOfParamItem) WOKUtils_Param::GetClassValues(const Standard_CString aclass) const
+{
+ Handle(WOKUtils_HSequenceOfParamItem) result = new WOKUtils_HSequenceOfParamItem;
+ TCollection_AsciiString varprefix;
+ TCollection_AsciiString tempprefix;
+ Standard_Integer varlen, templen;
+
+ varprefix.AssignCat("%");
+ varprefix.AssignCat(aclass);
+ varprefix.AssignCat("_");
+ varlen = varprefix.Length();
+
+ tempprefix.AssignCat(aclass);
+ tempprefix.AssignCat("_");
+ templen = tempprefix.Length();
+
+ EDL_DataMapIteratorOfMapOfVariable varit(myapi->GetVariableIterator());
+
+ while(varit.More())
+ {
+ const EDL_Variable& avar = varit.Value();
+
+ if(!strncmp(avar.GetName(), varprefix.ToCString(), varlen))
+ {
+ result->Append(WOKUtils_ParamItem(new TCollection_HAsciiString(avar.GetName()),
+ new TCollection_HAsciiString(avar.GetValue())));
+ }
+
+ varit.Next();
+ }
+
+ EDL_DataMapIteratorOfMapOfTemplate tempit(myapi->GetTemplateIterator());
+
+ while(tempit.More())
+ {
+ const EDL_Template& atemp = tempit.Value();
+
+ if(!strncmp(atemp.GetName(), tempprefix.ToCString(), templen))
+ {
+ result->Append(WOKUtils_ParamItem(new TCollection_HAsciiString(atemp.GetName()),
+ new TCollection_HAsciiString));
+ }
+ tempit.Next();
+ }
+
+ return result;
+}
+
+//=======================================================================
+//function : GetArguments
+//purpose :
+//=======================================================================
+Handle(TColStd_HSequenceOfHAsciiString) WOKUtils_Param::GetArguments(const Standard_CString aname) const
+{
+ if(aname[0] == '%')
+ {
+ Handle(TColStd_HSequenceOfHAsciiString) result = new TColStd_HSequenceOfHAsciiString;
+ return result;
+ }
+
+ return myapi->GetTemplate(aname).GetVariableList();
+}
+
+//=======================================================================
+//function : GetArguments
+//purpose :
+//=======================================================================
+void WOKUtils_Param::GetArguments(const Standard_CString aname,
+ const Handle(TColStd_HSequenceOfHAsciiString)& result,
+ WOKTools_MapOfHAsciiString& amap ) const
+{
+ Standard_Integer i;
+ Handle(TColStd_HSequenceOfHAsciiString) argseq = GetArguments(aname);
+ Handle(TCollection_HAsciiString) anarg;
+
+ for(i=1; i<=argseq->Length(); i++)
+ {
+ anarg = argseq->Value(i);
+ if(!amap.Contains(anarg))
+ {
+ result->Append(anarg);
+ amap.Add(anarg);
+ }
+ }
+ return;
+}
+
+
+//=======================================================================
+//function : Write
+//purpose :
+//=======================================================================
+Standard_Boolean WOKUtils_Param::Write(const Handle(WOKUtils_Path)& apath,
+ const Handle(TColStd_HSequenceOfHAsciiString)& somevars) const
+{
+ Handle(TCollection_HAsciiString) astr;
+ Standard_Integer i;
+
+ LoadParamClass("EDL");
+
+ if(myapi->OpenFile("EDLFILE", apath->Name()->ToCString()) != EDL_NORMAL) return Standard_False;
+
+ myapi->AddVariable("%FileName" , apath->FileName()->ToCString());
+ myapi->AddVariable("%ParamClass" , apath->BaseName()->ToCString());
+
+ myapi->Apply("%EDL_RESULT", "EDL_FileHeader");
+
+ myapi->WriteFile("EDLFILE", "%EDL_RESULT");
+
+ for(i=1; i<=somevars->Length(); i++)
+ {
+ myapi->AddVariable("%Name", somevars->Value(i)->ToCString());
+ myapi->AddVariable("%Value", myapi->GetVariableValue(somevars->Value(i)->ToCString())->ToCString());
+ myapi->Apply("%EDL_RESULT", "EDL_SetLine");
+ myapi->WriteFile("EDLFILE", "%EDL_RESULT");
+ }
+
+ myapi->Apply("%EDL_RESULT", "EDL_FileFooter");
+ myapi->WriteFile("EDLFILE", "%EDL_RESULT");
+
+ myapi->CloseFile("EDLFILE");
+
+ myapi->RemoveVariable("%FileName");
+ myapi->RemoveVariable("%ParamClass");
+ myapi->RemoveVariable("%Name");
+ myapi->RemoveVariable("%Value");
+ myapi->RemoveVariable("%EDL_RESULT");
+
+ return Standard_True;
+}
+
+
+//=======================================================================
+//function : Write
+//purpose :
+//=======================================================================
+Standard_Boolean WOKUtils_Param::Write(const Handle(WOKUtils_Path)& apath,
+ const Handle(WOKUtils_HSequenceOfParamItem)& somevars) const
+{
+ Handle(TCollection_HAsciiString) astr;
+ Standard_Integer i;
+
+ LoadParamClass("EDL");
+
+ if(myapi->OpenFile("EDLFILE", apath->Name()->ToCString())) return Standard_False;
+
+ myapi->AddVariable("%FileName" , apath->FileName()->ToCString());
+ myapi->AddVariable("%ParamClass" , apath->BaseName()->ToCString());
+
+ myapi->Apply("%EDL_RESULT", "EDL_FileHeader");
+
+ myapi->WriteFile("EDLFILE", "%EDL_RESULT");
+
+ for(i=1; i<=somevars->Length(); i++)
+ {
+ myapi->AddVariable("%Name", somevars->Value(i).Name()->ToCString());
+ myapi->AddVariable("%Value", somevars->Value(i).Value()->ToCString());
+ myapi->Apply("%EDL_RESULT", "EDL_SetLine");
+ myapi->WriteFile("EDLFILE", "%EDL_RESULT");
+ }
+
+ myapi->Apply("%EDL_RESULT", "EDL_FileFooter");
+ myapi->WriteFile("EDLFILE", "%EDL_RESULT");
+
+ myapi->CloseFile("EDLFILE");
+
+ myapi->RemoveVariable("%FileName");
+ myapi->RemoveVariable("%ParamClass");
+ myapi->RemoveVariable("%Name");
+ myapi->RemoveVariable("%Value");
+ myapi->RemoveVariable("%EDL_RESULT");
+
+ return Standard_True;
+}
--- /dev/null
+-- File: WOKUtils_ParamItem.cdl
+-- Created: Mon May 29 15:21:53 1995
+-- Author: Jean GAUTIER
+-- <jga@cobrax>
+---Copyright: Matra Datavision 1995
+
+class ParamItem from WOKUtils
+
+uses
+ HAsciiString from TCollection
+
+raises
+ ProgramError from Standard
+is
+ Create returns ParamItem from WOKUtils;
+ Create(aname : HAsciiString from TCollection; avalue : HAsciiString from TCollection)
+ returns ParamItem from WOKUtils;
+ Create(aname : CString from Standard; avalue : CString from Standard)
+ returns ParamItem from WOKUtils;
+
+ SetName(me:out; aname : HAsciiString from TCollection);
+ SetValue(me:out; avalue : HAsciiString from TCollection);
+
+ Name(me)
+ returns HAsciiString from TCollection;
+
+ Value(me)
+ returns HAsciiString from TCollection;
+
+fields
+ myname : HAsciiString from TCollection;
+ myvalue : HAsciiString from TCollection;
+end;
--- /dev/null
+// File: WOKUtils_ParamItem.cxx
+// Created: Tue May 30 09:19:37 1995
+// Author: Jean GAUTIER
+// <jga@cobrax>
+
+
+#include <WOKUtils_ParamItem.ixx>
+#include <WOKTools_Messages.hxx>
+
+//=======================================================================
+//function : WOKUtils_ParamItem
+//purpose :
+//=======================================================================
+WOKUtils_ParamItem::WOKUtils_ParamItem()
+{
+
+}
+
+//=======================================================================
+//function : WOKUtils_ParamItem
+//purpose :
+//=======================================================================
+WOKUtils_ParamItem::WOKUtils_ParamItem(const Handle(TCollection_HAsciiString)& aname, const Handle(TCollection_HAsciiString)& avalue)
+{
+ myname = aname; myvalue = avalue;
+}
+
+//=======================================================================
+//function : WOKUtils_ParamItem
+//purpose :
+//=======================================================================
+WOKUtils_ParamItem::WOKUtils_ParamItem(const Standard_CString aname, const Standard_CString avalue)
+{
+ myname = new TCollection_HAsciiString(aname);
+ myvalue = new TCollection_HAsciiString(avalue);
+}
+
+//=======================================================================
+//function : SetName
+//purpose :
+//=======================================================================
+void WOKUtils_ParamItem::SetName(const Handle(TCollection_HAsciiString)& aname)
+{
+ myname = aname;
+}
+
+//=======================================================================
+//function : SetValue
+//purpose :
+//=======================================================================
+void WOKUtils_ParamItem::SetValue(const Handle(TCollection_HAsciiString)& avalue)
+{
+ myvalue = avalue;
+}
+
+//=======================================================================
+//function : Name
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKUtils_ParamItem::Name() const
+{
+ return myname;
+}
+
+//=======================================================================
+//function : Value
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKUtils_ParamItem::Value() const
+{
+ return myvalue;
+}
+
--- /dev/null
+// File generated by CPPExt (Value)
+// Copyright (C) 1991,1995 by
+//
+// MATRA DATAVISION, FRANCE
+//
+// This software is furnished in accordance with the terms and conditions
+// of the contract and with the inclusion of the above copyright notice.
+// This software or any other copy thereof may not be provided or otherwise
+// be made available to any other person. No title to an ownership of the
+// software is hereby transferred.
+//
+// At the termination of the contract, the software and all copies of this
+// software must be deleted.
+
+#ifndef _WOKUtils_Param_HeaderFile
+#define _WOKUtils_Param_HeaderFile
+
+#ifndef _Handle_EDL_API_HeaderFile
+#include <Handle_EDL_API.hxx>
+#endif
+#ifndef _Handle_TColStd_HSequenceOfAsciiString_HeaderFile
+#include <Handle_TColStd_HSequenceOfAsciiString.hxx>
+#endif
+#ifndef _Handle_WOKUtils_Path_HeaderFile
+#include <Handle_WOKUtils_Path.hxx>
+#endif
+#ifndef _Handle_TCollection_HAsciiString_HeaderFile
+#include <Handle_TCollection_HAsciiString.hxx>
+#endif
+#ifndef _Standard_Boolean_HeaderFile
+#include <Standard_Boolean.hxx>
+#endif
+#ifndef _Standard_CString_HeaderFile
+#include <Standard_CString.hxx>
+#endif
+#ifndef _Handle_WOKUtils_HSequenceOfParamItem_HeaderFile
+#include <Handle_WOKUtils_HSequenceOfParamItem.hxx>
+#endif
+#ifndef _Handle_TColStd_HSequenceOfHAsciiString_HeaderFile
+#include <Handle_TColStd_HSequenceOfHAsciiString.hxx>
+#endif
+class EDL_API;
+class TColStd_HSequenceOfAsciiString;
+class Standard_ProgramError;
+class WOKernel_FileTypeBase;
+class WOKernel_FileType;
+class WOKUtils_Path;
+class TCollection_HAsciiString;
+class WOKUtils_HSequenceOfParamItem;
+class TColStd_HSequenceOfHAsciiString;
+class WOKTools_MapOfHAsciiString;
+
+
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+class WOKUtils_Param {
+
+public:
+
+ // Methods PUBLIC
+ //
+Standard_EXPORT WOKUtils_Param();
+Standard_EXPORT void Clear() ;
+Standard_EXPORT void SetSearchDirectories(const Handle(TColStd_HSequenceOfAsciiString)& aseq) ;
+Standard_EXPORT Handle_TColStd_HSequenceOfAsciiString SearchDirectories() const;
+Standard_EXPORT Handle_WOKUtils_Path SearchFile(const Handle(TCollection_HAsciiString)& afilename) const;
+Standard_EXPORT void SetSubClasses(const Handle(TColStd_HSequenceOfAsciiString)& aseq) ;
+Standard_EXPORT Handle_TColStd_HSequenceOfAsciiString SubClasses() const;
+Standard_EXPORT Standard_Boolean IsSet(const Standard_CString aname) const;
+Standard_EXPORT void Set(const Standard_CString aname,const Standard_CString avalue) const;
+Standard_EXPORT void Set(const Handle(WOKUtils_HSequenceOfParamItem)& aseq) const;
+Standard_EXPORT void UnSet(const Standard_CString aname) const;
+Standard_EXPORT Handle_TCollection_HAsciiString Value(const Standard_CString aname,const Standard_Boolean usesubs = Standard_True) const;
+Standard_EXPORT Handle_TCollection_HAsciiString Eval(const Standard_CString aname,const Standard_Boolean usesubs = Standard_True) const;
+Standard_EXPORT Standard_Boolean IsClassVisible(const Standard_CString aclass) const;
+Standard_EXPORT Standard_Boolean IsFileVisible(const Handle(TCollection_HAsciiString)& afile) const;
+Standard_EXPORT Handle_WOKUtils_Path VisiblePath(const Handle(TCollection_HAsciiString)& afile) const;
+Standard_EXPORT Handle_TCollection_HAsciiString ClassLoadFlag(const Standard_CString aclass) const;
+Standard_EXPORT Handle_TCollection_HAsciiString ClassSubLoadFlag(const Standard_CString aclass,const Standard_CString asub) const;
+Standard_EXPORT Handle_TCollection_HAsciiString ClassFile(const Standard_CString aclass) const;
+Standard_EXPORT Handle_TCollection_HAsciiString ClassSubFile(const Standard_CString aclass,const Standard_CString asub) const;
+Standard_EXPORT Standard_Boolean LoadFile(const Handle(TCollection_HAsciiString)& afile,const Standard_Boolean filemaynotexist = Standard_False) const;
+Standard_EXPORT Standard_Boolean LoadParamClass(const Standard_CString aclass) const;
+Standard_EXPORT Standard_Boolean LoadParamClass(const Standard_CString aclass,const Standard_CString asub) const;
+Standard_EXPORT Standard_Boolean LoadParamClass(const Standard_CString aclass,const Handle(TColStd_HSequenceOfAsciiString)& asubseq) const;
+Standard_EXPORT Handle_WOKUtils_HSequenceOfParamItem GetClassValues(const Standard_CString aclass) const;
+Standard_EXPORT Handle_TColStd_HSequenceOfHAsciiString GetArguments(const Standard_CString aname) const;
+Standard_EXPORT void GetArguments(const Standard_CString aname,const Handle(TColStd_HSequenceOfHAsciiString)& aseq,WOKTools_MapOfHAsciiString& amap) const;
+Standard_EXPORT Standard_Boolean Write(const Handle(WOKUtils_Path)& afile,const Handle(TColStd_HSequenceOfHAsciiString)& somevars) const;
+Standard_EXPORT Standard_Boolean Write(const Handle(WOKUtils_Path)& afile,const Handle(WOKUtils_HSequenceOfParamItem)& somevars) const;
+
+
+friend class WOKernel_FileTypeBase;
+friend class WOKernel_FileType;
+
+
+
+protected:
+
+ // Methods PROTECTED
+ //
+
+
+ // Fields PROTECTED
+ //
+
+
+private:
+
+ // Methods PRIVATE
+ //
+Standard_EXPORT Handle_TCollection_HAsciiString ParamClass(const Standard_CString aparamname) const;
+
+
+ // Fields PRIVATE
+ //
+Handle_EDL_API myapi;
+Handle_TColStd_HSequenceOfAsciiString mysubs;
+
+
+};
+
+
+
+
+
+// other inline functions and methods (like "C++: function call" methods)
+//
+
+
+#endif
--- /dev/null
+-- File: WOKUtils_Path.cdl
+-- Created: Fri Jan 31 19:02:27 1997
+-- Author: Jean GAUTIER
+-- <jga@cobrax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class Path from WOKUtils
+inherits TShared from MMgt
+
+ ---Purpose:
+
+uses
+ Path from OSD,
+ HAsciiString from TCollection,
+ TimeStat from WOKUtils,
+ Extension from WOKUtils
+raises
+ OSDError from OSD
+is
+
+ Create returns mutable Path from WOKUtils;
+ ---Purpose: Instantiates Path from WOKUtils
+
+ Create(apath : CString from Standard)
+ returns mutable Path from WOKUtils;
+
+ Create(apath : HAsciiString from TCollection)
+ ---Purpose: Instantiates Path from WOKUtils using an asciistring
+ returns mutable Path from WOKUtils;
+
+ Create(apath : Path from OSD)
+ ---Purpose: Instantiates Path from WOKUtils using an OSD_Path
+ returns mutable Path from WOKUtils;
+
+ Create(adir,aname : HAsciiString from TCollection)
+ ---Purpose: Instantiates Path from WOKUtils using an directory and
+ -- a name
+ returns mutable Path from WOKUtils;
+
+ Create(adir,aname : CString from Standard)
+ ---Purpose: Instantiates Path from WOKUtils using an directory and
+ -- a name
+ returns mutable Path from WOKUtils;
+
+ Name(me)
+ ---C++: return const &
+ ---Purpose: returns PathName
+ returns HAsciiString from TCollection;
+
+ SetName(me:mutable; apath : HAsciiString from TCollection);
+ ---Purpose: sets path
+
+ Exists(me) returns Boolean;
+ ---Purpose: Tests existency of path on disk
+
+ CreateDirectory(me; CreateParents : Boolean from Standard = Standard_False)
+ ---Purpose: Creates path as a directory
+ returns Boolean
+ raises OSDError from OSD;
+
+ CreateFile(me; CreateParents : Boolean from Standard = Standard_False)
+ ---Purpose: Creates path as a file on disk
+ returns Boolean
+ raises OSDError from OSD;
+
+ IsSymLink(me)
+ returns Boolean from Standard;
+
+ IsFile(me)
+ returns Boolean from Standard;
+
+ IsDirectory(me)
+ returns Boolean from Standard;
+
+ CreateSymLinkTo(me; apath : Path from WOKUtils);
+
+ RemoveDirectory(me; RemoveChilds : Boolean from Standard = Standard_False);
+
+ RemoveFile(me);
+
+ MoveTo(me:mutable; adestpath : Path from WOKUtils)
+ ---Purpose: Renames file to destpath Failes if mypath and dest
+ -- path are not on the same file system
+ -- mypath is changed to which of adestpath
+ raises OSDError from OSD;
+
+ ReducedPath(me)
+ ---Purpose: reduces Path as much as possible (reads links)
+ returns Path from WOKUtils;
+
+ IsSamePath(me; another : Path from WOKUtils)
+ ---Purpose: Tests is me corresponds to the same
+ -- file as <another> (reads links)
+ returns Boolean from Standard;
+
+ IsSameFile(me; another : Path from WOKUtils)
+ ---Purpose: Teste si deux fichiers ont le meme
+ -- contenu (typiquement utilise a l'extraction)
+ returns Boolean from Standard;
+
+ MDateIsKnown(me)
+ ---Purpose: Tests if Date of Path is known
+ returns Boolean;
+
+ GetMDate(me:mutable)
+ ---Purpose: Get MDate of path on File System
+ returns TimeStat from WOKUtils raises OSDError from OSD;
+
+ MDate(me)
+ ---Purpose: returns known date of path
+ returns TimeStat from WOKUtils;
+
+ ResetMDate(me:mutable);
+
+ IsOlder(me:mutable; another : Path from WOKUtils)
+ returns Boolean from Standard;
+ IsNewer(me:mutable; another : Path from WOKUtils)
+ returns Boolean from Standard;
+
+ IsWriteAble(me)
+ returns Boolean from Standard;
+
+ Extension(me)
+ ---Purpose: extracts Extension of file
+ returns Extension from WOKUtils;
+
+ ExtensionName(me)
+ ---Purpose: extracts Extension of file
+ returns HAsciiString from TCollection;
+
+ BaseName(me)
+ ---Purpose: returns the basename of File
+ returns HAsciiString from TCollection;
+
+ DirName(me)
+ ---Purpose: returns the dirname of file
+ returns HAsciiString from TCollection;
+
+ FileName(me)
+ ---Purpose: returns the filename (<BaseName>.<Extension>) of path
+ returns HAsciiString from TCollection;
+
+fields
+ mypath : HAsciiString from TCollection;
+ mydate : TimeStat from WOKUtils;
+end Path;
--- /dev/null
+// File: WOKUtils_Path.cxx
+// Created: Fri Jan 31 19:40:11 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+#ifndef _Handle_MMgt_TShared_HeaderFile
+#include <Handle_MMgt_TShared.hxx>
+#endif
+
+#ifdef WNT
+# include <WOKNT_Path.hxx>
+# define WOKUtils_Path WOKNT_Path
+#else
+# include <WOKUnix_Path.hxx>
+# define WOKUtils_Path WOKUnix_Path
+#endif
+
+#include <WOKUtils_Extension.hxx>
+
+class Standard_Transient;
+class Handle_Standard_Type;
+class Handle(MMgt_TShared);
+class WOKUtils_Path;
+
+Standard_EXPORT Handle_Standard_Type& WOKUtils_Path_Type_()
+{
+
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared);
+ if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
+ static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
+ if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
+
+
+ static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
+ static Handle_Standard_Type _aType = new Standard_Type("WOKUtils_Path",
+ sizeof(WOKUtils_Path),
+ 1,
+ (Standard_Address)_Ancestors,
+ (Standard_Address)NULL);
+
+ return _aType;
+}
--- /dev/null
+-- File: WOKUtils_PathHasher.cdl
+-- Created: Mon Jun 26 17:54:58 1995
+-- Author: Jean GAUTIER
+-- <jga@cobrax>
+---Copyright: Matra Datavision 1995
+
+class PathHasher from WOKUtils
+uses Path from WOKUtils
+is
+ HashCode(myclass; apath : Path from WOKUtils) returns Integer from Standard;
+
+ IsEqual(myclass; path1, path2 : Path from WOKUtils) returns Boolean from Standard;
+end;
--- /dev/null
+// File: WOKUtils_PathHasher.cxx
+// Created: Mon Jun 26 17:56:47 1995
+// Author: Jean GAUTIER
+// <jga@cobrax>
+
+
+#include <WOKUtils_PathHasher.ixx>
+
+#include <WOKTools_HAsciiStringHasher.hxx>
+
+#include <TCollection_HAsciiString.hxx>
+
+Standard_Integer WOKUtils_PathHasher::HashCode(const Handle(WOKUtils_Path)& apath)
+{
+ if(apath.IsNull() != Standard_True)
+ {
+ return WOKTools_HAsciiStringHasher::HashCode(apath->Name());
+ }
+ else return 0;
+}
+
+Standard_Boolean WOKUtils_PathHasher::IsEqual(const Handle(WOKUtils_Path)& path1, const Handle(WOKUtils_Path)& path2)
+{
+ return path1->Name()->IsSameString(path2->Name());
+}
+
--- /dev/null
+-- File: WOKUtils_PathIterator.cdl
+-- Created: Mon Aug 03 15:37:45 1998
+-- Author:
+-- <jga@GROMINEX>
+---Copyright: Matra Datavision 1998
+
+
+class PathIterator from WOKUtils
+
+
+uses
+
+ HAsciiString from TCollection,
+ Path from WOKUtils
+
+is
+
+
+ Create(apath : Path from WOKUtils; recursive : Boolean from Standard = Standard_False)
+ returns PathIterator from WOKUtils;
+
+ Next(me:out);
+
+
+ Value(me; level : out Integer from Standard)
+ returns Path from WOKUtils;
+
+ More(me)
+ returns Boolean from Standard;
+
+end;
+
--- /dev/null
+
+
+
+#include <WOKUtils_PathIterator.ixx>
+
--- /dev/null
+// File: WOKUtils_PathIterator.hxx
+// Created: Fri Jan 31 19:34:18 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_PathIterator_HeaderFile
+#define WOKUtils_PathIterator_HeaderFile
+
+#ifdef WNT
+
+#include <WOKNT_PathIterator.hxx>
+
+typedef WOKNT_PathIterator WOKUtils_PathIterator;
+
+#else
+
+#include <WOKUnix_PathIterator.hxx>
+
+typedef WOKUnix_PathIterator WOKUtils_PathIterator;
+
+#endif
+
+
+
+#endif
--- /dev/null
+// File: WOKUtils_Path_proto.hxx
+// Created: Fri Jan 31 19:37:37 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_Path_proto_HeaderFile
+#define WOKUtils_Path_proto_HeaderFile
+
+#include <Handle_WOKUtils_Path.hxx>
+
+#ifdef WNT
+
+#include <WOKNT_Path.hxx>
+#define WOKUtils_Path WOKNT_Path
+
+#else
+
+#include <WOKUnix_Path.hxx>
+#define WOKUtils_Path WOKUnix_Path
+
+#endif
+
+#include <WOKUtils_Extension.hxx>
+
+
+#endif
--- /dev/null
+// File: WOKUtils_ProcessManager.hxx
+// Created: Fri Jan 31 19:32:38 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_ProcessManager_HeaderFile
+#define WOKUtils_ProcessManager_HeaderFile
+
+#ifdef WNT
+
+#include <WOKNT_ShellManager.hxx>
+
+typedef WOKNT_ShellManager WOKUtils_ProcessManager;
+
+#else
+
+#include <WOKUnix_ProcessManager.hxx>
+
+typedef WOKUnix_ProcessManager WOKUtils_ProcessManager;
+
+#endif
+
+#endif
--- /dev/null
+// File: WOKUtils_RESyntax_proto.hxx
+// Created: Mon Feb 3 20:07:30 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_RESyntax_proto_HeaderFile
+#define WOKUtils_RESyntax_proto_HeaderFile
+
+
+
+#ifdef WNT
+
+#include <WOKNT_RESyntax.hxx>
+
+typedef WOKNT_RESyntax WOKUtils_RESyntax;
+
+#define WOKUtils_RESyntaxAWK WOKNT_RESyntaxAWK
+#define WOKUtils_RESyntaxEGREP WOKNT_RESyntaxEGREP
+#define WOKUtils_RESyntaxGREP WOKNT_RESyntaxGREP
+#define WOKUtils_RESyntaxEMACS WOKNT_RESyntaxEMACS
+
+#else
+
+#include <WOKUnix_RESyntax.hxx>
+
+typedef WOKUnix_RESyntax WOKUtils_RESyntax;
+
+#define WOKUtils_RESyntaxAWK WOKUnix_RESyntaxAWK
+#define WOKUtils_RESyntaxEGREP WOKUnix_RESyntaxEGREP
+#define WOKUtils_RESyntaxGREP WOKUnix_RESyntaxGREP
+#define WOKUtils_RESyntaxEMACS WOKUnix_RESyntaxEMACS
+
+#endif
+
+#endif
+
--- /dev/null
+-- File: WOKUtils_RegExp.cdl
+-- Created: Mon Feb 3 19:25:50 1997
+-- Author: Jean GAUTIER
+-- <jga@cobrax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class RegExp from WOKUtils
+inherits TShared from MMgt
+
+is
+
+ Create returns mutable RegExp from WOKUtils;
+
+
+end RegExp;
--- /dev/null
+// File: WOKUtils_RegExp.cxx
+// Created: Thu Feb 6 16:19:33 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+
+#include <WOKUtils_RegExp.hxx>
--- /dev/null
+// File: WOKUtils_RegExp_proto.hxx
+// Created: Mon Feb 3 19:27:30 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_RegExp_proto_HeaderFile
+#define WOKUtils_RegExp_proto_HeaderFile
+
+
+#include <Handle_WOKUtils_RegExp.hxx>
+
+#ifdef WNT
+
+#include <WOKNT_RegExp.hxx>
+
+#define WOKUtils_RegExp WOKNT_RegExp
+
+#else
+
+#include <WOKUnix_RegExp.hxx>
+
+#define WOKUtils_RegExp WOKUnix_RegExp
+
+#endif
+
+
+#endif
--- /dev/null
+// File: WOKUtils_RegExp_proto.hxx
+// Created: Mon Feb 3 19:27:30 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_RegExp_proto_HeaderFile
+#define WOKUtils_RegExp_proto_HeaderFile
+
+
+#include <Handle_WOKUtils_RegExp.hxx>
+
+#ifdef WNT
+
+#include <WOKNT_RegExp.hxx>
+
+#define WOKUtils_RegExp WOKNT_RegExp
+
+#else
+
+#include <WOKUnix_RegExp.hxx>
+
+#define WOKUtils_RegExp WOKUnix_RegExp
+
+#endif
+
+
+#endif
--- /dev/null
+-- File: WOKUtils_RemoteShell.cdl
+-- Created: Fri Jan 31 19:31:05 1997
+-- Author: Jean GAUTIER
+-- <jga@cobrax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class RemoteShell from WOKUtils
+inherits Shell from WOKUtils
+
+ ---Purpose:
+
+is
+
+ Create returns mutable RemoteShell from WOKUtils;
+
+end RemoteShell;
--- /dev/null
+// File: WOKUtils_RemoteRemoteShell.cxx
+// Created: Fri Jan 31 19:40:45 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+// File: WOKUtils_RemoteShell.cxx
+// Created: Fri Jan 31 19:40:30 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+#ifndef _Handle_MMgt_TShared_HeaderFile
+#include <Handle_MMgt_TShared.hxx>
+#endif
+
+#ifdef WNT
+# include <WOKNT_Shell.hxx>
+# define WOKUtils_RemoteShell WOKNT_Shell
+#else
+# include <WOKUnix_RemoteShell.hxx>
+# define WOKUtils_RemoteShell WOKUnix_RemoteShell
+#endif
+
+class Standard_Transient;
+class Handle_Standard_Type;
+class Handle(MMgt_TShared);
+class WOKUtils_RemoteShell;
+
+Standard_EXPORT Handle_Standard_Type& WOKUtils_RemoteShell_Type_()
+{
+
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared);
+ if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
+ static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
+ if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
+
+
+ static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
+ static Handle_Standard_Type _aType = new Standard_Type("WOKUtils_RemoteShell",
+ sizeof(WOKUtils_RemoteShell),
+ 1,
+ (Standard_Address)_Ancestors,
+ (Standard_Address)NULL);
+
+ return _aType;
+}
--- /dev/null
+// File: WOKUtils_RemoteShell_proto.hxx
+// Created: Fri Jan 31 19:38:42 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_RemoteShell_proto_HeaderFile
+#define WOKUtils_RemoteShell_proto_HeaderFile
+
+#include <Handle_WOKUtils_RemoteShell.hxx>
+
+#ifdef WNT
+
+
+#include <WOKNT_Shell.hxx>
+
+#define WOKUtils_RemoteShell WOKNT_Shell
+
+
+#else
+
+#include <WOKUnix_RemoteShell.hxx>
+
+#define WOKUtils_RemoteShell WOKUnix_RemoteShell
+
+#endif
+
+
+#endif
--- /dev/null
+
+
+proc WOKUtils_Replace::AdmFileType {} {
+ return "dbadmfile";
+}
+
+proc WOKUtils_Replace::OutputDirTypeName {} {
+ return "dbtmpfile";
+}
+
+
+proc WOKUtils_Replace::HandleInputFile { ID } {
+
+ scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name
+
+ switch $name {
+ Handle_WOKUtils_RegExp.hxx {return 1;}
+ Handle_WOKUtils_Path.hxx {return 1;}
+ Handle_WOKUtils_Shell.hxx {return 1;}
+ Handle_WOKUtils_RemoteShell.hxx {return 1;}
+ WOKUtils_RegExp.hxx {return 1;}
+ WOKUtils_Path.hxx {return 1;}
+ WOKUtils_ShellManager.hxx {return 1;}
+ WOKUtils_PathIterator.hxx {return 1;}
+ WOKUtils_Shell.hxx {return 1;}
+ WOKUtils_RemoteShell.hxx {return 1;}
+ WOKUtils_Extension.hxx {return 1;}
+ WOKUtils_RESyntax.hxx {return 1;}
+ WOKUtils_Trigger.hxx {return 1;}
+ WOKUtils_Param.hxx {return 1;}
+ default {
+ return 0;
+ }
+ }
+}
+
+proc WOKUtils_Replace::Execute { unit args } {
+
+ global tcl_interactive
+
+ set tcl_interactive 1
+ package require Wokutils
+
+ msgprint -i -c "WOKUtils_Replace::Execute" "Copying of WOKUtils includes"
+
+ if { [wokparam -e %Station $unit] != "wnt" } {
+ set copycmd "cp -p "
+ set replstr "/"
+ } {
+ set copycmd "cmd /c copy"
+ set replstr "\\\\\\\\"
+ }
+
+ foreach file $args {
+ scan $file "%\[^:\]:%\[^:\]:%\[^:\]" Unit type name
+
+ regsub ".hxx" $name "_proto.hxx" sourcename
+
+ set source [woklocate -p WOKUtils:source:$sourcename [wokinfo -N $unit]]
+ set vistarget [woklocate -p WOKUtils:pubinclude:$name [wokinfo -N $unit]]
+ set target [wokinfo -p pubinclude:$name $unit]
+
+ regsub -all "/" " $source $target" $replstr TheArgs
+
+ set A [catch {eval "wokcmp $TheArgs"} result ]
+
+ if { [wokparam -e %Station $unit] == "wnt" && $result != "" } {
+ set result 0
+ }
+
+ if { ! $result } {
+ msgprint -i -c "WOKUtils_Replace::Execute" "Copy $source to $target"
+ if { [file exist $target] && [wokparam -e %Station $unit] != "wnt" } {
+ eval exec "chmod u+w $target"
+ }
+ eval exec "$copycmd $TheArgs"
+ } else {
+ msgprint -i -c "WOKUtils_Replace::Execute" "No change in $source"
+ }
+ }
+ return 0;
+}
--- /dev/null
+-- File: WOKUtils_SearchIterator.cdl
+-- Created: Tue Sep 26 17:51:00 1995
+-- Author: Jean GAUTIER
+-- <jga@cobrax>
+---Copyright: Matra Datavision 1995
+
+
+class SearchIterator from WOKUtils
+
+ ---Purpose:
+
+uses
+ SearchList from WOKUtils,
+ Path from WOKUtils,
+ HAsciiString from TCollection
+
+is
+ Create(alist : SearchList from WOKUtils; afile : HAsciiString from TCollection) returns SearchIterator from WOKUtils;
+
+ Value(me) returns Path from WOKUtils;
+
+ Next(me:out);
+
+ More(me) returns Boolean from Standard;
+
+fields
+ mylist : SearchList from WOKUtils;
+ myidx : Integer from Standard;
+ myfile : HAsciiString from TCollection;
+ myvalue : Path from WOKUtils;
+end SearchIterator;
--- /dev/null
+// File: WOKUtils_SearchIterator.cxx
+// Created: Wed Sep 27 12:05:56 1995
+// Author: Jean GAUTIER
+// <jga@cobrax>
+
+#include <WOKTools_Messages.hxx>
+
+#include <TCollection_HAsciiString.hxx>
+
+#include <OSD_KindFile.hxx>
+
+#include <OSD_File.hxx>
+#include <WOKUtils_SearchList.hxx>
+#include <WOKUtils_HSequenceOfPath.hxx>
+
+#include <WOKUtils_SearchIterator.ixx>
+
+
+//=======================================================================
+//function : WOKUtils_SearchIterator
+//purpose :
+//=======================================================================
+ WOKUtils_SearchIterator::WOKUtils_SearchIterator(const Handle(WOKUtils_SearchList)& alist, const Handle(TCollection_HAsciiString)& afile)
+{
+
+ mylist = alist;
+ myidx = 1;
+ myfile = afile;
+ Next();
+}
+
+//=======================================================================
+//function : Value
+//purpose :
+//=======================================================================
+Handle(WOKUtils_Path) WOKUtils_SearchIterator::Value() const
+{
+ return myvalue;
+}
+
+//=======================================================================
+//function : Next
+//purpose :
+//=======================================================================
+void WOKUtils_SearchIterator::Next()
+{
+
+ while(myidx <= mylist->List()->Length())
+ {
+ Handle(WOKUtils_Path) apath = mylist->List()->Value(myidx);
+ Handle(TCollection_HAsciiString) aname = apath->Name();
+ OSD_File afd(OSD_Path(aname->ToCString()));
+
+ switch(afd.KindOfFile())
+ {
+ case OSD_FILE:
+ myvalue = apath;
+ myidx++;
+ return;
+
+ case OSD_DIRECTORY:
+ {
+ Handle(WOKUtils_Path) thepath;
+
+ thepath = new WOKUtils_Path(aname, myfile);
+
+ if(thepath->Exists() == Standard_True)
+ {
+ myvalue = thepath;
+ myidx++;
+ return;
+ }
+ }
+ break;
+ default:
+ ErrorMsg << "WOKUtils_Param::Load" << "Invalid type for file : " << apath->Name() << endm;
+ }
+ myidx++;
+ }
+ myvalue = Handle(WOKUtils_Path)();
+}
+
+//=======================================================================
+//function : More
+//purpose :
+//=======================================================================
+Standard_Boolean WOKUtils_SearchIterator::More() const
+{
+ if(myvalue.IsNull() == Standard_False) return Standard_True;
+ return Standard_False;
+}
+
--- /dev/null
+-- File: WOKUtils_SearchList.cdl
+-- Created: Tue Sep 26 17:21:51 1995
+-- Author: Jean GAUTIER
+-- <jga@cobrax>
+---Copyright: Matra Datavision 1995
+
+
+class SearchList from WOKUtils
+inherits TShared from MMgt
+
+ ---Purpose:
+
+uses
+ Path from WOKUtils,
+ HAsciiString from TCollection,
+ HSequenceOfPath from WOKUtils
+is
+
+ Create returns mutable SearchList from WOKUtils;
+
+ Create(another : SearchList from WOKUtils) returns mutable SearchList from WOKUtils;
+
+ List(me) returns HSequenceOfPath from WOKUtils;
+
+ AddPriorPath(me:mutable; apath : Path from WOKUtils);
+ AddNonPriorPath(me:mutable; apath : Path from WOKUtils);
+
+ SearchFile(me:mutable; afile : HAsciiString from TCollection)
+ returns mutable Path from WOKUtils;
+
+fields
+ mylist : HSequenceOfPath from WOKUtils;
+end SearchList;
+
+
--- /dev/null
+// File: WOKUtils_SearchList.cxx
+// Created: Wed Sep 27 11:41:30 1995
+// Author: Jean GAUTIER
+// <jga@cobrax>
+
+
+#include <OSD_KindFile.hxx>
+
+#include <WOKTools_Messages.hxx>
+
+#include <OSD_File.hxx>
+
+#include <WOKUtils_SearchList.ixx>
+
+//=======================================================================
+//function : WOKUtils_SearchList
+//purpose :
+//=======================================================================
+ WOKUtils_SearchList::WOKUtils_SearchList()
+{
+ mylist = new WOKUtils_HSequenceOfPath;
+}
+
+//=======================================================================
+//function : WOKUtils_SearchList
+//purpose :
+//=======================================================================
+ WOKUtils_SearchList::WOKUtils_SearchList(const Handle(WOKUtils_SearchList)& another)
+{
+ mylist = new WOKUtils_HSequenceOfPath;
+ mylist->Append(another->List());
+}
+
+//=======================================================================
+//function : List
+//purpose :
+//=======================================================================
+Handle(WOKUtils_HSequenceOfPath) WOKUtils_SearchList::List() const
+{
+ return mylist;
+}
+
+//=======================================================================
+//function : AddPriorPath
+//purpose :
+//=======================================================================
+void WOKUtils_SearchList::AddPriorPath(const Handle(WOKUtils_Path)& apath)
+{
+ mylist->Prepend(apath);
+}
+
+//=======================================================================
+//function : AddNonPriorPath
+//purpose :
+//=======================================================================
+void WOKUtils_SearchList::AddNonPriorPath(const Handle(WOKUtils_Path)& apath)
+{
+ mylist->Append(apath);
+}
+
+//=======================================================================
+//function : SearchFile
+//purpose :
+//=======================================================================
+Handle(WOKUtils_Path) WOKUtils_SearchList::SearchFile(const Handle(TCollection_HAsciiString)& thefile)
+{
+ for(Standard_Integer index = 1; index <= mylist->Length() ; index++)
+ {
+ Handle(WOKUtils_Path) apath = mylist->Value(index);
+ Handle(TCollection_HAsciiString) aname = apath->Name();
+ OSD_File afd(OSD_Path(aname->ToCString()));
+
+ switch(afd.KindOfFile())
+ {
+ case OSD_FILE:
+ break;
+ case OSD_DIRECTORY:
+ {
+ Handle(WOKUtils_Path) thepath;
+
+ thepath = new WOKUtils_Path(aname, thefile);
+
+ if(thepath->Exists() == Standard_True)
+ {
+ return thepath;
+ }
+ }
+ break;
+ default:
+ ErrorMsg << "WOKUtils_Param::Load" << "Invalid type for file : " << aname << endm;
+ }
+
+ }
+ return Handle(WOKUtils_Path) ();
+}
+
+
--- /dev/null
+-- File: WOKUtils_Shell.cdl
+-- Created: Fri Jan 31 19:03:00 1997
+-- Author: Jean GAUTIER
+-- <jga@cobrax.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+
+class Shell from WOKUtils
+inherits TShared from MMgt
+
+ ---Purpose:
+
+is
+
+ Create returns mutable Shell from WOKUtils;
+
+end Shell;
--- /dev/null
+// File: WOKUtils_Shell.cxx
+// Created: Fri Jan 31 19:40:30 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+#ifndef _Handle_MMgt_TShared_HeaderFile
+#include <Handle_MMgt_TShared.hxx>
+#endif
+
+#ifdef WNT
+# include <WOKNT_Shell.hxx>
+# define WOKUtils_Shell WOKNT_Shell
+#else
+# include <WOKUnix_Shell.hxx>
+# define WOKUtils_Shell WOKUnix_Shell
+#endif
+
+#include <WOKUtils_Extension.hxx>
+
+class Standard_Transient;
+class Handle_Standard_Type;
+class Handle(MMgt_TShared);
+class WOKUtils_Shell;
+
+Standard_EXPORT Handle_Standard_Type& WOKUtils_Shell_Type_()
+{
+
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared);
+ if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
+ static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
+ if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
+
+
+ static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
+ static Handle_Standard_Type _aType = new Standard_Type("WOKUtils_Shell",
+ sizeof(WOKUtils_Shell),
+ 1,
+ (Standard_Address)_Ancestors,
+ (Standard_Address)NULL);
+
+ return _aType;
+}
--- /dev/null
+-- File: WOKUtils_ShellManager.cdl
+-- Created: Wed Mar 5 21:05:30 1997
+-- Author: Prestataire Pascal BABIN
+-- <pba@legox.paris1.matra-dtv.fr>
+---Copyright: Matra Datavision 1997
+
+class ShellManager from WOKUtils
+
+ ---Purpose:
+
+uses
+
+ Shell from WOKUtils,
+ RemoteShell from WOKUtils,
+ HAsciiString from TCollection,
+ AsciiString from TCollection
+
+is
+
+ GetShell(myclass)
+ ---Purpose: returns one unlocked shell of processes list
+ returns Shell from WOKUtils;
+
+ GetShell(myclass; apid : Integer from Standard)
+ ---Purpose: get a precise shell
+ returns Shell from WOKUtils;
+
+ GetRemoteShell(myclass;
+ ahost : HAsciiString from TCollection;
+ apath : AsciiString from TCollection)
+ ---Purpose: returns a host's unlocked remote shell of processes list
+ returns RemoteShell from WOKUtils;
+
+end ShellManager;
+
--- /dev/null
+// File: WOKUtils_ShellManager.cxx
+// Created: Wed Mar 5 21:06:27 1997
+// Author: Prestataire Pascal BABIN
+// <pba@legox.paris1.matra-dtv.fr>
+
+
+#include <WOKUtils_ShellManager.hxx>
--- /dev/null
+// File: WOKUtils_ShellManager.hxx
+// Created: Fri Jan 31 19:34:18 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_ShellManager_HeaderFile
+#define WOKUtils_ShellManager_HeaderFile
+
+#ifdef WNT
+
+#include <WOKNT_ShellManager.hxx>
+
+typedef WOKNT_ShellManager WOKUtils_ShellManager;
+
+#else
+
+#include <WOKUnix_ShellManager.hxx>
+
+typedef WOKUnix_ShellManager WOKUtils_ShellManager;
+
+#endif
+
+
+
+#endif
--- /dev/null
+// File: WOKUtils_Shell_proto.hxx
+// Created: Fri Jan 31 19:38:14 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_Shell_proto_HeaderFile
+#define WOKUtils_Shell_proto_HeaderFile
+
+#include <Handle_WOKUtils_Shell.hxx>
+
+#ifdef WNT
+
+#include <WOKNT_Shell.hxx>
+
+#define WOKUtils_Shell WOKNT_Shell
+
+#else
+
+#include <WOKUnix_Shell.hxx>
+
+#define WOKUtils_Shell WOKUnix_Shell
+
+#endif
+
+
+#endif
--- /dev/null
+// File: WOKUtils_SigHandler.hxx
+// Created: Wed May 24 18:35:36 1995
+// Author: Jean GAUTIER
+// <jga@cobrax>
+
+
+#ifndef WOKUtils_SigHandler_HeaderFile
+#define WOKUtils_SigHandler_HeaderFile
+
+#ifndef WNT
+
+#include <WOKUnix_SigHandler.hxx>
+
+typedef WOKUnix_SigHandler WOKUtils_SigHandler;
+
+#else
+
+#endif
+
+#endif
--- /dev/null
+// File: WOKUtils_Signal.hxx
+// Created: Fri Jan 31 19:35:33 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_Signal_HeaderFile
+#define WOKUtils_Signal_HeaderFile
+
+
+#include <WOKUtils_SigHandler.hxx>
+
+#ifndef WNT
+
+
+#include <WOKUnix_Signal.hxx>
+
+typedef WOKUnix_Signal WOKUtils_Signal;
+
+#define WOKUtils_SIGPIPE WOKUnix_SIGPIPE
+#define WOKUtils_SIGHUP WOKUnix_SIGHUP
+#define WOKUtils_SIGINT WOKUnix_SIGINT
+#define WOKUtils_SIGQUIT WOKUnix_SIGQUIT
+#define WOKUtils_SIGILL WOKUnix_SIGILL
+#define WOKUtils_SIGKILL WOKUnix_SIGKILL
+#define WOKUtils_SIGBUS WOKUnix_SIGBUS
+#define WOKUtils_SIGSEGV WOKUnix_SIGSEGV
+#define WOKUtils_SIGCHILD WOKUnix_SIGCHILD
+
+#endif
+
+#endif
--- /dev/null
+// File: WOKUtils_TimeStat.hxx
+// Created: Mon Jun 26 15:46:11 1995
+// Author: Jean GAUTIER
+// <jga@cobrax>
+
+
+#ifndef WOKUtils_TimeStat_HeaderFile
+#define WOKUtils_TimeStat_HeaderFile
+
+#include <sys/types.h>
+
+
+// time time in return of stat system call
+
+typedef time_t WOKUtils_TimeStat;
+
+
+#endif
--- /dev/null
+// File: WOKUtils_Timeval.hxx
+// Created: Tue May 9 15:24:00 1995
+// Author: Jean GAUTIER
+// <jga@cobrax>
+
+
+#ifndef WOKUtils_Timeval_HeaderFile
+#define WOKUtils_Timeval_HeaderFile
+
+#include <sys/time.h>
+
+typedef struct timeval WOKUtils_Timeval ;
+
+#endif
--- /dev/null
+-- File: WOKTools_Trigger.cdl
+-- Created: Thu Oct 26 16:28:05 1995
+-- Author: Jean GAUTIER
+-- <jga@cobrax>
+---Copyright: Matra Datavision 1995
+
+
+class Trigger from WOKUtils
+
+ ---Purpose: Allows Config of Comportement
+
+uses
+ Param from WOKUtils,
+ Path from WOKUtils,
+ TriggerHandler from WOKUtils,
+ TriggerControl from WOKUtils,
+ TriggerStatus from WOKUtils,
+ Return from WOKTools,
+ InterpFileType from WOKTools,
+ HAsciiString from TCollection
+
+is
+
+ Create
+ returns Trigger from WOKUtils;
+
+ SetTriggerHandler(myclass; ahandler : TriggerHandler from WOKUtils);
+ TriggerHandler(myclass)
+ ---C++: return &
+ returns TriggerHandler from WOKUtils;
+
+ SetName(me:out; aname : CString from Standard)
+ ---C++: return &
+ ---C++: alias operator ()
+ returns Trigger from WOKUtils;
+
+ SetName(me:out; aname : HAsciiString from TCollection)
+ ---C++: return &
+ ---C++: alias operator ()
+ returns Trigger from WOKUtils;
+
+ Name(me)
+ returns HAsciiString from TCollection;
+
+ AddFile(me:out; afile : HAsciiString from TCollection;
+ params : Param from WOKUtils;
+ type : InterpFileType from WOKTools = WOKTools_TclInterp)
+ ---C++: return &
+ ---C++: alias operator ()
+ returns Trigger from WOKUtils;
+
+ AddFile(me:out; afile : CString from Standard;
+ params : Param from WOKUtils;
+ type : InterpFileType from WOKTools = WOKTools_TclInterp)
+ ---C++: return &
+ ---C++: alias operator ()
+ returns Trigger from WOKUtils;
+
+ AddArg(me:out; anarg : HAsciiString from TCollection)
+ ---C++: return &
+ ---C++: alias operator <<
+ returns Trigger from WOKUtils;
+
+ AddArg(me:out; anarg : CString from Standard)
+ ---C++: return &
+ ---C++: alias operator <<
+ returns Trigger from WOKUtils;
+
+ AddArg(me:out; anarg : Boolean from Standard)
+ ---C++: return &
+ ---C++: alias operator <<
+ returns Trigger from WOKUtils;
+
+ AddArg(me:out; anarg : Integer from Standard)
+ ---C++: return &
+ ---C++: alias operator <<
+ returns Trigger from WOKUtils;
+
+ AddControl(me:out; anctrl : TriggerControl from WOKUtils)
+ ---C++: return &
+ ---C++: alias operator <<
+ returns Trigger from WOKUtils;
+
+ Args(me)
+ ---C++: return const &
+ returns Return from WOKTools;
+
+ Execute(me:out)
+ returns TriggerStatus from WOKUtils;
+
+ AddResult(me:out; aresult : HAsciiString from TCollection)
+ ---C++: return &
+ returns Trigger from WOKUtils;
+
+ AddResult(me:out; aresult : CString from Standard)
+ ---C++: return &
+ returns Trigger from WOKUtils;
+
+ AddResult(me:out; aresult : Boolean from Standard)
+ ---C++: return &
+ returns Trigger from WOKUtils;
+
+ AddResult(me:out; aresult : Integer from Standard)
+ ---C++: return &
+ returns Trigger from WOKUtils;
+
+ GetResult(me:out; aresult : out HAsciiString from TCollection)
+ ---C++: alias operator >>
+ ---C++: return &
+ returns Trigger from WOKUtils;
+
+ GetResult(me:out; aresult : out Boolean from Standard)
+ ---C++: return &
+ ---C++: alias operator >>
+ returns Trigger from WOKUtils;
+
+ GetResult(me:out; aresult : out Integer from Standard)
+ ---C++: return &
+ ---C++: alias operator >>
+ returns Trigger from WOKUtils;
+
+ Return(me)
+ ---C++: return const &
+ returns Return from WOKTools;
+
+ ChangeReturn(me:out)
+ ---C++: return &
+ returns Return from WOKTools;
+
+ Status(me)
+ returns TriggerStatus from WOKUtils;
+
+fields
+ myfile : Path from WOKUtils;
+ myname : HAsciiString from TCollection;
+ mytype : InterpFileType from WOKTools;
+ myargs : Return from WOKTools;
+ myrets : Return from WOKTools;
+ myidx : Integer from Standard;
+ mystat : TriggerStatus from WOKUtils;
+end Trigger;
--- /dev/null
+// File: WOKUtils_Trigger.cxx
+// Created: Fri Oct 27 18:23:27 1995
+// Author: Jean GAUTIER
+// <jga@cobrax>
+
+
+#include <Standard_RangeError.hxx>
+
+#include <WOKTools_Messages.hxx>
+#include <WOKTools_Return.hxx>
+#include <WOKTools_StringValue.hxx>
+
+#include <WOKUtils_TriggerHandler.hxx>
+
+#include <WOKUtils_Trigger.ixx>
+
+
+
+//=======================================================================
+//function : WOKUtils_Trigger
+//purpose :
+//=======================================================================
+WOKUtils_Trigger::WOKUtils_Trigger()
+ : mystat(WOKUtils_Unknown), myidx(1)
+{
+}
+
+//=======================================================================
+//function : SetTriggerHandler
+//purpose :
+//=======================================================================
+void WOKUtils_Trigger::SetTriggerHandler(const WOKUtils_TriggerHandler ahandler)
+{
+ WOKUtils_Trigger::TriggerHandler() = ahandler;
+}
+
+//=======================================================================
+//function : DefaultHandler
+//purpose :
+//=======================================================================
+WOKUtils_TriggerStatus DefaultHandler(WOKUtils_Trigger& atrigger)
+{
+ Standard_Integer i;
+
+ // Prise en compte des resultats
+
+ const WOKTools_Return& args = atrigger.Args();
+
+ for(i = 1; i <= args.Length() ; i++)
+ {
+ Handle(WOKTools_ReturnValue) avalue = args.Value(i);
+
+ switch(avalue->Type())
+ {
+ case WOKTools_String:
+ {
+ Handle(WOKTools_StringValue) astrval = Handle(WOKTools_StringValue)::DownCast(avalue);
+ InfoMsg << "DefaultHandler" << "Arg " << i << " is : " << astrval->Value() << endm;
+ }
+ break;
+ }
+ }
+ return WOKUtils_Unknown;
+}
+
+
+//=======================================================================
+//function : TriggerHandler
+//purpose :
+//=======================================================================
+WOKUtils_TriggerHandler& WOKUtils_Trigger::TriggerHandler( )
+{
+ static WOKUtils_TriggerHandler TheHandler = NULL;
+
+ if(TheHandler == NULL)
+ {
+ TheHandler = DefaultHandler;
+ return TheHandler;
+ }
+ else
+ return TheHandler;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : SetName
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::SetName(const Handle(TCollection_HAsciiString)& aname)
+{
+ myname = aname;
+ return *this;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : SetName
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::SetName(const Standard_CString aname)
+{
+ myname = new TCollection_HAsciiString(aname);
+ return *this;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AddFile
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::AddFile(const Handle(TCollection_HAsciiString)& afile,
+ const WOKUtils_Param& params,
+ const WOKTools_InterpFileType atype)
+{
+ Handle(WOKUtils_Path) apath = params.SearchFile(afile);
+
+ if(!apath.IsNull())
+ {
+ myargs.AddInterpFile(apath->Name(), atype);
+ }
+ return *this;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AddFile
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::AddFile(const Standard_CString afile,
+ const WOKUtils_Param& params,
+ const WOKTools_InterpFileType atype)
+{
+ Handle(WOKUtils_Path) apath = params.SearchFile(new TCollection_HAsciiString(afile));
+
+ if(!apath.IsNull())
+ {
+ myargs.AddInterpFile(apath->Name(), atype);
+ }
+ return *this;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AddArg
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::AddArg(const Handle(TCollection_HAsciiString)& astr)
+{
+ myargs.AddStringValue(astr);
+ return *this;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AddArg
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::AddArg(const Standard_CString astr)
+{
+ myargs.AddStringValue(astr);
+ return *this;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AddArg
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::AddArg(const Standard_Boolean abool)
+{
+ myargs.AddBooleanValue(abool);
+ return *this;
+}
+
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AddArg
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::AddArg(const Standard_Integer anint)
+{
+ myargs.AddIntegerValue(anint);
+ return *this;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AddArg
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::AddControl(const WOKUtils_TriggerControl anctrl)
+{
+ (*anctrl)(*this);
+ return *this;
+}
+
+//=======================================================================
+//function : Execute
+//purpose :
+//=======================================================================
+WOKUtils_TriggerStatus WOKUtils_Trigger::Execute()
+{
+ myidx=1;
+ if(TriggerHandler()!=NULL)
+ {
+ return (mystat = (*TriggerHandler())(*this));
+ }
+ return (mystat = WOKUtils_Unknown);
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : Addresult
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::AddResult(const Handle(TCollection_HAsciiString)& astr)
+{
+ myrets.AddStringValue(astr);
+ return *this;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AddResult
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::AddResult(const Standard_CString astr)
+{
+ myrets.AddStringValue(astr);
+ return *this;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AddResult
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::AddResult(const Standard_Boolean abool)
+{
+ myrets.AddBooleanValue(abool);
+ return *this;
+}
+
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : AddResult
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::AddResult(const Standard_Integer anint)
+{
+ myrets.AddIntegerValue(anint);
+ return *this;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : Getresult
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::GetResult(Handle(TCollection_HAsciiString)& astr)
+{
+ if(mystat != WOKUtils_Succeeded) return *this;
+
+ if(myidx>myrets.Length())
+ Standard_RangeError::Raise("WOKUtils_Trigger::GetResult : No more args");
+
+
+ Handle(WOKTools_StringValue) aret = Handle(WOKTools_StringValue)::DownCast(myrets.Value(myidx));
+
+ if(!aret.IsNull())
+ {
+ astr = aret->Value();
+ }
+ else
+ {
+ astr.Nullify();
+ }
+ myidx++;
+ return *this;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : GetResult
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::GetResult( Standard_Boolean& abool)
+{
+ if(mystat != WOKUtils_Succeeded) return *this;
+
+ if(myidx>myrets.Length())
+ Standard_RangeError::Raise("WOKUtils_Trigger::GetResult : No more args");
+
+ Handle(WOKTools_StringValue) aret = Handle(WOKTools_StringValue)::DownCast(myrets.Value(myidx));
+
+ if(!aret.IsNull())
+ {
+ Handle(TCollection_HAsciiString) astr;
+ astr = aret->Value();
+
+ if(astr->Value(1) == '0')
+ {
+ abool = Standard_False;
+ }
+ else if(astr->Value(1) == '1')
+ {
+ abool = Standard_True;
+ }
+ else
+ {
+ abool = Standard_False;
+ }
+ }
+ else
+ {
+ abool = Standard_False;
+ }
+ myidx++;
+ return *this;
+}
+
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : GetResult
+//purpose :
+//=======================================================================
+WOKUtils_Trigger& WOKUtils_Trigger::GetResult( Standard_Integer& anint)
+{
+ if(mystat != WOKUtils_Succeeded) return *this;
+
+ if(myidx>myrets.Length())
+ Standard_RangeError::Raise("WOKUtils_Trigger::GetResult : No more args");
+
+ Handle(WOKTools_StringValue) aret = Handle(WOKTools_StringValue)::DownCast(myrets.Value(myidx));
+
+ if(!aret.IsNull())
+ {
+ Handle(TCollection_HAsciiString) astr;
+ astr = aret->Value();
+
+ if(astr->IsIntegerValue())
+ {
+ anint = astr->IntegerValue();
+ }
+ else
+ {
+ anint = 0;
+ }
+ }
+ else
+ {
+ anint = 0;
+ }
+ myidx++;
+ return *this;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : Name
+//purpose :
+//=======================================================================
+Handle(TCollection_HAsciiString) WOKUtils_Trigger::Name() const
+{
+ return myname;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : Return
+//purpose :
+//=======================================================================
+const WOKTools_Return& WOKUtils_Trigger::Return() const
+{
+ return myrets;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : ChangeReturn
+//purpose :
+//=======================================================================
+WOKTools_Return& WOKUtils_Trigger::ChangeReturn()
+{
+ return myrets;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : Args
+//purpose :
+//=======================================================================
+const WOKTools_Return& WOKUtils_Trigger::Args() const
+{
+ return myargs;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : Status
+//purpose :
+//=======================================================================
+WOKUtils_TriggerStatus WOKUtils_Trigger::Status() const
+{
+ return mystat;
+}
+
+//=======================================================================
+//Author : Jean Gautier (jga)
+//function : endt
+//purpose :
+//=======================================================================
+Standard_EXPORT WOKUtils_Trigger& endt(WOKUtils_Trigger& trigger)
+{
+ trigger.Execute();
+ return trigger;
+}
+
--- /dev/null
+// File: WOKTools_TriggerAction.hxx
+// Created: Fri Oct 27 19:21:33 1995
+// Author: Jean GAUTIER
+// <jga@cobrax>
+
+
+#ifndef WOKTools_TriggerAction_HeaderFile
+#define WOKTools_TriggerAction_HeaderFile
+
+#include <WOKTools_Trigger.hxx>
+
+extern TriggerAction;
+
+#endif
--- /dev/null
+// File: WOKUtils_TriggerControl.hxx
+// Created: Thu Nov 14 14:39:02 1996
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_TriggerControl_HeaderFile
+#define WOKUtils_TriggerControl_HeaderFile
+
+
+
+class WOKUtils_Trigger;
+
+#include <Standard_Type.hxx>
+
+const Handle(Standard_Type)& STANDARD_TYPE(WOKUtils_TriggerControl);
+
+typedef WOKUtils_Trigger& (*WOKUtils_TriggerControl)(WOKUtils_Trigger &);
+
+
+#endif
--- /dev/null
+// File: WOKUtils_TriggerHandler.hxx
+// Created: Fri Oct 27 19:13:11 1995
+// Author: Jean GAUTIER
+// <jga@cobrax>
+
+
+#ifndef WOKUtils_TriggerHandler_HeaderFile
+#define WOKUtils_TriggerHandler_HeaderFile
+
+#include <Standard_Type.hxx>
+
+#include <TCollection_HAsciiString.hxx>
+
+#include <WOKTools_Return.hxx>
+
+#include <WOKUtils_TriggerStatus.hxx>
+
+class WOKUtils_Trigger;
+
+typedef WOKUtils_TriggerStatus (*WOKUtils_TriggerHandler)(WOKUtils_Trigger& );
+
+#endif
--- /dev/null
+// File modified by JGA for Visual C++ 5.0 support
+
+#ifndef _WOKUtils_Trigger_HeaderFile
+#define _WOKUtils_Trigger_HeaderFile
+
+#include <Handle_WOKUtils_Path.hxx>
+#include <Handle_TCollection_HAsciiString.hxx>
+#include <WOKTools_InterpFileType.hxx>
+#include <WOKTools_Return.hxx>
+#include <Standard_Integer.hxx>
+#include <WOKUtils_TriggerStatus.hxx>
+#include <WOKUtils_TriggerHandler.hxx>
+#include <Standard_CString.hxx>
+#include <Standard_Boolean.hxx>
+#include <WOKUtils_TriggerControl.hxx>
+class WOKUtils_Path;
+class TCollection_HAsciiString;
+class WOKUtils_Param;
+class WOKTools_Return;
+
+
+#include <Standard_Macro.hxx>
+
+class WOKUtils_Trigger {
+
+public:
+
+ // Methods PUBLIC
+ //
+ Standard_EXPORT WOKUtils_Trigger();
+ Standard_EXPORT static void SetTriggerHandler(const WOKUtils_TriggerHandler ahandler) ;
+ Standard_EXPORT static WOKUtils_TriggerHandler& TriggerHandler() ;
+ Standard_EXPORT WOKUtils_Trigger& SetName(const Standard_CString aname) ;
+ WOKUtils_Trigger& operator ()(const Standard_CString aname)
+ {
+ return SetName(aname);
+ }
+
+ Standard_EXPORT WOKUtils_Trigger& SetName(const Handle(TCollection_HAsciiString)& aname) ;
+ WOKUtils_Trigger& operator ()(const Handle(TCollection_HAsciiString)& aname)
+ {
+ return SetName(aname);
+ }
+
+ Standard_EXPORT Handle_TCollection_HAsciiString Name() const;
+ Standard_EXPORT WOKUtils_Trigger& AddFile(const Handle(TCollection_HAsciiString)& afile,const WOKUtils_Param& params,const WOKTools_InterpFileType type = WOKTools_TclInterp) ;
+ WOKUtils_Trigger& operator ()(const Handle(TCollection_HAsciiString)& afile,const WOKUtils_Param& params,const WOKTools_InterpFileType type)
+ {
+ return AddFile(afile,params,type);
+ }
+
+ Standard_EXPORT WOKUtils_Trigger& AddFile(const Standard_CString afile,const WOKUtils_Param& params,const WOKTools_InterpFileType type = WOKTools_TclInterp) ;
+ WOKUtils_Trigger& operator ()(const Standard_CString afile,const WOKUtils_Param& params,const WOKTools_InterpFileType type)
+ {
+ return AddFile(afile,params,type);
+ }
+
+ Standard_EXPORT WOKUtils_Trigger& AddArg(const Handle(TCollection_HAsciiString)& anarg) ;
+ WOKUtils_Trigger& operator <<(const Handle(TCollection_HAsciiString)& anarg)
+ {
+ return AddArg(anarg);
+ }
+
+ Standard_EXPORT WOKUtils_Trigger& AddArg(const Standard_CString anarg) ;
+ WOKUtils_Trigger& operator <<(const Standard_CString anarg)
+ {
+ return AddArg(anarg);
+ }
+
+ Standard_EXPORT WOKUtils_Trigger& AddArg(const Standard_Boolean anarg) ;
+ WOKUtils_Trigger& operator <<(const Standard_Boolean anarg)
+ {
+ return AddArg(anarg);
+ }
+
+ Standard_EXPORT WOKUtils_Trigger& AddArg(const Standard_Integer anarg) ;
+ WOKUtils_Trigger& operator <<(const Standard_Integer anarg)
+ {
+ return AddArg(anarg);
+ }
+
+ Standard_EXPORT WOKUtils_Trigger& AddControl(const WOKUtils_TriggerControl anctrl) ;
+ WOKUtils_Trigger& operator <<(const WOKUtils_TriggerControl anctrl)
+ {
+ return AddControl(anctrl);
+ }
+
+ Standard_EXPORT const WOKTools_Return& Args() const;
+ Standard_EXPORT WOKUtils_TriggerStatus Execute() ;
+ Standard_EXPORT WOKUtils_Trigger& AddResult(const Handle(TCollection_HAsciiString)& aresult) ;
+ Standard_EXPORT WOKUtils_Trigger& AddResult(const Standard_CString aresult) ;
+ Standard_EXPORT WOKUtils_Trigger& AddResult(const Standard_Boolean aresult) ;
+ Standard_EXPORT WOKUtils_Trigger& AddResult(const Standard_Integer aresult) ;
+ Standard_EXPORT WOKUtils_Trigger& GetResult(Handle(TCollection_HAsciiString)& aresult) ;
+ WOKUtils_Trigger& operator >>(Handle(TCollection_HAsciiString)& aresult)
+ {
+ return GetResult(aresult);
+ }
+
+ Standard_EXPORT WOKUtils_Trigger& GetResult(Standard_Boolean& aresult) ;
+ WOKUtils_Trigger& operator >>(Standard_Boolean& aresult)
+ {
+ return GetResult(aresult);
+ }
+
+ Standard_EXPORT WOKUtils_Trigger& GetResult(Standard_Integer& aresult) ;
+ WOKUtils_Trigger& operator >>(Standard_Integer& aresult)
+ {
+ return GetResult(aresult);
+ }
+
+ Standard_EXPORT const WOKTools_Return& Return() const;
+ Standard_EXPORT WOKTools_Return& ChangeReturn() ;
+ Standard_EXPORT WOKUtils_TriggerStatus Status() const;
+
+private:
+
+ // Fields PRIVATE
+ //
+ Handle_WOKUtils_Path myfile;
+ Handle_TCollection_HAsciiString myname;
+ WOKTools_InterpFileType mytype;
+ WOKTools_Return myargs;
+ WOKTools_Return myrets;
+ Standard_Integer myidx;
+ WOKUtils_TriggerStatus mystat;
+
+
+};
+
+#endif
--- /dev/null
+// File: WOKUtils_Triggers.hxx
+// Created: Thu Nov 14 14:48:10 1996
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_Triggers_HeaderFile
+#define WOKUtils_Triggers_HeaderFile
+
+#include <WOKUtils_Trigger.hxx>
+
+#ifndef __WOKUTILS_API
+# ifdef WNT
+# ifdef __WOKUtils_DLL
+# define __WOKUTILS_API __declspec( dllexport )
+# else
+# define __WOKUTILS_API __declspec( dllimport )
+# endif // __WOKUtils_DLL
+# else
+# define __WOKUTILS_API
+# endif // WNT
+#endif // __WOKUTILS_API
+
+__WOKUTILS_API WOKUtils_Trigger& endt(WOKUtils_Trigger&);
+
+#endif
--- /dev/null
+-- File: WOKUtils_WOKSteps.edl
+-- Author: Jean GAUTIER
+-- History: Tue Aug 12 17:12:59 1997 Jean GAUTIER Creation
+-- Copyright: Matra Datavision 1997
+
+@ifnotdefined ( %WOKUtils_WOKSteps_EDL) then
+@set %WOKUtils_WOKSteps_EDL = "";
+
+
+@string %WOKSteps_XcppGroup += "xcpp.repl";
+@set %WOKSteps_xcpp_repl = "*WOKUtils_Replace(xcpp.header)";
+
+@endif;
--- /dev/null
+// File: WOKUtils_WOKVersion.hxx
+// Created: Thu Feb 13 17:16:41 1997
+// Author: Jean GAUTIER
+// <jga@cobrax.paris1.matra-dtv.fr>
+
+
+#ifndef WOKUtils_WOKVersion_HeaderFile
+#define WOKUtils_WOKVersion_HeaderFile
+
+#define WOK_VERSION "2.0"
+
+#endif