Skip to content

Commit 88585b2

Browse files
committed
Refactor deprecated methods across multiple headers
- Marked several methods as deprecated in the following files: - XCAFDoc_VisMaterial.hxx - Poly_PolygonOnTriangulation.hxx - Poly_Triangulation.hxx - NCollection_Map.hxx - Standard_Atomic.hxx - Standard_Handle.hxx - ShapeAnalysis_ShapeContents.hxx - OpenGl_Context.hxx - OpenGl_FrameBuffer.hxx - OpenGl_Texture.hxx - Font_FTFont.hxx - Font_TextFormatter.hxx - Graphic3d_AspectFillArea3d.hxx - Graphic3d_Aspects.hxx - Graphic3d_MaterialAspect.hxx - Graphic3d_Structure.hxx - AIS_InteractiveContext.hxx - Prs3d_Drawer.hxx - PrsMgr_Presentation.hxx - Select3D_SensitiveCircle.hxx - SelectBasics_SelectingVolumeManager.hxx - SelectMgr_EntityOwner.hxx - V3d_View.hxx - V3d_Viewer.hxx - Updated comments to indicate alternative methods to use instead.
1 parent 70ddf9c commit 88585b2

24 files changed

Lines changed: 0 additions & 112 deletions

src/DataExchange/TKXCAF/XCAFDoc/XCAFDoc_VisMaterial.hxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,13 @@ public:
132132
Standard_EXPORT void SetFaceCulling(Graphic3d_TypeOfBackfacingModel theFaceCulling);
133133

134134
Standard_DEPRECATED("Deprecated method, FaceCulling() should be used instead")
135-
136135
Standard_Boolean IsDoubleSided() const
137136
{
138137
return myFaceCulling == Graphic3d_TypeOfBackfacingModel_DoubleSided;
139138
}
140139

141140
Standard_DEPRECATED("Deprecated method, SetFaceCulling() should be used "
142141
"instead")
143-
144142
void SetDoubleSided(Standard_Boolean theIsDoubleSided)
145143
{
146144
SetFaceCulling(theIsDoubleSided ? Graphic3d_TypeOfBackfacingModel_DoubleSided

src/FoundationClasses/TKMath/Poly/Poly_PolygonOnTriangulation.hxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,9 @@ public:
127127
const Handle(TColStd_HArray1OfReal)& Parameters() const { return myParameters; }
128128

129129
Standard_DEPRECATED("Deprecated method, SetNode() should be used instead")
130-
131130
TColStd_Array1OfInteger& ChangeNodes() { return myNodes; }
132131

133132
Standard_DEPRECATED("Deprecated method, SetParameter() should be used instead")
134-
135133
TColStd_Array1OfReal& ChangeParameters() { return myParameters->ChangeArray1(); }
136134

137135
private:

src/FoundationClasses/TKMath/Poly/Poly_Triangulation.hxx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,15 +335,12 @@ public:
335335
Standard_EXPORT void SetNormals(const Handle(TShort_HArray1OfShortReal)& theNormals);
336336

337337
Standard_DEPRECATED("Deprecated method, Triangle() should be used instead")
338-
339338
const Poly_Array1OfTriangle& Triangles() const { return myTriangles; }
340339

341340
Standard_DEPRECATED("Deprecated method, SetTriangle() should be used instead")
342-
343341
Poly_Array1OfTriangle& ChangeTriangles() { return myTriangles; }
344342

345343
Standard_DEPRECATED("Deprecated method, SetTriangle() should be used instead")
346-
347344
Poly_Triangle& ChangeTriangle(const Standard_Integer theIndex)
348345
{
349346
return myTriangles.ChangeValue(theIndex);

src/FoundationClasses/TKernel/NCollection/NCollection_Map.hxx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ public:
363363
//! if they contain exactly the same keys.
364364
Standard_DEPRECATED("This method will be removed right after 7.9. release. Use methods from "
365365
"NCollection_MapAlgo.hxx instead.")
366-
367366
Standard_Boolean IsEqual(const NCollection_Map& theOther) const
368367
{
369368
return NCollection_MapAlgo::IsEqual<NCollection_Map>(*this, theOther);
@@ -373,7 +372,6 @@ public:
373372
//! This function checks if this map contains all keys of another map.
374373
Standard_DEPRECATED("This method will be removed right after 7.9. release. Use methods from "
375374
"NCollection_MapAlgo.hxx instead.")
376-
377375
Standard_Boolean Contains(const NCollection_Map& theOther) const
378376
{
379377
return NCollection_MapAlgo::Contains<NCollection_Map>(*this, theOther);
@@ -385,7 +383,6 @@ public:
385383
//! (result of the boolean operation) can also be passed as one of operands.
386384
Standard_DEPRECATED("This method will be removed right after 7.9. release. Use methods from "
387385
"NCollection_MapAlgo.hxx instead.")
388-
389386
void Union(const NCollection_Map& theLeft, const NCollection_Map& theRight)
390387
{
391388
NCollection_MapAlgo::Union<NCollection_Map>(*this, theLeft, theRight);
@@ -397,7 +394,6 @@ public:
397394
//! True if contents of this map is changed.
398395
Standard_DEPRECATED("This method will be removed right after 7.9. release. Use methods from "
399396
"NCollection_MapAlgo.hxx instead.")
400-
401397
Standard_Boolean Unite(const NCollection_Map& theOther)
402398
{
403399
return NCollection_MapAlgo::Unite<NCollection_Map>(*this, theOther);
@@ -406,7 +402,6 @@ public:
406402
//! Returns true if this and theMap have common elements.
407403
Standard_DEPRECATED("This method will be removed right after 7.9. release. Use methods from "
408404
"NCollection_MapAlgo.hxx instead.")
409-
410405
Standard_Boolean HasIntersection(const NCollection_Map& theMap) const
411406
{
412407
return NCollection_MapAlgo::HasIntersection<NCollection_Map>(*this, theMap);
@@ -418,7 +413,6 @@ public:
418413
//! boolean operation) can also be used as one of operands.
419414
Standard_DEPRECATED("This method will be removed right after 7.9. release. Use methods from "
420415
"NCollection_MapAlgo.hxx instead.")
421-
422416
void Intersection(const NCollection_Map& theLeft, const NCollection_Map& theRight)
423417
{
424418
NCollection_MapAlgo::Intersection<NCollection_Map>(*this, theLeft, theRight);
@@ -430,7 +424,6 @@ public:
430424
//! of this map is changed.
431425
Standard_DEPRECATED("This method will be removed right after 7.9. release. Use methods from "
432426
"NCollection_MapAlgo.hxx instead.")
433-
434427
Standard_Boolean Intersect(const NCollection_Map& theOther)
435428
{
436429
return NCollection_MapAlgo::Intersect<NCollection_Map>(*this, theOther);
@@ -442,7 +435,6 @@ public:
442435
//! one. All previous content of this Map is cleared.
443436
Standard_DEPRECATED("This method will be removed right after 7.9. release. Use methods from "
444437
"NCollection_MapAlgo.hxx instead.")
445-
446438
void Subtraction(const NCollection_Map& theLeft, const NCollection_Map& theRight)
447439
{
448440
NCollection_MapAlgo::Subtraction<NCollection_Map>(*this, theLeft, theRight);
@@ -455,7 +447,6 @@ public:
455447
//! Returns True if contents of this map is changed.
456448
Standard_DEPRECATED("This method will be removed right after 7.9. release. Use methods from "
457449
"NCollection_MapAlgo.hxx instead.")
458-
459450
Standard_Boolean Subtract(const NCollection_Map& theOther)
460451
{
461452
return NCollection_MapAlgo::Subtract<NCollection_Map>(*this, theOther);
@@ -467,7 +458,6 @@ public:
467458
//! cleared. This map (result of the boolean operation) can also be used as one of operands.
468459
Standard_DEPRECATED("This method will be removed right after 7.9. release. Use methods from "
469460
"NCollection_MapAlgo.hxx instead.")
470-
471461
void Difference(const NCollection_Map& theLeft, const NCollection_Map& theRight)
472462
{
473463
NCollection_MapAlgo::Difference<NCollection_Map>(*this, theLeft, theRight);
@@ -479,7 +469,6 @@ public:
479469
//! True if contents of this map is changed.
480470
Standard_DEPRECATED("This method will be removed right after 7.9. release. Use methods from "
481471
"NCollection_MapAlgo.hxx instead.")
482-
483472
Standard_Boolean Differ(const NCollection_Map& theOther)
484473
{
485474
return NCollection_MapAlgo::Differ<NCollection_Map>(*this, theOther);

src/FoundationClasses/TKernel/Standard/Standard_Atomic.hxx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,18 @@ inline bool Standard_Atomic_CompareAndSwap(volatile int* theValue,
6363
// enforced.
6464

6565
Standard_DEPRECATED("Standard_Atomic_Increment will be removed in OCCT 8.0.0")
66-
6766
int Standard_Atomic_Increment(volatile int* theValue)
6867
{
6968
return __sync_add_and_fetch(theValue, 1);
7069
}
7170

7271
Standard_DEPRECATED("Standard_Atomic_Decrement will be removed in OCCT 8.0.0")
73-
7472
int Standard_Atomic_Decrement(volatile int* theValue)
7573
{
7674
return __sync_sub_and_fetch(theValue, 1);
7775
}
7876

7977
Standard_DEPRECATED("Standard_Atomic_CompareAndSwap will be removed in OCCT 8.0.0")
80-
8178
bool Standard_Atomic_CompareAndSwap(volatile int* theValue, int theOldValue, int theNewValue)
8279
{
8380
return __sync_val_compare_and_swap(theValue, theOldValue, theNewValue) == theOldValue;
@@ -102,21 +99,18 @@ extern "C"
10299
// Note that we safely cast int* to long*, as they have same size and endian-ness
103100

104101
Standard_DEPRECATED("Standard_Atomic_Increment will be removed in OCCT 8.0.0")
105-
106102
int Standard_Atomic_Increment(volatile int* theValue)
107103
{
108104
return _InterlockedIncrement(reinterpret_cast<volatile long*>(theValue));
109105
}
110106

111107
Standard_DEPRECATED("Standard_Atomic_Decrement will be removed in OCCT 8.0.0")
112-
113108
int Standard_Atomic_Decrement(volatile int* theValue)
114109
{
115110
return _InterlockedDecrement(reinterpret_cast<volatile long*>(theValue));
116111
}
117112

118113
Standard_DEPRECATED("Standard_Atomic_CompareAndSwap will be removed in OCCT 8.0.0")
119-
120114
bool Standard_Atomic_CompareAndSwap(volatile int* theValue, int theOldValue, int theNewValue)
121115
{
122116
return _InterlockedCompareExchange(reinterpret_cast<volatile long*>(theValue),
@@ -131,21 +125,18 @@ bool Standard_Atomic_CompareAndSwap(volatile int* theValue, int theOldValue, int
131125
#include <libkern/OSAtomic.h>
132126

133127
Standard_DEPRECATED("Standard_Atomic_Increment will be removed in OCCT 8.0.0")
134-
135128
int Standard_Atomic_Increment(volatile int* theValue)
136129
{
137130
return OSAtomicIncrement32Barrier(theValue);
138131
}
139132

140133
Standard_DEPRECATED("Standard_Atomic_Decrement will be removed in OCCT 8.0.0")
141-
142134
int Standard_Atomic_Decrement(volatile int* theValue)
143135
{
144136
return OSAtomicDecrement32Barrier(theValue);
145137
}
146138

147139
Standard_DEPRECATED("Standard_Atomic_CompareAndSwap will be removed in OCCT 8.0.0")
148-
149140
bool Standard_Atomic_CompareAndSwap(volatile int* theValue, int theOldValue, int theNewValue)
150141
{
151142
return OSAtomicCompareAndSwapInt(theOldValue, theNewValue, theValue);
@@ -161,21 +152,18 @@ bool Standard_Atomic_CompareAndSwap(volatile int* theValue, int theOldValue, int
161152
#include <sys/atomics.h>
162153

163154
Standard_DEPRECATED("Standard_Atomic_Increment will be removed in OCCT 8.0.0")
164-
165155
int Standard_Atomic_Increment(volatile int* theValue)
166156
{
167157
return __atomic_inc(theValue) + 1; // analog of __sync_fetch_and_add
168158
}
169159

170160
Standard_DEPRECATED("Standard_Atomic_Decrement will be removed in OCCT 8.0.0")
171-
172161
int Standard_Atomic_Decrement(volatile int* theValue)
173162
{
174163
return __atomic_dec(theValue) - 1; // analog of __sync_fetch_and_sub
175164
}
176165

177166
Standard_DEPRECATED("Standard_Atomic_CompareAndSwap will be removed in OCCT 8.0.0")
178-
179167
bool Standard_Atomic_CompareAndSwap(volatile int* theValue, int theOldValue, int theNewValue)
180168
{
181169
return __atomic_cmpxchg(theOldValue, theNewValue, theValue) == 0;
@@ -187,21 +175,18 @@ bool Standard_Atomic_CompareAndSwap(volatile int* theValue, int theOldValue, int
187175
#error "Atomic operation isn't implemented for current platform!"
188176
#endif
189177
Standard_DEPRECATED("Standard_Atomic_Increment will be removed in OCCT 8.0.0")
190-
191178
int Standard_Atomic_Increment(volatile int* theValue)
192179
{
193180
return ++(*theValue);
194181
}
195182

196183
Standard_DEPRECATED("Standard_Atomic_Decrement will be removed in OCCT 8.0.0")
197-
198184
int Standard_Atomic_Decrement(volatile int* theValue)
199185
{
200186
return --(*theValue);
201187
}
202188

203189
Standard_DEPRECATED("Standard_Atomic_CompareAndSwap will be removed in OCCT 8.0.0")
204-
205190
bool Standard_Atomic_CompareAndSwap(volatile int* theValue, int theOldValue, int theNewValue)
206191
{
207192
if (*theValue == theOldValue)

src/FoundationClasses/TKernel/Standard/Standard_Handle.hxx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ public:
189189
//! For compatibility, define down casting operator from non-base type, as deprecated
190190
template <class T2>
191191
Standard_DEPRECATED("down-casting from object of the same or unrelated type is meaningless")
192-
193192
static handle DownCast(
194193
const handle<T2>& theObject,
195194
typename opencascade::std::enable_if<!is_base_but_not_same<T2, T>::value, void*>::type = 0)
@@ -200,7 +199,6 @@ public:
200199
//! For compatibility, define down casting operator from non-base type, as deprecated
201200
template <class T2>
202201
Standard_DEPRECATED("down-casting from object of the same or unrelated type is meaningless")
203-
204202
static handle DownCast(
205203
const T2* thePtr,
206204
typename opencascade::std::enable_if<!is_base_but_not_same<T2, T>::value, void*>::type = 0)
@@ -350,7 +348,6 @@ public:
350348
template <class T2>
351349
Standard_DEPRECATED("Passing non-const reference to handle of base type in function is unsafe; "
352350
"use variable of exact type")
353-
354351
operator handle<T2>&()
355352
{
356353
// error "type is not a member of enable_if" will be generated if T2 is not sub-type of T

src/ModelingAlgorithms/TKShHealing/ShapeAnalysis/ShapeAnalysis_ShapeContents.hxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ public:
146146

147147
public:
148148
Standard_DEPRECATED("ModifyOffsetSurfaceMode() should be used instead")
149-
150149
Standard_Boolean& ModifyOffestSurfaceMode() { return myOffsetSurfaceMode; }
151150

152151
private:

src/Visualization/TKOpenGl/OpenGl/OpenGl_Context.hxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,6 @@ public: //! @name methods to alter or retrieve current state
851851

852852
//! Bind specified texture set to current context taking into account active GLSL program.
853853
Standard_DEPRECATED("BindTextures() with explicit GLSL program should be used instead")
854-
855854
Handle(OpenGl_TextureSet) BindTextures(const Handle(OpenGl_TextureSet)& theTextures)
856855
{
857856
return BindTextures(theTextures, myActiveProgram);

src/Visualization/TKOpenGl/OpenGl/OpenGl_FrameBuffer.hxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ public:
282282

283283
//! Initialize FBO for rendering into single/multiple color buffer and depth textures.
284284
Standard_DEPRECATED("Obsolete method, use Init() taking Graphic3d_Vec2i")
285-
286285
bool Init(const Handle(OpenGl_Context)& theGlCtx,
287286
const Standard_Integer theSizeX,
288287
const Standard_Integer theSizeY,
@@ -299,7 +298,6 @@ public:
299298

300299
//! Initialize FBO for rendering into textures.
301300
Standard_DEPRECATED("Obsolete method, use Init() taking Graphic3d_Vec2i")
302-
303301
bool Init(const Handle(OpenGl_Context)& theGlCtx,
304302
const Standard_Integer theSizeX,
305303
const Standard_Integer theSizeY,
@@ -316,7 +314,6 @@ public:
316314

317315
//! Initialize FBO for rendering into single/multiple color buffer and depth textures.
318316
Standard_DEPRECATED("Obsolete method, use Init() taking Graphic3d_Vec2i")
319-
320317
bool Init(const Handle(OpenGl_Context)& theGlCtx,
321318
const Standard_Integer theSizeX,
322319
const Standard_Integer theSizeY,
@@ -333,7 +330,6 @@ public:
333330

334331
//! (Re-)initialize FBO with specified dimensions.
335332
Standard_DEPRECATED("Obsolete method, use InitLazy() taking Graphic3d_Vec2i")
336-
337333
bool InitLazy(const Handle(OpenGl_Context)& theGlCtx,
338334
const Standard_Integer theViewportSizeX,
339335
const Standard_Integer theViewportSizeY,
@@ -350,7 +346,6 @@ public:
350346

351347
//! (Re-)initialize FBO with specified dimensions.
352348
Standard_DEPRECATED("Obsolete method, use InitLazy() taking Graphic3d_Vec2i")
353-
354349
bool InitLazy(const Handle(OpenGl_Context)& theGlCtx,
355350
const Standard_Integer theViewportSizeX,
356351
const Standard_Integer theViewportSizeY,
@@ -369,7 +364,6 @@ public:
369364
//! The Render Buffer Objects will be used for Color, Depth and Stencil attachments (as opposite
370365
//! to textures).
371366
Standard_DEPRECATED("Obsolete method, use InitWithRB() taking Graphic3d_Vec2i")
372-
373367
bool InitWithRB(const Handle(OpenGl_Context)& theGlCtx,
374368
const Standard_Integer theSizeX,
375369
const Standard_Integer theSizeY,

src/Visualization/TKOpenGl/OpenGl/OpenGl_Texture.hxx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ public:
259259

260260
Standard_DEPRECATED("Deprecated method, OpenGl_TextureFormat should be passed instead of "
261261
"separate parameters")
262-
263262
bool Init(const Handle(OpenGl_Context)& theCtx,
264263
const Standard_Integer theTextFormat,
265264
const unsigned int thePixelFormat,
@@ -278,7 +277,6 @@ public:
278277

279278
Standard_DEPRECATED("Deprecated method, theIsColorMap parameter should be explicitly "
280279
"specified")
281-
282280
bool Init(const Handle(OpenGl_Context)& theCtx,
283281
const Image_PixMap& theImage,
284282
const Graphic3d_TypeOfTexture theType)
@@ -288,7 +286,6 @@ public:
288286

289287
Standard_DEPRECATED("Deprecated method, OpenGl_TextureFormat should be passed instead of "
290288
"separate parameters")
291-
292289
bool Init3D(const Handle(OpenGl_Context)& theCtx,
293290
const Standard_Integer theTextFormat,
294291
const unsigned int thePixelFormat,

0 commit comments

Comments
 (0)