0024157: Parallelization of assembly part of BO
[occt.git] / src / TFunction / TFunction_Driver.cxx
1 // Created on: 1999-06-11
2 // Created by: Vladislav ROMASHKO
3 // Copyright (c) 1999-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
5 //
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
10 //
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 //
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
20
21
22
23 #include <TFunction_Driver.ixx>
24
25 #include <TDF_Label.hxx>
26 #include <TDF_ListIteratorOfLabelList.hxx>
27
28
29 //=======================================================================
30 //function : TFunction_Driver
31 //purpose  : Constructor
32 //=======================================================================
33
34 TFunction_Driver::TFunction_Driver()
35 {
36
37 }
38
39
40 //=======================================================================
41 //function : Init
42 //purpose  : Initialization
43 //=======================================================================
44
45 void TFunction_Driver::Init(const TDF_Label& L)
46 {
47   myLabel = L;
48 }
49
50
51 //=======================================================================
52 //function : Validate
53 //purpose  : Validates labels of a function
54 //=======================================================================
55
56 void TFunction_Driver::Validate(TFunction_Logbook& log) const
57 {
58   TDF_LabelList res;
59   Results(res);
60   TDF_ListIteratorOfLabelList itr(res);
61   for (; itr.More(); itr.Next())
62   {
63     log.SetValid(itr.Value(), Standard_True);
64   }
65 }
66
67
68 //=======================================================================
69 //function : MustExecute
70 //purpose  : Analyzes the labels in the logbook
71 //=======================================================================
72
73 Standard_Boolean TFunction_Driver::MustExecute(const TFunction_Logbook& log) const
74 {
75   // Check modification of arguments.
76   TDF_LabelList args;
77   Arguments(args);
78   TDF_ListIteratorOfLabelList itr(args);
79   for (; itr.More(); itr.Next())
80   {
81     if (log.IsModified(itr.Value()))
82       return Standard_True;
83   }
84   return Standard_False;
85 }
86
87
88 //=======================================================================
89 //function : Arguments
90 //purpose  : The method fills-in the list by labels, 
91 //           where the arguments of the function are located.
92 //=======================================================================
93
94 void TFunction_Driver::Arguments(TDF_LabelList& ) const
95 {
96
97 }
98
99
100 //=======================================================================
101 //function : Results
102 //purpose  : The method fills-in the list by labels,
103 //           where the results of the function are located.
104 //=======================================================================
105
106 void TFunction_Driver::Results(TDF_LabelList& ) const
107 {
108
109 }