mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-06 11:44:18 +05:00
Dump Python extension
This commit is contained in:
parent
8f8acbd807
commit
f86d14b0c0
@ -73,11 +73,14 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
|
|||||||
vector<TVariable> aVariables;
|
vector<TVariable> aVariables;
|
||||||
if(aValue->FindAttribute(anAttr,"AttributeString")){
|
if(aValue->FindAttribute(anAttr,"AttributeString")){
|
||||||
anAttrStr = SALOMEDS::AttributeString::_narrow(anAttr);
|
anAttrStr = SALOMEDS::AttributeString::_narrow(anAttr);
|
||||||
SALOMEDS::ListOfStrings_var aListOfVars = aStudy->ParseVariables(anAttrStr->Value());
|
SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(anAttrStr->Value());
|
||||||
for(int i = 0;i < aListOfVars->length();i++) {
|
for(int i = 0; i < aSections->length(); i++) {
|
||||||
bool isVar = aStudy->IsVariable(aListOfVars[i].in());
|
SALOMEDS::ListOfStrings aListOfVars = aSections[i];
|
||||||
TVariable aVar = TVariable( (char*)aListOfVars[i].in(), isVar );
|
for(int j = 0; j < aListOfVars.length(); j++) {
|
||||||
aVariables.push_back(aVar);
|
bool isVar = aStudy->IsVariable(aListOfVars[j].in());
|
||||||
|
TVariable aVar = TVariable( (char*)aListOfVars[j].in(), isVar );
|
||||||
|
aVariables.push_back(aVar);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aVariableMap.insert(pair<TCollection_AsciiString,vector<TVariable> >((char*)anEntry,aVariables));
|
aVariableMap.insert(pair<TCollection_AsciiString,vector<TVariable> >((char*)anEntry,aVariables));
|
||||||
|
@ -276,14 +276,19 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
|
|||||||
//Set NoteBook variables used in the object creation
|
//Set NoteBook variables used in the object creation
|
||||||
bool isFound = false;
|
bool isFound = false;
|
||||||
TCollection_AsciiString aVars;
|
TCollection_AsciiString aVars;
|
||||||
SALOMEDS::ListOfStrings_var aListOfVars = theStudy->ParseVariables(aShape->GetParameters());
|
SALOMEDS::ListOfListOfStrings_var aSections = theStudy->ParseVariables(aShape->GetParameters());
|
||||||
for(int i = 0, n = aListOfVars->length(); i < n; i++) {
|
for(int i = 0, n = aSections->length(); i < n; i++) {
|
||||||
if(theStudy->IsVariable(aListOfVars[i].in())) {
|
SALOMEDS::ListOfStrings aListOfVars = aSections[i];
|
||||||
aVars += TCollection_AsciiString(aListOfVars[i].in());
|
for(int j = 0, m = aListOfVars.length(); j < m; j++) {
|
||||||
isFound = true;
|
if(theStudy->IsVariable(aListOfVars[j].in())) {
|
||||||
|
aVars += TCollection_AsciiString(aListOfVars[j].in());
|
||||||
|
isFound = true;
|
||||||
|
}
|
||||||
|
if(j != m-1)
|
||||||
|
aVars += ":";
|
||||||
}
|
}
|
||||||
if(i != n-1)
|
if(i != n-1)
|
||||||
aVars += ":";
|
aVars += "|";
|
||||||
}
|
}
|
||||||
if(isFound) {
|
if(isFound) {
|
||||||
anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeString");
|
anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeString");
|
||||||
|
Loading…
Reference in New Issue
Block a user