mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-08 06:36:51 +08:00
0024788: Foundation Classes - remove Dico_Dictionary
Class Dico_Dictionary was replaced by NCollection_DataMap/NCollection_IndexedDataMap classes. Changed argument name in template class NCollection_Datamap to eliminate redefinitions of static members in dependent code.
This commit is contained in:
@@ -12,12 +12,12 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <Dico_DictionaryOfTransient.hxx>
|
||||
#include <Dico_IteratorOfDictionaryOfTransient.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_FreeFormEntity.hxx>
|
||||
#include <NCollection_DataMap.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(StepData_FreeFormEntity,MMgt_TShared)
|
||||
|
||||
@@ -81,20 +81,20 @@ void StepData_FreeFormEntity::SetStepType (const Standard_CString typenam)
|
||||
if (!afr) return afr;
|
||||
// remise en ordre avec un dictionnaire
|
||||
e1 = ent; e2.Nullify();
|
||||
Handle(Dico_DictionaryOfTransient) dic = new Dico_DictionaryOfTransient;
|
||||
NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)> dic;
|
||||
while (!e1.IsNull()) {
|
||||
dic->SetItem (e1->StepType(), e1);
|
||||
dic.Bind(e1->StepType(), e1);
|
||||
e1 = e1->Next();
|
||||
}
|
||||
// d abord effacer les next en cours ...
|
||||
Dico_IteratorOfDictionaryOfTransient iter(dic);
|
||||
for (iter.Start(); iter.More(); iter.Next()) {
|
||||
NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>::Iterator iter(dic);
|
||||
for (; iter.More(); iter.Next()) {
|
||||
e1 = GetCasted(StepData_FreeFormEntity,iter.Value());
|
||||
if (!e1.IsNull()) e1->SetNext(e2);
|
||||
}
|
||||
// ... puis les remettre dans l ordre
|
||||
e1.Nullify();
|
||||
for (iter.Start(); iter.More(); iter.Next()) {
|
||||
for (iter.Reset(); iter.More(); iter.Next()) {
|
||||
e2 = GetCasted(StepData_FreeFormEntity,iter.Value());
|
||||
if (!e1.IsNull()) e1->SetNext(e2);
|
||||
e1 = e2;
|
||||
|
||||
Reference in New Issue
Block a user