}
std::string aSObjectName = GetName(theSObject);
+ theStr<<thePrefix<<"aSComponent = theStudy.FindComponent('VISU')"<<endl;
theStr<<thePrefix<<aSObjectName<<" = aBuilder.NewObject(aSComponent)"<<endl;
theStr<<thePrefix<<"if "<<aSObjectName<<":"<<endl;
thePrefix += PREFIX;
}
- //===========================================================================
- void
- NewSObjectDumpToPython(SALOMEDS::Study_ptr theStudy,
- CORBA::Boolean theIsPublished,
- CORBA::Boolean& theIsValidScript,
- SALOMEDS::SObject_ptr theSObject,
- TDumpToPython theDumpToPython,
- std::ostream& theStr,
- TName2EntryMap& theName2EntryMap,
- TEntry2NameMap& theEntry2NameMap,
- std::string theArgumentName,
- std::string thePrefix)
- {
- SALOMEDS::StudyBuilder_var aBuilder = theStudy->NewBuilder();
- std::string aName = GenerateName(theSObject,theName2EntryMap,theEntry2NameMap);
- theStr<<thePrefix<<theArgumentName<<" = aBuilder.NewObject(aSComponent)"<<endl;
- theStr<<thePrefix<<"if "<<theArgumentName<<":"<<endl;
- thePrefix += PREFIX;
-
- (*theDumpToPython)(theStudy,
- theIsPublished,
- theIsValidScript,
- theSObject,
- theStr,
- theName2EntryMap,
- theEntry2NameMap,
- theArgumentName,
- thePrefix);
-
- theStr<<thePrefix<<"pass"<<endl<<endl;
- return;
- }
-
-
//===========================================================================
void
DumpToPython(SALOMEDS::Study_ptr theStudy,
}
}else if(strcmp(aTypeName.latin1(),"VIEW3D") == 0){
std::string aName = GetName(theSObject);
+ theStr<<thePrefix<<"aSComponent = theStudy.FindComponent('VISU')"<<endl;
theStr<<thePrefix<<aName<<" = aBuilder.NewObject(aSComponent)"<<endl;
theStr<<thePrefix<<"if "<<aName<<":"<<endl;
aStr<<endl;
aStr<<aPrefix<<"aVisu = visu.Initialize(orb,naming_service,lcc,myStudyManager,theStudy,0)"<<endl;
aStr<<aPrefix<<"aMed = lcc.FindOrLoadComponent('FactoryServer','MED')"<<endl;
- aStr<<aPrefix<<"aSComponent = theStudy.FindComponent('VISU')"<<endl;
aStr<<aPrefix<<"aBuilder = theStudy.NewBuilder()"<<endl;
aStr<<aPrefix<<"aName2ObjectMap = {}"<<endl;
aStr<<endl;