0030686: Visualization, SelectMgr_ViewerSelector - sorting issues of transformation...
[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-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17
18 #include <Standard_Type.hxx>
19 #include <TDF_Label.hxx>
20 #include <TDF_ListIteratorOfLabelList.hxx>
21 #include <TFunction_Driver.hxx>
22 #include <TFunction_Logbook.hxx>
23
24 IMPLEMENT_STANDARD_RTTIEXT(TFunction_Driver,Standard_Transient)
25
26 //=======================================================================
27 //function : TFunction_Driver
28 //purpose  : Constructor
29 //=======================================================================
30 TFunction_Driver::TFunction_Driver()
31 {
32
33 }
34
35
36 //=======================================================================
37 //function : Init
38 //purpose  : Initialization
39 //=======================================================================
40
41 void TFunction_Driver::Init(const TDF_Label& L)
42 {
43   myLabel = L;
44 }
45
46
47 //=======================================================================
48 //function : Validate
49 //purpose  : Validates labels of a function
50 //=======================================================================
51
52 void TFunction_Driver::Validate(Handle(TFunction_Logbook)& log) const
53 {
54   TDF_LabelList res;
55   Results(res);
56
57   TDF_ListIteratorOfLabelList itr(res);
58   for (; itr.More(); itr.Next())
59   {
60     log->SetValid(itr.Value(), Standard_True);
61   }
62 }
63
64
65 //=======================================================================
66 //function : MustExecute
67 //purpose  : Analyzes the labels in the logbook
68 //=======================================================================
69
70 Standard_Boolean TFunction_Driver::MustExecute(const Handle(TFunction_Logbook)& log) const
71 {
72   // Check modification of arguments.
73   TDF_LabelList args;
74   Arguments(args);
75
76   TDF_ListIteratorOfLabelList itr(args);
77   for (; itr.More(); itr.Next())
78   {
79     if (log->IsModified(itr.Value()))
80       return Standard_True;
81   }
82   return Standard_False;
83 }
84
85
86 //=======================================================================
87 //function : Arguments
88 //purpose  : The method fills-in the list by labels, 
89 //           where the arguments of the function are located.
90 //=======================================================================
91
92 void TFunction_Driver::Arguments(TDF_LabelList& ) const
93 {
94
95 }
96
97
98 //=======================================================================
99 //function : Results
100 //purpose  : The method fills-in the list by labels,
101 //           where the results of the function are located.
102 //=======================================================================
103
104 void TFunction_Driver::Results(TDF_LabelList& ) const
105 {
106
107 }