mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0024742: Remove rarely used collection classes: SList
Generic "TCollection_SList" class and nested "TCollection_SListNode" class moved (as non-generic) to the "TopLoc" package (the only place where they were instantiated). Names of these classes changed to "TopLoc_SListOfItemLocation" and "TopLoc_SListNodeOfItemLocation". "NCollection_SList" class removed as unused (along with NCollection_DefineSList.hxx).
This commit is contained in:
@@ -24,7 +24,6 @@ uses
|
||||
is
|
||||
class ListOfPnt instantiates List from TCollection (Pnt from gp);
|
||||
class StackOfPnt instantiates Stack from TCollection (Pnt from gp);
|
||||
class SListOfPnt instantiates SList from TCollection (Pnt from gp);
|
||||
class DataMapOfRealPnt instantiates DataMap from TCollection
|
||||
(Real from Standard,
|
||||
Pnt from gp,
|
||||
|
@@ -237,21 +237,6 @@ static Standard_Integer QANColTestSet(Draw_Interpretor& di, Standard_Integer arg
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : QANColTestSList
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static Standard_Integer QANColTestSList(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
|
||||
{
|
||||
if ( argc != 1) {
|
||||
di << "Usage : " << argv[0] << "\n";
|
||||
return 1;
|
||||
}
|
||||
QANCollection_SListFunc aSList;
|
||||
TestSList(aSList);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : QANColTestSequence
|
||||
//purpose :
|
||||
@@ -281,7 +266,6 @@ void QANCollection::Commands2(Draw_Interpretor& theCommands) {
|
||||
theCommands.Add("QANColTestList", "QANColTestList", __FILE__, QANColTestList, group);
|
||||
theCommands.Add("QANColTestStack", "QANColTestStack", __FILE__, QANColTestStack, group);
|
||||
theCommands.Add("QANColTestSet", "QANColTestSet", __FILE__, QANColTestSet, group);
|
||||
theCommands.Add("QANColTestSList", "QANColTestSList", __FILE__, QANColTestSList, group);
|
||||
theCommands.Add("QANColTestSequence", "QANColTestSequence", __FILE__, QANColTestSequence, group);
|
||||
|
||||
return;
|
||||
|
@@ -125,20 +125,6 @@ static Standard_Integer QANColPerfSet(Draw_Interpretor& di, Standard_Integer arg
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : QANColPerfSList
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static Standard_Integer QANColPerfSList(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
|
||||
{
|
||||
Standard_Integer Repeat, Size;
|
||||
if ( CheckArguments(di, argc, argv, Repeat, Size) ) {
|
||||
return 1;
|
||||
}
|
||||
CompSList(Repeat,Size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : QANColPerfSequence
|
||||
//purpose :
|
||||
@@ -246,7 +232,6 @@ void QANCollection::Commands3(Draw_Interpretor& theCommands) {
|
||||
theCommands.Add("QANColPerfList", "QANColPerfList Repeat Size", __FILE__, QANColPerfList, group);
|
||||
theCommands.Add("QANColPerfStack", "QANColPerfStack Repeat Size", __FILE__, QANColPerfStack, group);
|
||||
theCommands.Add("QANColPerfSet", "QANColPerfSet Repeat Size", __FILE__, QANColPerfSet, group);
|
||||
theCommands.Add("QANColPerfSList", "QANColPerfSList Repeat Size", __FILE__, QANColPerfSList, group);
|
||||
theCommands.Add("QANColPerfSequence", "QANColPerfSequence Repeat Size", __FILE__, QANColPerfSequence, group);
|
||||
theCommands.Add("QANColPerfMap", "QANColPerfMap Repeat Size", __FILE__, QANColPerfMap, group);
|
||||
theCommands.Add("QANColPerfDataMap", "QANColPerfDataMap Repeat Size", __FILE__, QANColPerfDataMap, group);
|
||||
|
@@ -79,10 +79,6 @@ DEFINE_STACK(QANCollection_StackFunc,QANCollection_BaseColFunc,ItemType)
|
||||
DEFINE_SET(QANCollection_SetFunc,QANCollection_Key2BaseColFunc,Key2Type)
|
||||
DEFINE_HSET(QANCollection_HSetFunc,QANCollection_SetFunc)
|
||||
|
||||
#include <NCollection_DefineSList.hxx>
|
||||
////////////////////////////////DEFINE_SLIST(QANCollection_SList,QANCollection_BaseCol,ItemType)
|
||||
DEFINE_SLIST(QANCollection_SListFunc,QANCollection_BaseColFunc,ItemType)
|
||||
|
||||
#include <NCollection_DefineSequence.hxx>
|
||||
#include <NCollection_DefineHSequence.hxx>
|
||||
////////////////////////////////DEFINE_SEQUENCE(QANCollection_Sequence,QANCollection_BaseCol,ItemType)
|
||||
|
@@ -79,10 +79,6 @@ DEFINE_STACK(QANCollection_StackPerf,QANCollection_BaseColPerf,ItemType)
|
||||
DEFINE_SET(QANCollection_SetPerf,QANCollection_Key2BaseColPerf,Key2Type)
|
||||
DEFINE_HSET(QANCollection_HSetPerf,QANCollection_SetPerf)
|
||||
|
||||
#include <NCollection_DefineSList.hxx>
|
||||
////////////////////////////////DEFINE_SLIST(QANCollection_SList,QANCollection_BaseCol,ItemType)
|
||||
DEFINE_SLIST(QANCollection_SListPerf,QANCollection_BaseColPerf,ItemType)
|
||||
|
||||
#include <NCollection_DefineSequence.hxx>
|
||||
#include <NCollection_DefineHSequence.hxx>
|
||||
////////////////////////////////DEFINE_SEQUENCE(QANCollection_Sequence,QANCollection_BaseCol,ItemType)
|
||||
|
@@ -156,46 +156,6 @@ void TestSet (QANCollection_SetFunc& theS)
|
||||
aSet.Clear();
|
||||
}
|
||||
|
||||
// ===================== Test methods of SList type ===========================
|
||||
////////////////////////////////void TestSList (QANCollection_SList& theSL)
|
||||
void TestSList (QANCollection_SListFunc& theSL)
|
||||
{
|
||||
printf ("Info: testing SList\n");
|
||||
ItemType anItem;
|
||||
////////////////////////////////QANCollection_SList aSL, aSL1;
|
||||
QANCollection_SListFunc aSL, aSL1;
|
||||
|
||||
// Construct, Constructed, operator=, IsEmpty
|
||||
Random(anItem);
|
||||
aSL.Construct(anItem);
|
||||
Random(anItem);
|
||||
aSL1 = aSL.Constructed(anItem);
|
||||
if (aSL.IsEmpty())
|
||||
printf ("Error : SList must not be empty\n");
|
||||
printCollection(aSL1,"aSL1");
|
||||
|
||||
Random(anItem);
|
||||
aSL.Construct(anItem);
|
||||
// SetTail
|
||||
aSL.SetTail(aSL1);
|
||||
printCollection(aSL,"aSL");
|
||||
|
||||
// ChangeValue
|
||||
Random(aSL1.Tail().ChangeValue());
|
||||
// ChangeTail, ToTail
|
||||
Random(anItem);
|
||||
theSL.Construct(anItem);
|
||||
printCollection(theSL,"theSL");
|
||||
theSL.ChangeTail() = aSL;
|
||||
printCollection(theSL,"theSL");
|
||||
|
||||
// Assign
|
||||
AssignCollection (aSL, theSL);
|
||||
|
||||
// Clear
|
||||
aSL.Clear();
|
||||
}
|
||||
|
||||
// ===================== Test methods of Sequence type ========================
|
||||
////////////////////////////////void TestSequence (QANCollection_Sequence& theS)
|
||||
void TestSequence (QANCollection_SequenceFunc& theS)
|
||||
|
@@ -36,7 +36,6 @@
|
||||
// Standard_EXPORT void TestList (QANCollection_List& theLi);
|
||||
// Standard_EXPORT void TestStack (QANCollection_Stack& theSt);
|
||||
// Standard_EXPORT void TestSet (QANCollection_Set& theSe);
|
||||
// Standard_EXPORT void TestSList (QANCollection_SList& theSL);
|
||||
// Standard_EXPORT void TestSequence(QANCollection_Sequence& theSq);
|
||||
#include <QANCollection_FuncLists.hxx>
|
||||
|
||||
|
@@ -17,7 +17,6 @@
|
||||
#define QANCollection_PerfLists_HeaderFile
|
||||
|
||||
#include <QANCollection_ListOfPnt.hxx>
|
||||
#include <QANCollection_SListOfPnt.hxx>
|
||||
#include <QANCollection_StackOfPnt.hxx>
|
||||
#include <TColgp_SequenceOfPnt.hxx>
|
||||
#include <TColStd_SetOfInteger.hxx>
|
||||
@@ -273,78 +272,6 @@ void CompSet (const Standard_Integer theRep,
|
||||
PERF_PRINT_ALL
|
||||
}
|
||||
|
||||
|
||||
// ===================== Test perform of SList type ==========================
|
||||
void CompSList (const Standard_Integer theRep,
|
||||
const Standard_Integer theSize)
|
||||
{
|
||||
Standard_Integer i,j;
|
||||
|
||||
////////////////////////////////Perf_Meter aNAppe ("NCollection_SList constructing",0);
|
||||
////////////////////////////////Perf_Meter aTAppe ("TCollection_SList constructing",0);
|
||||
////////////////////////////////Perf_Meter aNOper ("NCollection_SList operator=",0);
|
||||
////////////////////////////////Perf_Meter aTOper ("TCollection_SList operator=",0);
|
||||
////////////////////////////////Perf_Meter aNAssi ("NCollection_SList Assign",0);
|
||||
////////////////////////////////Perf_Meter aNClea ("NCollection_SList clearing",0);
|
||||
////////////////////////////////Perf_Meter aTClea ("TCollection_SList clearing",0);
|
||||
for (i=0; i<theRep; i++)
|
||||
{
|
||||
////////////////////////////////QANCollection_SList a1, a2;
|
||||
QANCollection_SListPerf a1, a2;
|
||||
////////////////////////////////aNAppe.Start();
|
||||
PERF_START_METER("NCollection_SList constructing")
|
||||
for (j=1; j<=theSize; j++)
|
||||
{
|
||||
ItemType anItem;
|
||||
Random(anItem);
|
||||
a1.Construct(anItem);
|
||||
}
|
||||
////////////////////////////////aNAppe.Stop();
|
||||
PERF_STOP_METER("NCollection_SList constructing")
|
||||
////////////////////////////////aNOper.Start();
|
||||
PERF_START_METER("NCollection_SList operator=")
|
||||
a2 = a1;
|
||||
////////////////////////////////aNOper.Stop();
|
||||
PERF_STOP_METER("NCollection_SList operator=")
|
||||
////////////////////////////////aNAssi.Start();
|
||||
PERF_START_METER("NCollection_SList Assign")
|
||||
a2.Assign(a1);
|
||||
////////////////////////////////aNAssi.Stop();
|
||||
PERF_STOP_METER("NCollection_SList Assign")
|
||||
////////////////////////////////aNClea.Start();
|
||||
PERF_START_METER("NCollection_SList clearing")
|
||||
a2.Clear();
|
||||
////////////////////////////////aNClea.Stop();
|
||||
PERF_STOP_METER("NCollection_SList clearing")
|
||||
}
|
||||
|
||||
for (i=0; i<theRep; i++)
|
||||
{
|
||||
QANCollection_SListOfPnt a1, a2;
|
||||
////////////////////////////////aTAppe.Start();
|
||||
PERF_START_METER("TCollection_SList constructing")
|
||||
for (j=1; j<=theSize; j++)
|
||||
{
|
||||
ItemType anItem;
|
||||
Random(anItem);
|
||||
a1.Construct(anItem);
|
||||
}
|
||||
////////////////////////////////aTAppe.Stop();
|
||||
PERF_STOP_METER("TCollection_SList constructing")
|
||||
////////////////////////////////aTOper.Start();
|
||||
PERF_START_METER("TCollection_SList operator=")
|
||||
a2 = a1;
|
||||
////////////////////////////////aTOper.Stop();
|
||||
PERF_STOP_METER("TCollection_SList operator=")
|
||||
////////////////////////////////aTClea.Start();
|
||||
PERF_START_METER("TCollection_SList clearing")
|
||||
a2.Clear();
|
||||
////////////////////////////////aTClea.Stop();
|
||||
PERF_STOP_METER("TCollection_SList clearing")
|
||||
}
|
||||
PERF_PRINT_ALL
|
||||
}
|
||||
|
||||
// ===================== Test perform of Sequence type ==========================
|
||||
void CompSequence (const Standard_Integer theRep,
|
||||
const Standard_Integer theSize)
|
||||
|
Reference in New Issue
Block a user