mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-05-25 21:20:48 +05:00
Bug IPAL8747. Move name fixing in GEOM_Engine
This commit is contained in:
parent
a48b474469
commit
9e5da4ecb2
@ -25,23 +25,18 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
|
|||||||
return new Engines::TMPFile(0);
|
return new Engines::TMPFile(0);
|
||||||
|
|
||||||
Resource_DataMapOfAsciiStringAsciiString aMap;
|
Resource_DataMapOfAsciiStringAsciiString aMap;
|
||||||
TCollection_AsciiString s("qwertyuioplkjhgfdsazxcvbnmQWERTYUIOPLKJHGFDSAZXCVBNM0987654321_");
|
|
||||||
|
|
||||||
SALOMEDS::ChildIterator_var Itr = aStudy->NewChildIterator(aSO);
|
SALOMEDS::ChildIterator_var Itr = aStudy->NewChildIterator(aSO);
|
||||||
for(Itr->InitEx(true); Itr->More(); Itr->Next()) {
|
for(Itr->InitEx(true); Itr->More(); Itr->Next()) {
|
||||||
SALOMEDS::SObject_var aValue = Itr->Value();
|
SALOMEDS::SObject_var aValue = Itr->Value();
|
||||||
char* IOR = aValue->GetIOR();
|
CORBA::String_var IOR = aValue->GetIOR();
|
||||||
if(strlen(IOR) > 0) {
|
if(strlen(IOR.in()) > 0) {
|
||||||
CORBA::Object_var obj = _orb->string_to_object(IOR);
|
CORBA::Object_var obj = _orb->string_to_object(IOR);
|
||||||
GEOM::GEOM_Object_var GO = GEOM::GEOM_Object::_narrow(obj);
|
GEOM::GEOM_Object_var GO = GEOM::GEOM_Object::_narrow(obj);
|
||||||
if(!CORBA::is_nil(GO)) {
|
if(!CORBA::is_nil(GO)) {
|
||||||
TCollection_AsciiString aName(aValue->GetName());
|
CORBA::String_var aName = aValue->GetName();
|
||||||
int p, p2=1, e = aName.Length();
|
CORBA::String_var anEntry = GO->GetEntry();
|
||||||
while ((p = aName.FirstLocationNotInSet(s, p2, e))) {
|
aMap.Bind( (char*)anEntry.in(), (char*)aName.in() );
|
||||||
aName.SetValue(p, '_');
|
|
||||||
p2=p;
|
|
||||||
}
|
|
||||||
aMap.Bind(TCollection_AsciiString(GO->GetEntry()), aName);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user