0024275: Cppcheck warnings on uninitialized class members
[occt.git] / src / PBRep / PBRep_TEdge1.cxx
CommitLineData
b311480e 1// Created on: 1993-07-26
2// Created by: Remi LEQUETTE
3// Copyright (c) 1993-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
7fd59977 21
22
23#include <PBRep_TEdge1.ixx>
24
25// Enum terms are better than statics who must be intialized.
26enum {
27 PBRep_ParameterMask = 1,
28 PBRep_RangeMask = 2,
29 PBRep_DegeneratedMask = 4
30};
31
32//=======================================================================
33//function : PBRep_TEdge1
34//purpose :
35//=======================================================================
36
c24d4017 37PBRep_TEdge1::PBRep_TEdge1() :
38 myTolerance(0.),
39 myFlags(0)
7fd59977 40{
41}
42
43//=======================================================================
44//function : Tolerance
45//purpose :
46//=======================================================================
47
48Standard_Real PBRep_TEdge1::Tolerance()const
49{
50 return myTolerance;
51}
52
53
54//=======================================================================
55//function : Tolerance
56//purpose :
57//=======================================================================
58
59void PBRep_TEdge1::Tolerance(const Standard_Real T)
60{
61 myTolerance = T;
62}
63
64
65//=======================================================================
66//function : SameParameter
67//purpose :
68//=======================================================================
69
70Standard_Boolean PBRep_TEdge1::SameParameter()const
71{
72 return myFlags & PBRep_ParameterMask;
73}
74
75
76//=======================================================================
77//function : SameParameter
78//purpose :
79//=======================================================================
80
81void PBRep_TEdge1::SameParameter(const Standard_Boolean S)
82{
83 if (S) myFlags |= PBRep_ParameterMask;
84 else myFlags &= ~PBRep_ParameterMask;
85}
86
87
88//=======================================================================
89//function : SameRange
90//purpose :
91//=======================================================================
92
93 Standard_Boolean PBRep_TEdge1::SameRange()const
94{
95 return myFlags & PBRep_RangeMask;
96}
97
98
99//=======================================================================
100//function : SameRange
101//purpose :
102//=======================================================================
103
104 void PBRep_TEdge1::SameRange(const Standard_Boolean S)
105{
106 if (S) myFlags |= PBRep_RangeMask;
107 else myFlags &= ~PBRep_RangeMask;
108}
109
110//=======================================================================
111//function : Degenerated
112//purpose :
113//=======================================================================
114
115Standard_Boolean PBRep_TEdge1::Degenerated()const
116{
117 return myFlags & PBRep_DegeneratedMask;
118}
119
120
121//=======================================================================
122//function : Degenerated
123//purpose :
124//=======================================================================
125
126void PBRep_TEdge1::Degenerated(const Standard_Boolean S)
127{
128 if (S) myFlags |= PBRep_DegeneratedMask;
129 else myFlags &= ~PBRep_DegeneratedMask;
130}
131
132
133//=======================================================================
134//function : Curves
135//purpose :
136//=======================================================================
137
138Handle(PBRep_CurveRepresentation) PBRep_TEdge1::Curves()const
139{
140 return myCurves;
141}
142
143
144//=======================================================================
145//function : Curves
146//purpose :
147//=======================================================================
148
149void PBRep_TEdge1::Curves(const Handle(PBRep_CurveRepresentation)& C)
150{
151 myCurves = C;
152}
153
154