// File generated by CPPExt (Transient)
//
//
//                     Copyright (C) 1991 - 2000 by  
//                      Matra Datavision SA.  All rights reserved.
//  
//                     Copyright (C) 2001 - 2004 by
//                     Open CASCADE SA.  All rights reserved.
// 
// This file is part of the Open CASCADE Technology software.
//
// This software may be distributed and/or modified under the terms and
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
// and appearing in the file LICENSE included in the packaging of this file.
//  
// This software is distributed on an "AS IS" basis, without warranty of any
// kind, and Open CASCADE SA hereby disclaims all such warranties,
// including without limitation, any warranties of merchantability, fitness
// for a particular purpose or non-infringement. Please see the License for
// the specific terms and conditions governing rights and limitations under the
// License.

#ifndef _WOKMake_Step_HeaderFile
#define _WOKMake_Step_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Handle_WOKMake_Step_HeaderFile
#include <Handle_WOKMake_Step.hxx>
#endif

#ifndef _Handle_WOKernel_DevUnit_HeaderFile
#include <Handle_WOKernel_DevUnit.hxx>
#endif
#ifndef _Handle_TCollection_HAsciiString_HeaderFile
#include <Handle_TCollection_HAsciiString.hxx>
#endif
#ifndef _WOKMake_BuildProcessPtr_HeaderFile
#include <WOKMake_BuildProcessPtr.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _WOKMake_IndexedDataMapOfHAsciiStringOfInputFile_HeaderFile
#include <WOKMake_IndexedDataMapOfHAsciiStringOfInputFile.hxx>
#endif
#ifndef _Handle_WOKMake_HSequenceOfInputFile_HeaderFile
#include <Handle_WOKMake_HSequenceOfInputFile.hxx>
#endif
#ifndef _WOKMake_IndexedMapOfDepItem_HeaderFile
#include <WOKMake_IndexedMapOfDepItem.hxx>
#endif
#ifndef _Handle_TColStd_HArray2OfInteger_HeaderFile
#include <Handle_TColStd_HArray2OfInteger.hxx>
#endif
#ifndef _WOKMake_IndexedDataMapOfHAsciiStringOfOutputFile_HeaderFile
#include <WOKMake_IndexedDataMapOfHAsciiStringOfOutputFile.hxx>
#endif
#ifndef _Handle_WOKMake_HSequenceOfOutputFile_HeaderFile
#include <Handle_WOKMake_HSequenceOfOutputFile.hxx>
#endif
#ifndef _Handle_TColStd_HSequenceOfHAsciiString_HeaderFile
#include <Handle_TColStd_HSequenceOfHAsciiString.hxx>
#endif
#ifndef _WOKMake_Status_HeaderFile
#include <WOKMake_Status.hxx>
#endif
#ifndef _Handle_WOKMake_HSequenceOfStepOption_HeaderFile
#include <Handle_WOKMake_HSequenceOfStepOption.hxx>
#endif
#ifndef _Handle_WOKUtils_Path_HeaderFile
#include <Handle_WOKUtils_Path.hxx>
#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
#ifndef _Handle_WOKMake_BuildProcess_HeaderFile
#include <Handle_WOKMake_BuildProcess.hxx>
#endif
#ifndef _Handle_WOKBuilder_Entity_HeaderFile
#include <Handle_WOKBuilder_Entity.hxx>
#endif
#ifndef _Handle_WOKernel_File_HeaderFile
#include <Handle_WOKernel_File.hxx>
#endif
#ifndef _Handle_WOKMake_InputFile_HeaderFile
#include <Handle_WOKMake_InputFile.hxx>
#endif
#ifndef _WOKMake_FileStatus_HeaderFile
#include <WOKMake_FileStatus.hxx>
#endif
#ifndef _Handle_WOKMake_StepFile_HeaderFile
#include <Handle_WOKMake_StepFile.hxx>
#endif
#ifndef _Handle_WOKernel_Locator_HeaderFile
#include <Handle_WOKernel_Locator.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _Handle_WOKMake_OutputFile_HeaderFile
#include <Handle_WOKMake_OutputFile.hxx>
#endif
#ifndef _Handle_WOKUtils_Shell_HeaderFile
#include <Handle_WOKUtils_Shell.hxx>
#endif
#ifndef _Handle_WOKernel_UnitGraph_HeaderFile
#include <Handle_WOKernel_UnitGraph.hxx>
#endif
class WOKernel_DevUnit;
class TCollection_HAsciiString;
class WOKMake_HSequenceOfInputFile;
class TColStd_HArray2OfInteger;
class WOKMake_HSequenceOfOutputFile;
class TColStd_HSequenceOfHAsciiString;
class WOKMake_HSequenceOfStepOption;
class WOKUtils_Path;
class Standard_ProgramError;
class WOKMake_StepBuilder;
class WOKMake_BuildProcess;
class WOKBuilder_Entity;
class WOKernel_File;
class WOKMake_InputFile;
class WOKMake_StepFile;
class WOKernel_Locator;
class WOKMake_OutputFile;
class WOKUtils_Shell;
class WOKernel_UnitGraph;


//! Base class for umake Process <br>
class WOKMake_Step : public MMgt_TShared {

public:
 // Methods PUBLIC
 // 


Standard_EXPORT   void GetInputFromStep(const Handle(WOKMake_Step)& astep) ;


Standard_EXPORT  const Handle_WOKMake_HSequenceOfInputFile& InputFileList() ;

//! Add an execution item in sequence <br>
Standard_EXPORT   void AddExecDepItem(const Handle(WOKMake_InputFile)& input,const Handle(WOKMake_OutputFile)& output,const Standard_Boolean adirectflag) ;

//! Computes dependances <br>
//!          Decides if perform is needed. <br>
//!          Performs Step on needed entities <br>
//!          returns status <br>
Standard_EXPORT virtual  WOKMake_Status Make() ;


Standard_EXPORT   Handle_WOKMake_HSequenceOfOutputFile OutputFileList() const;

//! Handles Output file new/same/disappereread <br>
Standard_EXPORT virtual  Standard_Boolean HandleOutputFile(const Handle(WOKMake_OutputFile)& anfile) ;

 const Handle_WOKernel_DevUnit& Unit() const;


Standard_EXPORT static  Handle_TCollection_HAsciiString StepOutputID(const Handle(TCollection_HAsciiString)& aname,const Handle(TCollection_HAsciiString)& acode) ;


Standard_EXPORT static  Handle_TCollection_HAsciiString StepOutputID(const Handle(TCollection_HAsciiString)& aname,const Handle(TCollection_HAsciiString)& acode,const Handle(TCollection_HAsciiString)& asubcode) ;


Standard_EXPORT   Handle_TCollection_HAsciiString StepOutputID() const;


Standard_EXPORT virtual  Handle_TCollection_HAsciiString InputFilesFileName() const;


Standard_EXPORT virtual  Handle_TCollection_HAsciiString DepItemsFileName() const;


Standard_EXPORT virtual  Handle_TCollection_HAsciiString OutputFilesFileName() const;


Standard_EXPORT virtual  Handle_TCollection_HAsciiString LogFileName() const;


Standard_EXPORT virtual  Handle_WOKernel_File AdmFile(const Handle(TCollection_HAsciiString)& aname) const;


Standard_EXPORT   Handle_WOKernel_File LocateAdmFile(const Handle(WOKernel_Locator)& alocator,const Handle(TCollection_HAsciiString)& aname) const;


Standard_EXPORT static  Handle_TCollection_HAsciiString UniqueName(const Handle(WOKernel_DevUnit)& aunit,const Handle(TCollection_HAsciiString)& acode,const Handle(TCollection_HAsciiString)& asubcode) ;


Standard_EXPORT static  void SplitUniqueName(const Handle(TCollection_HAsciiString)& anid,Handle(TCollection_HAsciiString)& auname,Handle(TCollection_HAsciiString)& acode,Handle(TCollection_HAsciiString)& asubcode) ;


Standard_EXPORT  const Handle_TCollection_HAsciiString& UniqueName() ;


Standard_EXPORT   Handle_TCollection_HAsciiString Code() const;


Standard_EXPORT   Handle_TCollection_HAsciiString SubCode() const;


Standard_EXPORT   Standard_Boolean IsHidden() const;


Standard_EXPORT   Standard_Boolean IsChecked() const;


Standard_EXPORT   void SetUptodate() ;


Standard_EXPORT   void SetSucceeded() ;


Standard_EXPORT   void SetIncomplete() ;


Standard_EXPORT   void SetFailed() ;


Standard_EXPORT   void SetUnprocessed() ;


Standard_EXPORT   void SetStatus(const WOKMake_Status astatus) ;


Standard_EXPORT   WOKMake_Status Status() const;

//! return true if  step has that  code or if step is sub <br>
//!          of thet code <br>
Standard_EXPORT   Standard_Boolean IsOrIsSubStepOf(const Handle(TCollection_HAsciiString)& acode) const;

 const Handle_WOKUtils_Shell& Shell() const;

 const Handle_WOKernel_UnitGraph& UnitGraph() const;

 const Handle_WOKernel_Locator& Locator() const;


Standard_EXPORT virtual  Handle_WOKernel_Locator InLocator() const;


Standard_EXPORT virtual  Handle_WOKernel_Locator OutLocator() const;


Standard_EXPORT   void SetOutputDir(const Handle(WOKUtils_Path)& adir) ;


Standard_EXPORT   Handle_WOKUtils_Path OutputDir() ;


Standard_EXPORT   Standard_Boolean IsDBMSDependent() const;


Standard_EXPORT   Standard_Boolean IsStationDependent() const;


Standard_EXPORT   void SetOptions(const Handle(WOKMake_HSequenceOfStepOption)& options) ;


Standard_EXPORT   Handle_WOKMake_HSequenceOfStepOption Options() const;


Standard_EXPORT   void SetTargets(const Handle(TColStd_HSequenceOfHAsciiString)& targets) ;


Standard_EXPORT   Handle_TColStd_HSequenceOfHAsciiString Targets() const;


Standard_EXPORT   Handle_TColStd_HSequenceOfHAsciiString PrecedenceSteps() const;


Standard_EXPORT   void SetPrecedenceSteps(const Handle(TColStd_HSequenceOfHAsciiString)& steps) ;


Standard_EXPORT   Standard_Boolean IsToExecute() const;


Standard_EXPORT   void DoExecute() ;


Standard_EXPORT   void DontExecute() ;
//Standard_EXPORT ~WOKMake_Step();


friend class WOKMake_StepBuilder;
friend class WOKMake_BuildProcess;


 // Type management
 //
 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
 //Standard_EXPORT Standard_Boolean	       IsKind(const Handle(Standard_Type)&) const;

protected:

 // Methods PROTECTED
 // 


Standard_EXPORT WOKMake_Step(const Handle(WOKMake_BuildProcess)& aprocess,const Handle(WOKernel_DevUnit)& aunit,const Handle(TCollection_HAsciiString)& acode,const Standard_Boolean checked,const Standard_Boolean hidden);


Standard_EXPORT virtual  Handle_WOKBuilder_Entity BuilderEntity(const Handle(WOKernel_File)& afile) const;


Standard_EXPORT virtual  Handle_WOKBuilder_Entity BuilderEntity(const Handle(WOKUtils_Path)& apath) const;

//! 1 - Adds File In list if file is an input of step <br>
//!          2 - Sets Build Flag if file is a candidate to construction <br>
Standard_EXPORT virtual  Standard_Boolean HandleInputFile(const Handle(WOKMake_InputFile)& anitem)  = 0;

//! Computes Entity list involved in step preforming <br>
//!          in the InputFlow list. <br>
Standard_EXPORT virtual  void GetInputFlow() ;


Standard_EXPORT virtual  void LoadDependencies() ;

//! Set Build flag to OutOfDate entities <br>
//!          Clears Build flag to Uptodate Entities <br>
//!          This base implementation does nothing <br>
Standard_EXPORT virtual  Handle_WOKMake_HSequenceOfInputFile OutOfDateEntities() ;


Standard_EXPORT virtual  Handle_WOKMake_HSequenceOfInputFile HandleTargets() ;

//! Force construction of step <br>
Standard_EXPORT virtual  Handle_WOKMake_HSequenceOfInputFile ForceBuild() ;


Standard_EXPORT virtual  void CompleteExecList(const Handle(WOKMake_HSequenceOfInputFile)& alist) ;


Standard_EXPORT virtual  Handle_WOKMake_HSequenceOfInputFile ExecutionInputList() ;


Standard_EXPORT   Standard_Boolean CheckStatus(const Standard_CString acontext) const;


Standard_EXPORT virtual  void AcquitExecution(const Handle(WOKMake_HSequenceOfInputFile)& execlist) ;


Standard_EXPORT virtual  void Init() ;


Standard_EXPORT virtual  void Terminate() ;

  Handle_WOKMake_BuildProcess BuildProcess() const;


Standard_EXPORT virtual  Handle_TCollection_HAsciiString AdmFileType() const = 0;


Standard_EXPORT virtual  Handle_TCollection_HAsciiString OutputDirTypeName() const = 0;


 // Fields PROTECTED
 //
WOKMake_IndexedDataMapOfHAsciiStringOfInputFile myinflow;
WOKMake_IndexedDataMapOfHAsciiStringOfInputFile mydepin;
WOKMake_IndexedMapOfDepItem mydepitems;
Handle_TColStd_HArray2OfInteger mydepmatrix;
WOKMake_IndexedDataMapOfHAsciiStringOfOutputFile mydepout;
WOKMake_IndexedDataMapOfHAsciiStringOfOutputFile myoutflow;


private: 

 // Methods PRIVATE
 // 


Standard_EXPORT   WOKMake_FileStatus StepFileStatus(const Handle(WOKMake_StepFile)& afile,const Handle(WOKernel_Locator)& alocator) ;

//! Executes step <br>
//!          Computes output files <br>
Standard_EXPORT virtual  void Execute(const Handle(WOKMake_HSequenceOfInputFile)& execlist)  = 0;


Standard_EXPORT   void SetSubCode(const Handle(TCollection_HAsciiString)& acode) ;


 // Fields PRIVATE
 //
Handle_WOKernel_DevUnit myunit;
Handle_TCollection_HAsciiString myunique;
Handle_TCollection_HAsciiString mycode;
Handle_TCollection_HAsciiString mysubcode;
WOKMake_BuildProcessPtr myprocess;
Standard_Boolean myinputcomp;
Handle_WOKMake_HSequenceOfInputFile myinput;
Standard_Boolean mydeploaded;
WOKMake_IndexedMapOfDepItem myitems;
Handle_WOKMake_HSequenceOfOutputFile myoutput;
Handle_TColStd_HSequenceOfHAsciiString myprecsteps;
WOKMake_Status mystatus;
Standard_Boolean mycheck;
Standard_Boolean myhidden;
Standard_Boolean myexecflag;
Handle_TColStd_HSequenceOfHAsciiString mytargets;
Handle_WOKMake_HSequenceOfStepOption myoptions;
Handle_WOKUtils_Path myoutputdir;


};


#include <WOKMake_Step.lxx>



// other Inline functions and methods (like "C++: function call" methods)
//


#endif
