1
0
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:
dln
2014-04-08 14:22:56 +04:00
committed by abv
parent bd2de3965e
commit 6af4fe1c46
41 changed files with 73 additions and 986 deletions

View File

@@ -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

View File

@@ -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)){