#include <DBRep.hxx>
-#include <Dico_DictionaryOfInteger.hxx>
#include <Draw_Appli.hxx>
#include <IFSelect_Functions.hxx>
#include <IFSelect_SessionPilot.hxx>
//unused variable
//static int okxset = 0;
-static Handle(Dico_DictionaryOfInteger) theolds;
+static NCollection_DataMap<TCollection_AsciiString, Standard_Integer> theolds;
static Handle(TColStd_HSequenceOfAsciiString) thenews;
static Handle(IFSelect_SessionPilot) thepilot; // detient Session, Model
void XSDRAW::ChangeCommand
(const Standard_CString oldname, const Standard_CString newname)
{
- if (theolds.IsNull()) theolds = new Dico_DictionaryOfInteger;
Standard_Integer num = 0;
if (newname[0] != '\0') {
if (thenews.IsNull()) thenews = new TColStd_HSequenceOfAsciiString();
thenews->Append(newstr);
num = thenews->Length();
}
- theolds->SetItem (oldname,num);
+ theolds.Bind(oldname,num);
}
void XSDRAW::RemoveCommand
Standard_Integer nact, num = -1;
char help[200];
com = list->Value(i);
- if (!theolds.IsNull())
- if (theolds->HasItem(com.ToCString())) num = theolds->Item(com.ToCString());
+ if (!theolds.IsEmpty())
+ theolds.Find(com, num);
if (num == 0) continue;
if (!IFSelect_Activator::Select(com.ToCString(),nact,act))
Sprintf (help,"type : xhelp %s for help",com.ToCString());