mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024742: Remove rarely used collection classes: Stack
Generic class TCollection_Stack removed (along with TCollection_StackIterator and TCollection_StackNode). Code using TCollection_Stack changed to equivalent use of TCollection_List (replacing Push -> Prepend, Top -> First, Pop -> RemoveFirst).
This commit is contained in:
@@ -21,7 +21,7 @@ uses
|
||||
StackOfDocument from CDM,
|
||||
MapOfDocument from CDM,
|
||||
MapIteratorOfMapOfDocument from CDM,
|
||||
StackIteratorOfStackOfDocument from CDM,
|
||||
ListIteratorOfStackOfDocument from CDM,
|
||||
MetaData from CDM,
|
||||
ExtendedString from TCollection,
|
||||
StoreStatus from PCDM
|
||||
|
@@ -46,7 +46,7 @@ CDF_StoreList::CDF_StoreList(const Handle(CDM_Document)& aDocument) {
|
||||
void CDF_StoreList::Add(const Handle(CDM_Document)& aDocument) {
|
||||
|
||||
if(!myItems.Contains(aDocument) && aDocument != myMainDocument) myItems.Add(aDocument);
|
||||
myStack.Push(aDocument);
|
||||
myStack.Prepend(aDocument);
|
||||
|
||||
CDM_ReferenceIterator it(aDocument);
|
||||
for (;it.More();it.Next()) {
|
||||
@@ -83,9 +83,9 @@ PCDM_StoreStatus CDF_StoreList::Store (Handle(CDM_MetaData)& aMetaData, TCollect
|
||||
{
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
for (; !myStack.IsEmpty(); myStack.Pop()) {
|
||||
for (; !myStack.IsEmpty(); myStack.RemoveFirst()) {
|
||||
|
||||
Handle(CDM_Document) theDocument = myStack.Top();
|
||||
Handle(CDM_Document) theDocument = myStack.First();
|
||||
if( theDocument == myMainDocument || theDocument->IsModified()) {
|
||||
|
||||
if(!PCDM::FindStorageDriver(theDocument)){
|
||||
|
Reference in New Issue
Block a user