|
||||
File indexing completed on 2025-01-18 10:05:21
0001 // Created on: 2008-01-22 0002 // Created by: Vladislav ROMASHKO 0003 // Copyright (c) 2008-2014 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _TFunction_Iterator_HeaderFile 0017 #define _TFunction_Iterator_HeaderFile 0018 0019 #include <Standard.hxx> 0020 #include <Standard_DefineAlloc.hxx> 0021 #include <Standard_Handle.hxx> 0022 0023 #include <TDF_LabelList.hxx> 0024 #include <TDF_LabelMap.hxx> 0025 #include <Standard_Integer.hxx> 0026 #include <TFunction_ExecutionStatus.hxx> 0027 #include <Standard_OStream.hxx> 0028 class TFunction_Scope; 0029 class TDF_Label; 0030 0031 0032 //! Iterator of the graph of functions 0033 class TFunction_Iterator 0034 { 0035 public: 0036 0037 DEFINE_STANDARD_ALLOC 0038 0039 0040 //! An empty constructor. 0041 Standard_EXPORT TFunction_Iterator(); 0042 0043 //! A constructor. 0044 //! Initializes the iterator. 0045 Standard_EXPORT TFunction_Iterator(const TDF_Label& Access); 0046 0047 //! Initializes the Iterator. 0048 Standard_EXPORT virtual void Init (const TDF_Label& Access); 0049 0050 //! Defines the mode of iteration - usage or not of the execution status. 0051 //! If the iterator takes into account the execution status, 0052 //! the method ::Current() returns only "not executed" functions 0053 //! while their status is not changed. 0054 //! If the iterator ignores the execution status, 0055 //! the method ::Current() returns the functions 0056 //! following their dependencies and ignoring the execution status. 0057 Standard_EXPORT void SetUsageOfExecutionStatus (const Standard_Boolean usage); 0058 0059 //! Returns usage of execution status by the iterator. 0060 Standard_EXPORT Standard_Boolean GetUsageOfExecutionStatus() const; 0061 0062 //! Analyses the graph of dependencies and returns 0063 //! maximum number of threads may be used to calculate the model. 0064 Standard_EXPORT virtual Standard_Integer GetMaxNbThreads() const; 0065 0066 //! Returns the current list of functions. 0067 //! If the iterator uses the execution status, 0068 //! the returned list contains only the functions 0069 //! with "not executed" status. 0070 Standard_EXPORT virtual const TDF_LabelList& Current() const; 0071 0072 //! Returns false if the graph of functions is fully iterated. 0073 Standard_EXPORT virtual Standard_Boolean More() const; 0074 0075 //! Switches the iterator to the next list of current functions. 0076 Standard_EXPORT virtual void Next(); 0077 0078 //! A help-function aimed to help the user to check the status of retrurned function. 0079 //! It calls TFunction_GraphNode::GetStatus() inside. 0080 Standard_EXPORT TFunction_ExecutionStatus GetStatus (const TDF_Label& func) const; 0081 0082 //! A help-function aimed to help the user to change the execution status of a function. 0083 //! It calls TFunction_GraphNode::SetStatus() inside. 0084 Standard_EXPORT void SetStatus (const TDF_Label& func, const TFunction_ExecutionStatus status) const; 0085 0086 Standard_EXPORT Standard_OStream& Dump (Standard_OStream& OS) const; 0087 0088 0089 0090 0091 protected: 0092 0093 0094 0095 0096 0097 private: 0098 0099 0100 0101 TDF_LabelList myCurrent; 0102 Standard_Boolean myUsageOfExecutionStatus; 0103 TDF_LabelMap myPassedFunctions; 0104 Handle(TFunction_Scope) myScope; 0105 0106 0107 }; 0108 0109 0110 0111 0112 0113 0114 0115 #endif // _TFunction_Iterator_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |