mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +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:
@@ -96,18 +96,6 @@ is
|
||||
-- Exceptions
|
||||
-- Standard_OutOfRange if Index is not within the bounds of this array.
|
||||
|
||||
ShallowCopy(me)
|
||||
returns mutable like me
|
||||
is redefined;
|
||||
---Purpose: Returns a new array containing a copy
|
||||
-- of the values (of the elements) in this array.
|
||||
|
||||
|
||||
ShallowDump (me; s: in out OStream)
|
||||
is redefined;
|
||||
---Level: Advanced
|
||||
---C++: function call
|
||||
|
||||
Field (me)returns FieldOfHArray1
|
||||
---Level: Internal
|
||||
is private;
|
||||
|
@@ -75,30 +75,6 @@ void PCollection_HArray1::~PCollection_HArray1 ()
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// ShallowCopy
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
Handle(Standard_Persistent) PCollection_HArray1::ShallowCopy() const
|
||||
{
|
||||
PCollection_HArray1* TheCopy = new PCollection_HArray1(*this);
|
||||
// PCollection_FieldOfHArray1 DataCopy (Data);
|
||||
// TheCopy->Data = DataCopy;
|
||||
return TheCopy;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// ShallowDump
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void PCollection_HArray1::ShallowDump(Standard_OStream& S) const
|
||||
{
|
||||
::ShallowDump(Data,S);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Anciens INLINE */
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
@@ -121,18 +121,6 @@ is
|
||||
-- Standard_OutOfRange if the index (Row,
|
||||
-- Column) is not within the bounds of this array.
|
||||
|
||||
ShallowCopy(me)
|
||||
returns mutable like me
|
||||
is redefined;
|
||||
---Purpose: Returns a new array containing a copy of the
|
||||
-- values (of the elements) in this array.
|
||||
|
||||
ShallowDump (me; s: in out OStream)
|
||||
is redefined;
|
||||
---Level: Advanced
|
||||
---C++: function call
|
||||
|
||||
|
||||
Field (me) returns FieldOfHArray2
|
||||
is private;
|
||||
---Level: Internal
|
||||
|
@@ -90,29 +90,6 @@ void PCollection_HArray2::~PCollection_HArray2 ()
|
||||
}
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// ShallowCopy
|
||||
// --------------------------------------------------------------------
|
||||
Handle(Standard_Persistent) PCollection_HArray2::ShallowCopy() const
|
||||
{
|
||||
PCollection_HArray2* TheCopy = new PCollection_HArray2(*this);
|
||||
// PCollection_FieldOfHArray2 DataCopy (Data);
|
||||
// TheCopy->Data = DataCopy;
|
||||
return TheCopy;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// ShallowDump
|
||||
// --------------------------------------------------------------------
|
||||
void PCollection_HArray2::ShallowDump(Standard_OStream& S) const
|
||||
{
|
||||
::ShallowDump(Data,S);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Anciens INLINE */
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
@@ -439,11 +439,6 @@ is
|
||||
---Purpose: Returns the character of index Index of the string
|
||||
---Example: me = "abcd", Index = 2, Value returns 'b'.
|
||||
|
||||
ShallowDump (me; s: in out OStream)
|
||||
is redefined;
|
||||
---Level: Advanced
|
||||
---C++: function call
|
||||
|
||||
Assign(me : mutable ;TheData : VArrayOfCharacter) is private;
|
||||
---Level: Internal
|
||||
---Purpose : Assigns the field of the current structure with
|
||||
|
@@ -745,13 +745,3 @@ void PCollection_HAsciiString::Assign(const DBC_VArrayOfCharacter& TheField)
|
||||
{
|
||||
Data = TheField;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// ShallowDump
|
||||
//------------------------------------------------------------------------
|
||||
void PCollection_HAsciiString::ShallowDump(Standard_OStream& S) const
|
||||
{
|
||||
S << "begin class HAsciiString " << endl;
|
||||
::ShallowDump(Data, S);
|
||||
S << "end class HAsciiString" << endl;
|
||||
}
|
||||
|
@@ -111,17 +111,6 @@ is
|
||||
---Level: Public
|
||||
---Purpose: Modification of the forward pointer
|
||||
|
||||
ShallowCopy(me)
|
||||
returns mutable like me
|
||||
is redefined;
|
||||
---Level: Advanced
|
||||
---C++: function call
|
||||
|
||||
ShallowDump (me; s: in out OStream)
|
||||
is redefined;
|
||||
---Level: Advanced
|
||||
---C++: function call
|
||||
|
||||
Destroy(me : mutable);
|
||||
---C++: alias ~
|
||||
|
||||
|
@@ -50,63 +50,6 @@ Handle(PCollection_HDoubleList)
|
||||
return L; // C'est L qui est retourne.
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// - -
|
||||
// - -
|
||||
// - -
|
||||
// -----------------------------------------------------------------------
|
||||
Handle(Standard_Persistent) PCollection_HDoubleList::ShallowCopy() const
|
||||
{
|
||||
|
||||
Handle(PCollection_HDoubleList) TheList, // Traversal depth of <this>
|
||||
TheCopy, // The list returned
|
||||
Pred, // Backward pointer
|
||||
Succ, // Forward pointer
|
||||
Last; // Last cell
|
||||
|
||||
TheCopy = new PCollection_HDoubleList; // Initialization of the list
|
||||
// that will be returned
|
||||
Standard_Boolean FirstTime = Standard_True;
|
||||
|
||||
TheList = this; // Start at the beginning
|
||||
Pred = Succ = TheCopy;
|
||||
|
||||
while ( ! TheList->IsEmpty() ) { // Append each item at the
|
||||
Succ = Succ->Construct(TheList->Value()); // end of the list
|
||||
if ( FirstTime ){
|
||||
FirstTime = Standard_False;
|
||||
TheCopy = Succ;
|
||||
}
|
||||
else{
|
||||
Pred->ChangeForwardPointer(Succ); // Make the link between
|
||||
Succ->ChangeBackPointer(Pred); // Pred and Succ
|
||||
}
|
||||
Pred = Succ;
|
||||
Succ = Succ->Tail();
|
||||
TheList = TheList->Tail();
|
||||
}
|
||||
return TheCopy; // Returns the header
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// - -
|
||||
// - -
|
||||
// - -
|
||||
// -----------------------------------------------------------------------
|
||||
void PCollection_HDoubleList::ShallowDump(Standard_OStream& S) const
|
||||
{
|
||||
Handle(PCollection_HDoubleList) TheList;
|
||||
TheList = this;
|
||||
S << "begin class HDoubleList " << endl;
|
||||
while ( ! TheList->IsEmpty() ) {
|
||||
::ShallowDump(TheList->Value(), S);
|
||||
TheList = TheList->Tail();
|
||||
}
|
||||
S << "end of HDoubleList." << endl;
|
||||
}
|
||||
|
||||
|
||||
/* Anciens INLINE */
|
||||
|
||||
|
||||
|
@@ -280,12 +280,6 @@ is
|
||||
---Purpose: Returns the character of index Index of the string.
|
||||
---Example: me = "abcd", Index = 2, Value returns 'b'
|
||||
|
||||
ShallowDump (me; s: in out OStream)
|
||||
is redefined;
|
||||
---Level: Advanced
|
||||
---C++: function call
|
||||
|
||||
|
||||
Assign(me : mutable ;TheData : VArrayOfExtCharacter) is private;
|
||||
---Level: Internal
|
||||
---Purpose : Assigns the field of the current structure with
|
||||
|
@@ -567,17 +567,6 @@ Standard_ExtCharacter PCollection_HExtendedString::Value
|
||||
return Data(Index-1);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// ShallowDump
|
||||
//------------------------------------------------------------------------
|
||||
void PCollection_HExtendedString::ShallowDump(Standard_OStream& S) const
|
||||
{
|
||||
S << "begin class HExtendedString " << endl;
|
||||
::ShallowDump(Data, S);
|
||||
S << "end class HExtendedString" << endl;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Assign
|
||||
//------------------------------------------------------------------------
|
||||
|
@@ -401,19 +401,6 @@ is
|
||||
returns SeqNode
|
||||
is private;
|
||||
|
||||
ShallowCopy(me)
|
||||
returns mutable like me
|
||||
is redefined;
|
||||
---Level: Advanced
|
||||
---C++: function call
|
||||
|
||||
|
||||
ShallowDump (me; s: in out OStream)
|
||||
is redefined;
|
||||
---Level: Advanced
|
||||
---C++: function call
|
||||
|
||||
|
||||
Destroy(me : mutable);
|
||||
---C++: alias ~
|
||||
|
||||
|
@@ -426,52 +426,6 @@ Item PCollection_HSequence::Last() const
|
||||
return LastItem->Value();
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------
|
||||
//
|
||||
// ShallowCopy
|
||||
//
|
||||
// ----------------------------------------------------
|
||||
Handle(Standard_Persistent) PCollection_HSequence::ShallowCopy() const
|
||||
{
|
||||
Handle (PCollection_HSequence) TheCopy ;
|
||||
Handle (PCollection_SeqNode) TheList ;
|
||||
|
||||
#ifndef OBJS
|
||||
TheCopy = new PCollection_HSequence;
|
||||
#else
|
||||
TheCopy = new (os_segment::of(this)) PCollection_HSequence;
|
||||
#endif
|
||||
TheList = FirstItem;
|
||||
for (Standard_Integer I = 1; I <= Size; I++) {
|
||||
TheCopy->Append(TheList->Value());
|
||||
TheList = TheList->Next();
|
||||
}
|
||||
|
||||
return TheCopy;
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------
|
||||
//
|
||||
// ShallowDump
|
||||
// ----------------------------------------------------
|
||||
void PCollection_HSequence::ShallowDump(Standard_OStream& S) const
|
||||
{
|
||||
S << "begin class Sequence "<< endl;
|
||||
S << "Size : "<< Size << "element(s)." << endl;
|
||||
Standard_Integer i = 1;
|
||||
Handle(PCollection_SeqNode) cell = FirstItem;
|
||||
while ( !cell.IsNull() ) {
|
||||
S << "Index : "<< i << endl;
|
||||
// ::ShallowDump(cell->Value(),S);
|
||||
cell = cell->Next();
|
||||
++i;
|
||||
}
|
||||
S << "end class Sequence" << endl;
|
||||
}
|
||||
|
||||
|
||||
// IsEmpty : Returns Standard_True if the sequence is empty (i.e. Size = 0)
|
||||
Standard_Boolean PCollection_HSequence::IsEmpty() const
|
||||
{
|
||||
|
@@ -93,20 +93,6 @@ is
|
||||
---Level: Public
|
||||
---Purpose: Modification of the node link.
|
||||
|
||||
ShallowCopy(me)
|
||||
returns mutable like me
|
||||
is redefined;
|
||||
---Level: Advanced
|
||||
---C++: function call
|
||||
|
||||
|
||||
ShallowDump (me; s: in out OStream)
|
||||
is redefined;
|
||||
---Level: Advanced
|
||||
---C++: function call
|
||||
|
||||
|
||||
|
||||
fields
|
||||
Data : Item;
|
||||
Next : HSingleList;
|
||||
|
@@ -59,68 +59,6 @@ Handle(PCollection_HSingleList)
|
||||
return L;
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// -
|
||||
// Shallowcopy : Redefinition of the shallowcopy dump -
|
||||
// ----------- -
|
||||
|
||||
// -
|
||||
// -------------------------------------------------------------------------
|
||||
Handle(Standard_Persistent) PCollection_HSingleList::ShallowCopy() const
|
||||
{
|
||||
Handle(PCollection_HSingleList) TheList, // Traversal depth of <this>
|
||||
TheCopy, // The list returned
|
||||
Pred, // Backward pointer
|
||||
Succ; // Forward pointer
|
||||
#ifndef OBJS
|
||||
TheCopy = new PCollection_HSingleList; // Initialization of the list
|
||||
#else
|
||||
TheCopy = new (os_segment::of(this)) PCollection_HSingleList; // Initialization of the list
|
||||
#endif
|
||||
// that will be returned
|
||||
Standard_Boolean FirstTime = Standard_True;
|
||||
|
||||
TheList = this; // Start at the beginning
|
||||
Pred = Succ = TheCopy;
|
||||
|
||||
while ( ! TheList->IsEmpty() ) { // Append each item at the
|
||||
Succ = Succ->Construct(TheList->Value()); // end of the list
|
||||
if ( FirstTime ){
|
||||
FirstTime = Standard_False;
|
||||
TheCopy = Succ;
|
||||
}
|
||||
else{
|
||||
Pred->ChangeForwardPointer(Succ); // Make the link between
|
||||
} // Pred and Succ
|
||||
Pred = Succ;
|
||||
Succ = Succ->Tail();
|
||||
TheList = TheList->Tail();
|
||||
}
|
||||
return TheCopy; // Returns the header
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// -
|
||||
// ShallowDump Redefinition of the shallowdump method -
|
||||
// ----------- -
|
||||
// -
|
||||
// -------------------------------------------------------------------------
|
||||
void PCollection_HSingleList::ShallowDump(Standard_OStream& S) const
|
||||
{
|
||||
Handle(PCollection_HSingleList) TheList;
|
||||
TheList = this;
|
||||
S << "begin class HSingleList " << endl;
|
||||
while ( ! TheList->IsEmpty() ) {
|
||||
::ShallowDump(TheList->Value(), S);
|
||||
TheList = TheList->Tail();
|
||||
}
|
||||
S << "end class HSingleList" << endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Anciens INLINE */
|
||||
|
||||
Item PCollection_HSingleList::Value() const {
|
||||
|
Reference in New Issue
Block a user