1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0024805: Eliminate unused static functions and methods: ShallowDump(), ShallowCopy(), STANDARD_TYPE(...)

Implementation of global functions STANDARD_TYPE() for types not inheriting Standard_Transient or Standard_Persistent are eliminated.

Global functions and class methods ShallowCopy() are removed; also removed unused classes Visual3d_PickPath and Visual3d_PickDescriptor.

Global functions and class methods ShallowDump() are removed, except for classes Standard_GUID, TopLoc_Datum, and TopLoc_Location as the latter are still used in some Debug printouts.
This commit is contained in:
abv
2014-04-11 13:59:41 +04:00
committed by apn
parent c5751993f2
commit 2cb4424136
143 changed files with 16 additions and 2825 deletions

View File

@@ -149,7 +149,6 @@ is
---Purpose: Definition of the order of selection
-- TOO_TOPFIRST the root structure first
-- TOO_BOTTOMFIRST the leaf structure first
-- Allows exploration of a PickPath in a PickDescriptor.
---Category: The enumerations
enumeration TypeOfProjection is TOP_PERSPECTIVE,
@@ -228,19 +227,6 @@ is
-- Only the number of active sources is limited.
---Category: The classes
class PickDescriptor;
---Purpose: A PickDescriptor contains information on the picks.
-- It contains a certain number of PickPaths.
---Category: The classes
class PickPath;
---Purpose: A PickPath is a vector ( elem_num, pick_id, struct_id ).
-- It is one of the constituents of a PickDescriptor.
-- There are many Pickpaths in a PickDescriptor.
-- Each PickPath describes a structure or an sub-structure.
-- The pick-id is set by the SetPickId method from Group.
---Category: The classes
class View;
---Purpose: Creation and editing of a view in a 3D visualiser.
--
@@ -282,15 +268,6 @@ is
imported NListOfLayerItem;
class SequenceOfPickPath instantiates
Sequence from TCollection (PickPath from Visual3d);
---Category: Instantiated classes
class HSequenceOfPickPath instantiates
HSequence from TCollection
(PickPath from Visual3d, SequenceOfPickPath);
---Category: Instantiated classes
class SetOfLight instantiates
Set from TCollection (Light from Visual3d);
---Category: Instantiated classes

View File

@@ -1,145 +0,0 @@
-- Created on: 1991-11-21
-- Created by: NW,JPB,CAL
-- Copyright (c) 1991-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class PickDescriptor from Visual3d
---Version:
---Purpose: This class contains the pick information.
-- It contains a certain number of PickPaths.
---Keywords: Pick Descriptor, Path, Structure, PickId
---Warning:
---References:
uses
Structure from Graphic3d,
ContextPick from Visual3d,
PickPath from Visual3d,
HSequenceOfPickPath from Visual3d
raises
PickError from Visual3d
is
Create ( CTX : ContextPick from Visual3d )
returns PickDescriptor from Visual3d;
---Level: Public
---Purpose: Creates a PickDescriptor <me>.
---------------------------------------------------
-- Category: Methods to modify the class definition
---------------------------------------------------
AddPickPath ( me : in out;
APickPath : PickPath from Visual3d )
is static;
---Level: Public
---Purpose: Adds a PickPath to PickDescriptor <me>.
---Category: Methods to modify the class definition
Clear ( me : in out )
is static;
---Level: Public
---Purpose: Erases all the information in <me>.
---Category: Methods to modify the class definition
----------------------------
-- Category: Inquire methods
----------------------------
Depth ( me )
returns Integer from Standard
is static;
---Level: Public
---Purpose: Returns the pick depth, that is the
-- number of PickPaths available in the PickDescriptor.
---Category: Inquire methods
PickPath ( me )
returns HSequenceOfPickPath from Visual3d
is static;
---Level: Internal
---Purpose: Returns the group of PickPaths of <me>.
---Category: Inquire methods
TopStructure ( me )
returns Structure from Graphic3d
---Level: Public
---Purpose: Returns the root structure.
-- If the pick order was of the type TOO_TOPFIRST
-- then it's the first structure.
-- If the pick order was of the type TOO_BOTTOMFIRST
-- Then it's the last structure.
-- The pick order is set by the method SetOrder
-- from ContextPick.
-- Category: Inquire methods
-- Warning: Raises PickError if Depth == 0 (no picked structure).
raises PickError from Visual3d is static;
TopPickId ( me )
returns Integer from Standard
---Level: Public
---Purpose: Returns the root structure pickid.
-- If the pick order was of the type TOO_TOPFIRST
-- then it's the first pickid.
-- If the pick order was of the type TOO_BOTTOMFIRST
-- then it's the last pickid.
-- The pick order is set by the method SetOrder
-- from ContextPick.
-- Category: Inquire methods
-- Warning: Raises PickError if Depth == 0 (no picked structure).
raises PickError from Visual3d is static;
TopElementNumber ( me )
returns Integer from Standard
---Level: Public
---Purpose: Returns the root structure element number.
-- If the pick order was of the type TOO_TOPFIRST
-- then it's the first element number.
-- If the pick order was of the type TOO_BOTTOMFIRST
-- then it's the last element number.
-- The pick order is set by the method SetOrder
-- from ContextPick.
-- Category: Inquire methods
-- Warning: Raises PickError if Depth == 0 (no picked structure).
raises PickError from Visual3d is static;
--
fields
--
-- Class : Visual3d_PickDescriptor
--
-- Purpose : Declaration of variables specific to the class
-- describing a pick.
--
-- Reminders : A pick return is defined by:
-- - a sequence of (Elem_number, Pick_Id, Struct_Id)
-- - a depth
-- pick sequence
MyPickPathSequence : HSequenceOfPickPath from Visual3d;
-- context associated to a pick
MyContext : ContextPick from Visual3d;
end PickDescriptor;

View File

@@ -1,156 +0,0 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//-Version
//-Design Declaration of variables specific to the class
// describing marking.
//-Warning A return of marking is defined by :
// - sequence of (Elem_Num, Pick_Id, Structure)
// - depth
//-References
//-Language C++ 2.0
//-Declarations
// for the class
#include <Visual3d_PickDescriptor.ixx>
//-Aliases
//-Global data definitions
// -- sequence reperee
// MyPickPathSequence : HSequenceOfPickPath;
// -- contexte picking de reperage associe
// MyContext : ContextPick;
//-Constructors
//-Destructors
//-Methods, in order
Visual3d_PickDescriptor::Visual3d_PickDescriptor (const Visual3d_ContextPick& CTXP):
MyContext (CTXP) {
MyPickPathSequence = new Visual3d_HSequenceOfPickPath ();
}
void Visual3d_PickDescriptor::AddPickPath (const Visual3d_PickPath& APickPath) {
if (MyContext.Depth () > MyPickPathSequence->Length ())
MyPickPathSequence->Append (APickPath);
}
void Visual3d_PickDescriptor::Clear () {
MyPickPathSequence->Clear ();
}
Standard_Integer Visual3d_PickDescriptor::Depth () const {
return (MyPickPathSequence->Length ());
}
Handle(Graphic3d_Structure) Visual3d_PickDescriptor::TopStructure () const {
Visual3d_PickPath Result;
if (MyPickPathSequence->IsEmpty ())
Visual3d_PickError::Raise ("PickDescriptor empty");
switch (MyContext.Order ()) {
case Visual3d_TOO_TOPFIRST :
// MyPickPathSequence->First returns the first
// PickPath found in the sequence.
Result = MyPickPathSequence->Sequence().First ();
break;
case Visual3d_TOO_BOTTOMFIRST :
// MyPickPathSequence->Last returns the last
// PickPath found in the sequence.
Result = MyPickPathSequence->Sequence().Last ();
break;
}
return (Result.StructIdentifier ());
}
Standard_Integer Visual3d_PickDescriptor::TopPickId () const {
Visual3d_PickPath Result;
if (MyPickPathSequence->IsEmpty ())
Visual3d_PickError::Raise ("PickDescriptor empty");
switch (MyContext.Order ()) {
case Visual3d_TOO_TOPFIRST :
// MyPickPathSequence->First returns the first
// PickPath found in the sequence.
Result = MyPickPathSequence->Sequence().First ();
break;
case Visual3d_TOO_BOTTOMFIRST :
// MyPickPathSequence->Last returns the last
// PickPath found in the sequence.
Result = MyPickPathSequence->Sequence().Last ();
break;
}
return (Result.PickIdentifier ());
}
Standard_Integer Visual3d_PickDescriptor::TopElementNumber () const {
Visual3d_PickPath Result;
if (MyPickPathSequence->IsEmpty ())
Visual3d_PickError::Raise ("PickDescriptor empty");
switch (MyContext.Order ()) {
case Visual3d_TOO_TOPFIRST :
// MyPickPathSequence->First returns the first
// PickPath found in the sequence.
Result = MyPickPathSequence->Sequence().First ();
break;
case Visual3d_TOO_BOTTOMFIRST :
// MyPickPathSequence->Last returns the last
// PickPath found in the sequence.
Result = MyPickPathSequence->Sequence().Last ();
break;
}
return (Result.ElementNumber ());
}
Handle(Visual3d_HSequenceOfPickPath) Visual3d_PickDescriptor::PickPath () const {
return (Handle(Visual3d_HSequenceOfPickPath)::DownCast
(MyPickPathSequence->ShallowCopy ()));
}

View File

@@ -1,138 +0,0 @@
-- Created on: 1991-11-25
-- Created by: NW,JPB,CAL
-- Copyright (c) 1991-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class PickPath from Visual3d
---Version:
---Purpose: PickPath is a vector ( pick_id, struct_id, elem_num ).
-- It's one of the constituents of a PickDescriptor.
-- There are many PickPaths in a PickDescriptor.
-- Each PickPath describes a structure or a sub-structure.
-- The pick_id is set by SetPickId method from Group.
---Keywords: Pick Path, PickId
---Warning:
---References:
uses
Structure from Graphic3d
raises
PickError from Visual3d
is
Create
returns PickPath from Visual3d;
---Level: Public
---Purpose: Creates an undefined PickPath.
Create ( AElemNumber : Integer from Standard;
APickId : Integer from Standard;
AStructure : Structure from Graphic3d)
returns PickPath from Visual3d;
---Level: Public
---Purpose: Creates a PickPath :
-- <AElemNumber> : Element number of the structure picked.
-- <APickId> : Pick identifier of the structure picked.
-- <AStructure> : The picked structure.
---------------------------------------------------
-- Category: Methods to modify the class definition
---------------------------------------------------
SetElementNumber ( me : in out;
AElemNumber : Integer from Standard )
is static;
---Level: Public
---Purpose: Modifies the PickPath <me>.
-- <AElemNumber> : Element number of the structure picked.
---Category: Methods to modify the class definition
SetPickIdentifier ( me : in out;
APickId : Integer from Standard )
is static;
---Level: Public
---Purpose: Modifies the PickPath <me>.
-- <APickId> : Pick identifier of the structure picked.
---Category: Methods to modify the class definition
SetStructIdentifier ( me : in out;
AStructure : Structure from Graphic3d )
is static;
---Level: Public
---Purpose: Modifies the PickPath <me>.
-- <AStructure> : Identifier of the structure picked.
---Category: Methods to modify the class definition
----------------------------
-- Category: Inquire methods
----------------------------
ElementNumber ( me )
returns Integer from Standard
---Level: Public
---Purpose: Returns the element number stocked in the PickPath <me>.
-- Category: Inquire methods
-- Warning: Raises PickError if PickPath is empty (no picked structure).
raises PickError from Visual3d is static;
PickIdentifier ( me )
returns Integer from Standard
---Level: Public
---Purpose: Returns the pick identifier stocked in the PickPath <me>.
-- Category: Inquire methods
-- Warning: Raises PickError if PickPath is empty (no picked structure).
raises PickError from Visual3d is static;
StructIdentifier ( me )
returns Structure from Graphic3d
---Level: Public
---Purpose: Returns the structure stocked in the PickPath <me>.
-- Category: Inquire methods
-- Warning: Raises PickError if PickPath is empty (no picked structure).
raises PickError from Visual3d is static;
--
fields
--
-- Class : Visual3d_PickPath
--
-- Purpose : Declaration of variables specific to the class
-- describing a picking.
--
-- Reminders : A pick is defined by :
-- - a vector (Elem_Num, Pick_Id, Structure)
--
--
-- the pick vector
MyElementNumber : Integer from Standard;
MyPickId : Integer from Standard;
MyStructure : Structure from Graphic3d;
-- the flag for definition
MyElementNumberIsDef : Boolean from Standard;
MyPickIdIsDef : Boolean from Standard;
MyStructureIsDef : Boolean from Standard;
end PickPath;

View File

@@ -1,114 +0,0 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//-Version
//-Design Declaration of variables specific to the classe
// describing a marking.
//-Warning Marking is defined by :
// - vector (Elem_Num, Pick_Id, Structure)
//-References
//-Language C++ 2.0
//-Declarations
// for the class
#include <Visual3d_PickPath.ixx>
//-Aliases
//-Global data definitions
// -- le vecteur
// MyElementNumber : Standard_Integer;
// MyPickId : Standard_Integer;
// MyStructure : Structure;
// -- les flags pour definition
// MyElementNumberIsDef : Standard_Boolean;
// MyPickIdIsDef : Standard_Boolean;
// MyStructureIsDef : Standard_Boolean;
//-Constructors
//-Destructors
//-Methods, in order
Visual3d_PickPath::Visual3d_PickPath ():
MyElementNumberIsDef (Standard_False),
MyPickIdIsDef (Standard_False),
MyStructureIsDef (Standard_False) {
}
Visual3d_PickPath::Visual3d_PickPath (const Standard_Integer AnElemNumber, const Standard_Integer APickId, const Handle(Graphic3d_Structure)& AStructure):
MyElementNumber (AnElemNumber),
MyPickId (APickId),
MyStructure (AStructure),
MyElementNumberIsDef (Standard_True),
MyPickIdIsDef (Standard_True),
MyStructureIsDef (Standard_True) {
}
void Visual3d_PickPath::SetElementNumber (const Standard_Integer AnElemNumber) {
MyElementNumber = AnElemNumber;
MyElementNumberIsDef = Standard_True;
}
void Visual3d_PickPath::SetPickIdentifier (const Standard_Integer APickId) {
MyPickId = APickId;
MyPickIdIsDef = Standard_True;
}
void Visual3d_PickPath::SetStructIdentifier (const Handle(Graphic3d_Structure)& AStructure) {
MyStructure = AStructure;
MyStructureIsDef = Standard_True;
}
Standard_Integer Visual3d_PickPath::ElementNumber () const {
if (!MyElementNumberIsDef)
Visual3d_PickError::Raise ("No defined ElementNumber");
return (MyElementNumber);
}
Standard_Integer Visual3d_PickPath::PickIdentifier () const {
if (!MyPickIdIsDef)
Visual3d_PickError::Raise ("No defined PickIdentifier");
return (MyPickId);
}
Handle(Graphic3d_Structure) Visual3d_PickPath::StructIdentifier () const {
if (!MyStructureIsDef)
Visual3d_PickError::Raise ("No defined StructIdentifier");
return (MyStructure);
}

View File

@@ -46,7 +46,6 @@ uses
ContextPick from Visual3d,
Layer from Visual3d,
PickDescriptor from Visual3d,
SetOfView from Visual3d,
HSetOfView from Visual3d,
View from Visual3d
@@ -177,14 +176,6 @@ is
-- Pickable as determined by the method --
-- Graphic3d_Structure::SetPick --
-- --
-- The PickDescriptor is : --
-- A list of PickPath. --
-- --
-- The PickPath is defined by : --
-- A Structure Identification --
-- A Pick Identification --
-- An Element Number. --
-- --
-- To insert a Pick Identification use the --
-- method Graphic3d_Group::SetPickId --
-- --

View File

@@ -67,7 +67,6 @@
#include <Graphic3d_MapOfStructure.hxx>
#include <Graphic3d_MapIteratorOfMapOfStructure.hxx>
#include <Visual3d_PickPath.hxx>
#include <Visual3d_SetIteratorOfSetOfView.hxx>
#if defined (_WIN32) || defined(__WIN32__)