File: TFunction_Iterator.hxx

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (108 lines) | stat: -rw-r--r-- 3,246 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _TFunction_Iterator_HeaderFile
#define _TFunction_Iterator_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>

#include <TDF_LabelList.hxx>
#include <Standard_Boolean.hxx>
#include <TDF_LabelMap.hxx>
#include <Handle_TFunction_Scope.hxx>
#include <Standard_Integer.hxx>
#include <TFunction_ExecutionStatus.hxx>
#include <Standard_OStream.hxx>
class TFunction_Scope;
class TDF_Label;
class TDF_LabelList;


//! Iterator of the graph of functions
class TFunction_Iterator 
{
public:

  DEFINE_STANDARD_ALLOC

  
  //! An empty constructor.
  Standard_EXPORT TFunction_Iterator();
  
  //! A constructor.
  //! Initializes the iterator.
  Standard_EXPORT TFunction_Iterator(const TDF_Label& Access);
  
  //! Initializes the Iterator.
  Standard_EXPORT virtual   void Init (const TDF_Label& Access) ;
  
  //! Defines the mode of iteration - usage or not of the execution status.
  //! If the iterator takes into account the execution status,
  //! the method ::Current() returns only "not executed" functions
  //! while their status is not changed.
  //! If the iterator ignores the execution status,
  //! the method ::Current() returns the functions
  //! following their dependencies and ignoring the execution status.
  Standard_EXPORT   void SetUsageOfExecutionStatus (const Standard_Boolean usage) ;
  
  //! Returns usage of execution status by the iterator.
  Standard_EXPORT   Standard_Boolean GetUsageOfExecutionStatus()  const;
  
  //! Analyses the graph of dependencies and returns
  //! maximum number of threads may be used to calculate the model.
  Standard_EXPORT virtual   Standard_Integer GetMaxNbThreads()  const;
  
  //! Returns the current list of functions.
  //! If the iterator uses the execution status,
  //! the returned list contains only the functions
  //! with "not executed" status.
  Standard_EXPORT virtual  const  TDF_LabelList& Current()  const;
  
  //! Returns false if the graph of functions is fully iterated.
  Standard_EXPORT virtual   Standard_Boolean More()  const;
  
  //! Switches the iterator to the next list of current functions.
  Standard_EXPORT virtual   void Next() ;
  
  //! A help-function aimed to help the user to check the status of retrurned function.
  //! It calls TFunction_GraphNode::GetStatus() inside.
  Standard_EXPORT   TFunction_ExecutionStatus GetStatus (const TDF_Label& func)  const;
  
  //! A help-function aimed to help the user to change the execution status of a function.
  //! It calls TFunction_GraphNode::SetStatus() inside.
  Standard_EXPORT   void SetStatus (const TDF_Label& func, const TFunction_ExecutionStatus status)  const;
  
  Standard_EXPORT   Standard_OStream& Dump (Standard_OStream& OS)  const;




protected:





private:



  TDF_LabelList myCurrent;
  Standard_Boolean myUsageOfExecutionStatus;
  TDF_LabelMap myPassedFunctions;
  Handle(TFunction_Scope) myScope;


};







#endif // _TFunction_Iterator_HeaderFile