973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
973c2be1 |
5 | // This library is free software; you can redistribute it and / or modify it |
6 | // under the terms of the GNU Lesser General Public version 2.1 as published |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | #include <PDataXtd_Constraint.ixx> |
15 | |
16 | |
17 | |
c24d4017 |
18 | PDataXtd_Constraint::PDataXtd_Constraint () : |
19 | myType(0), |
20 | myIsReversed(Standard_False), |
21 | myIsInverted(Standard_False), |
22 | myIsVerified(Standard_False) |
23 | { } |
7fd59977 |
24 | |
25 | PDataXtd_Constraint::PDataXtd_Constraint(const Standard_Integer Type, |
26 | const Handle(PDF_HAttributeArray1)& Geometries, |
27 | const Handle(PDataStd_Real)& Value, |
28 | const Handle(PNaming_NamedShape)& Plane) |
29 | |
30 | : myType (Type), myGeometries (Geometries), myValue (Value), myIsReversed(Standard_False), |
31 | myIsInverted(Standard_False), |
32 | myIsVerified(Standard_True), |
33 | myPlane(Plane) |
34 | {} |
35 | |
36 | Handle(PDataStd_Real) PDataXtd_Constraint::GetValue() const |
37 | { return myValue; } |
38 | |
39 | Standard_Integer PDataXtd_Constraint::GetType() const |
40 | { return myType; } |
41 | |
42 | Handle(PDF_HAttributeArray1) PDataXtd_Constraint::GetGeometries() const |
43 | { return myGeometries; } |
44 | |
45 | Handle(PNaming_NamedShape) PDataXtd_Constraint::GetPlane() const |
46 | { return myPlane;} |
47 | |
48 | void PDataXtd_Constraint::SetPlane(const Handle(PNaming_NamedShape)& plane) |
49 | { myPlane = plane;} |
50 | |
51 | void PDataXtd_Constraint::Set(const Handle(PDataStd_Real)& V) |
52 | { myValue = V; } |
53 | |
54 | void PDataXtd_Constraint::SetType(const Standard_Integer Type) |
55 | { myType = Type; } |
56 | |
57 | void PDataXtd_Constraint::SetGeometries(const Handle(PDF_HAttributeArray1)& Geometries) |
58 | { myGeometries = Geometries; } |
59 | |
60 | //======================================================================= |
61 | //function : Verified |
62 | //purpose : |
63 | //======================================================================= |
64 | void PDataXtd_Constraint::Verified(const Standard_Boolean status) |
65 | { |
66 | myIsVerified = status; |
67 | } |
68 | |
69 | //======================================================================= |
70 | //function : Verified |
71 | //purpose : |
72 | //======================================================================= |
73 | Standard_Boolean PDataXtd_Constraint::Verified() const |
74 | { |
75 | return myIsVerified; |
76 | } |
77 | |
78 | //======================================================================= |
79 | //function : Reversed |
80 | //purpose : |
81 | //======================================================================= |
82 | void PDataXtd_Constraint::Reversed(const Standard_Boolean status) |
83 | { |
84 | myIsReversed = status; |
85 | } |
86 | |
87 | //======================================================================= |
88 | //function : Reversed |
89 | //purpose : |
90 | //======================================================================= |
91 | Standard_Boolean PDataXtd_Constraint::Reversed() const |
92 | { |
93 | return myIsReversed; |
94 | } |
95 | |
96 | //======================================================================= |
97 | //function : Inverted |
98 | //purpose : |
99 | //======================================================================= |
100 | void PDataXtd_Constraint::Inverted(const Standard_Boolean status) |
101 | { |
102 | myIsInverted = status; |
103 | } |
104 | |
105 | //======================================================================= |
106 | //function : Inverted |
107 | //purpose : |
108 | //======================================================================= |
109 | Standard_Boolean PDataXtd_Constraint::Inverted() const |
110 | { |
111 | return myIsInverted; |
112 | } |