#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
-#include <SALOMEDSClient_GenericAttribute.hxx>
-#include <SALOMEDSClient_AttributeIOR.hxx>
+#include "SALOMEDSClient_GenericAttribute.hxx"
+#include "SALOMEDSClient_AttributeIOR.hxx"
-#include <SalomeApp_Application.h>
+#include "SalomeApp_Application.h"
+#include <qregexp.h>
using namespace std;
}
}
+ std::string
+ Storable
+ ::CorrectPersistentString(const std::string& thePersistentString)
+ {
+ QString aString(thePersistentString.c_str());
+ if(aString.isEmpty())
+ return aString.latin1();
+
+ VISU::Storable::TRestoringMap aRestoringMap;
+ Storable::StrToMap( aString, aRestoringMap );
+
+ bool anIsFound = false;
+ QString aComment = Storable::FindValue( aRestoringMap, "myComment", &anIsFound );
+ if ( anIsFound ) {
+ QString aType = Storable::FindValue( aRestoringMap, "myType", &anIsFound );
+ VISU::VISUType aVISUType = (VISU::VISUType)( aType.toInt() );
+ if ( anIsFound ) {
+ if ( aComment == "NONE" )
+ aVISUType = VISU::TNONE;
+ else if ( aComment == "CURVE" )
+ aVISUType = VISU::TCURVE;
+ else if ( aComment == "TABLE" )
+ aVISUType = VISU::TTABLE;
+ else if ( aComment == "CONTAINER" )
+ aVISUType = VISU::TCONTAINER;
+ else if ( aComment == "MESH" )
+ aVISUType = VISU::TMESH;
+ else if ( aComment == "SCALARMAP" )
+ aVISUType = VISU::TSCALARMAP;
+ else if ( aComment == "PRSMERGER" )
+ aVISUType = VISU::TSCALARMAP;
+ else if ( aComment == "ISOSURFACE" )
+ aVISUType = VISU::TISOSURFACE;
+ else if ( aComment == "DEFORMEDSHAPE" )
+ aVISUType = VISU::TDEFORMEDSHAPE;
+ else if ( aComment == "SCALARMAPONDEFORMEDSHAPE" )
+ aVISUType = VISU::TSCALARMAPONDEFORMEDSHAPE;
+ else if ( aComment == "GAUSSPOINTS" )
+ aVISUType = VISU::TGAUSSPOINTS;
+ else if ( aComment == "PLOT3D" )
+ aVISUType = VISU::TPLOT3D;
+ else if ( aComment == "CUTPLANES" )
+ aVISUType = VISU::TCUTPLANES;
+ else if ( aComment == "CUTLINES" )
+ aVISUType = VISU::TCUTLINES;
+ else if ( aComment == "VECTORS" )
+ aVISUType = VISU::TVECTORS;
+ else if ( aComment == "STREAMLINES" )
+ aVISUType = VISU::TSTREAMLINES;
+ else if ( aComment == "VISUGEN" )
+ aVISUType = VISU::TVISUGEN;
+ else if ( aComment == "VIEWMANAGER" )
+ aVISUType = VISU::TVIEWMANAGER;
+ else if ( aComment == "RESULT" )
+ aVISUType = VISU::TRESULT;
+ else if ( aComment == "XYPLOT" )
+ aVISUType = VISU::TXYPLOT;
+ else if ( aComment == "TABLEVIEW" )
+ aVISUType = VISU::TTABLEVIEW;
+ else if ( aComment == "VIEW3D" )
+ aVISUType = VISU::TVIEW3D;
+ else if ( aComment == "GAUSSVIEW" )
+ aVISUType = VISU::TGAUSSVIEW;
+ else if ( aComment == "ENTITY" )
+ aVISUType = VISU::TENTITY;
+ else if ( aComment == "FAMILY" )
+ aVISUType = VISU::TFAMILY;
+ else if ( aComment == "PART" )
+ aVISUType = VISU::TPART; // MULTIPR
+ else if ( aComment == "GROUP" )
+ aVISUType = VISU::TGROUP;
+ else if ( aComment == "FIELD" )
+ aVISUType = VISU::TFIELD;
+ else if ( aComment == "TIMESTAMP" )
+ aVISUType = VISU::TTIMESTAMP;
+ else if ( aComment == "ANIMATION" )
+ aVISUType = VISU::TANIMATION;
+ else if ( aComment == "ALL" )
+ aVISUType = VISU::TALL;
+ else
+ INFOS("Error : Unknown type of VISU object!");
+ }
+ if(aType != QString::number(aVISUType))
+ aString.replace( QString("myType=") + aType + ";",
+ QString("myType=") + QString::number(aVISUType) + ";");
+ }
+
+ if ( aComment == "PRSMERGER" )
+ aString.replace( "myComment=PRSMERGER", "myComment=SCALARMAP" );
+
+ return aString.latin1();
+ }
+
void
Storable
::StrToMap(const QString& theStr,
const std::string& theLocalPersistentID)
{
try{
- QString strIn( theLocalPersistentID.c_str() );
- TRestoringMap aMap;
- StrToMap(strIn,aMap);
- bool isExist;
- QString aComment = VISU::Storable::FindValue(aMap,"myComment",&isExist);
- if ( isExist ) {
+ QString aString( CorrectPersistentString( theLocalPersistentID ) );
+ TRestoringMap aRestoringMap;
+ StrToMap(aString, aRestoringMap);
+ bool anIsExists;
+ QString aComment = VISU::Storable::FindValue(aRestoringMap, "myComment", &anIsExists);
+ if ( anIsExists ) {
TCallbackMap::const_iterator anIter = VisuStoreMap.find(aComment.latin1());
if(MYDEBUG) MESSAGE("Storable::Create - "<<aComment.latin1()<<" "<<(anIter != VisuStoreMap.end()));
if(anIter == VisuStoreMap.end())
return NULL;
- return (anIter->second)(theSObject, thePrefix, aMap);
+ TStorableEngine aStorableEngine = anIter->second;
+ return aStorableEngine(theSObject, thePrefix, aRestoringMap);
}
}catch(std::exception& exc){
INFOS("Follow exception was occured :\n"<<exc.what());
const TRestoringMap& theMap);
typedef std::map<std::string,TStorableEngine> TCallbackMap;
+ static
+ std::string
+ CorrectPersistentString(const std::string& thePersistentString);
+
static
void
Registry(const std::string& theComment,
if(ColoredPrs3dCache_i* aCache = ColoredPrs3dCache_i::GetInstance_i(aStudy))
if(ColoredPrs3dHolder_i* aHolder = new ColoredPrs3dHolder_i(*aCache)){
// To postpone restoring of the device
- aColoredPrs3d->SaveRestoringState(aStudy, theMap);
+ aColoredPrs3d->SaveRestoringState(theSObject, theMap);
CORBA::String_var anEntry = theSObject->GetID();
aCache->RegisterInHolder(aColoredPrs3d, anEntry.in());
return aHolder;
myPublishInStudyMode(thePublishInStudyMode),
myIsTimeStampFixed(thePublishInStudyMode == EPublishUnderTimeStamp),
myColoredPL(NULL),
- myIsFixedRange(false)
+ myIsFixedRange(false),
+ myIsRestored(true)
{}
//---------------------------------------------------------------
return this;
}
+
+//----------------------------------------------------------------------------
+void
+VISU::ColoredPrs3d_i
+::SaveRestoringState(SALOMEDS::SObject_ptr theSObject,
+ const Storable::TRestoringMap& theMap)
+{
+ myRestoringSObject = SALOMEDS::SObject::_duplicate(theSObject);
+ myRestoringMap = theMap;
+ myIsRestored = false;
+}
+
+
+//----------------------------------------------------------------------------
+void
+VISU::ColoredPrs3d_i
+::InitFromRestoringState()
+{
+ if(!myIsRestored){
+ Restore(myRestoringSObject, myRestoringMap);
+ myIsRestored = true;
+ }
+}
+
+
//----------------------------------------------------------------------------
VISU::Storable*
VISU::ColoredPrs3d_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- if(!TSuperClass::Restore(theStudy, theMap))
+ if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
SetEntity((VISU::Entity)VISU::Storable::FindValue(theMap,"myEntity").toInt());
std::string
GetHolderEntry();
+ //! To keep restoring params till the explicit Restore() call
+ void
+ SaveRestoringState(SALOMEDS::SObject_ptr theSObject,
+ const Storable::TRestoringMap& theMap);
+
+ //! To restore the presentation according to the saved state
+ void
+ InitFromRestoringState();
+
//----------------------------------------------------------------------------
virtual
const char*
*/
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
/*!
GetActorEntry();
private:
+ bool myIsRestored;
+ Storable::TRestoringMap myRestoringMap;
+ SALOMEDS::SObject_var myRestoringSObject;
+
// Decalare basic input parameters
VISU::Entity myEntity;
VISU::Entity myPreviousEntity;
const Storable::TRestoringMap& theMap)
{
TColoredPrs3d* aColoredPrs3d = new TColoredPrs3d(ColoredPrs3d_i::EDoNotPublish);
- SALOMEDS::Study_var aStudy = theSObject->GetStudy();
- return aColoredPrs3d->Restore(aStudy, theMap);
+ return aColoredPrs3d->Restore(theSObject, theMap);
}
//----------------------------------------------------------------------------
}
//---------------------------------------------------------------
VISU::Storable*
VISU::CutLines_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- if(!TSuperClass::Restore(theStudy, theMap))
+ if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
SetNbLines(VISU::Storable::FindValue(theMap,"myNbLines").toInt());
//! Extends VISU_ColoredPrs3d_i::Restore
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
virtual
//----------------------------------------------------------------------------
VISU::Storable*
VISU::CutPlanes_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- if(!TSuperClass::Restore(theStudy, theMap))
+ if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
SetNbPlanes(VISU::Storable::FindValue(theMap,"myNbPlanes").toInt());
//! Redefines VISU_ColoredPrs3d_i::Restore
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
//! Redefines VISU_ColoredPrs3d_i::CreateActor
//---------------------------------------------------------------
VISU::Storable*
VISU::DeformedShape_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- if(!TSuperClass::Restore(theStudy, theMap))
+ if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
SetScale(VISU::Storable::FindValue(theMap,"myFactor").toDouble());
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
virtual
//----------------------------------------------------------------------------
VISU::Storable*
VISU::GaussPoints_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- if(!TSuperClass::Restore(theStudy, theMap))
+ if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
SetIsActiveLocalScalarBar(Storable::FindValue(theMap,"myIsActiveLocalScalarBar").toInt());
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
//----------------------------------------------------------------------------
// QT Includes
#include <qdir.h>
#include <qfileinfo.h>
-#include <qregexp.h>
// VTK Includes
#include <vtkRenderer.h>
if ( isAttrStringFound || theSObject->FindAttribute(anAttr, "AttributeString") ) {
SALOMEDS::AttributeString_var aAttComment = SALOMEDS::AttributeString::_narrow(anAttr);
if ( aAttComment ) {
- string aValue = aAttComment->Value();
- if ( aValue.compare("") ) {
- const QString aStr = QString( aValue.c_str() );
- VISU::Storable::TRestoringMap aMap;
- Storable::StrToMap( aStr, aMap );
-
- bool isFind = false;
- QString aType = Storable::FindValue( aMap, "myType", &isFind );
- if ( isFind ) {
- VISU::VISUType aVISUType = (VISU::VISUType)( aType.toInt() );
- QString aComment = Storable::FindValue( aMap, "myComment", &isFind );
- if ( isFind ) {
- if ( !aComment.compare(QString("NONE")) ) aVISUType = VISU::TNONE;
- else if ( !aComment.compare(QString("CURVE")) ) aVISUType = VISU::TCURVE;
- else if ( !aComment.compare(QString("TABLE")) ) aVISUType = VISU::TTABLE;
- else if ( !aComment.compare(QString("CONTAINER")) ) aVISUType = VISU::TCONTAINER;
- else if ( !aComment.compare(QString("MESH")) ) aVISUType = VISU::TMESH;
- else if ( !aComment.compare(QString("SCALARMAP")) ) aVISUType = VISU::TSCALARMAP;
- else if ( !aComment.compare(QString("PRSMERGER")) ) aVISUType = VISU::TSCALARMAP;
- else if ( !aComment.compare(QString("ISOSURFACE")) ) aVISUType = VISU::TISOSURFACE;
- else if ( !aComment.compare(QString("DEFORMEDSHAPE")) ) aVISUType = VISU::TDEFORMEDSHAPE;
- else if ( !aComment.compare(QString("SCALARMAPONDEFORMEDSHAPE")) ) aVISUType = VISU::TSCALARMAPONDEFORMEDSHAPE;
- else if ( !aComment.compare(QString("GAUSSPOINTS")) ) aVISUType = VISU::TGAUSSPOINTS;
- else if ( !aComment.compare(QString("PLOT3D")) ) aVISUType = VISU::TPLOT3D;
- else if ( !aComment.compare(QString("CUTPLANES")) ) aVISUType = VISU::TCUTPLANES;
- else if ( !aComment.compare(QString("CUTLINES")) ) aVISUType = VISU::TCUTLINES;
- else if ( !aComment.compare(QString("VECTORS")) ) aVISUType = VISU::TVECTORS;
- else if ( !aComment.compare(QString("STREAMLINES")) ) aVISUType = VISU::TSTREAMLINES;
- else if ( !aComment.compare(QString("VISUGEN")) ) aVISUType = VISU::TVISUGEN;
- else if ( !aComment.compare(QString("VIEWMANAGER")) ) aVISUType = VISU::TVIEWMANAGER;
- else if ( !aComment.compare(QString("RESULT")) ) aVISUType = VISU::TRESULT;
- else if ( !aComment.compare(QString("XYPLOT")) ) aVISUType = VISU::TXYPLOT;
- else if ( !aComment.compare(QString("TABLEVIEW,")) ) aVISUType = VISU::TTABLEVIEW;
- else if ( !aComment.compare(QString("VIEW3D")) ) aVISUType = VISU::TVIEW3D;
- else if ( !aComment.compare(QString("GAUSSVIEW")) ) aVISUType = VISU::TGAUSSVIEW;
- else if ( !aComment.compare(QString("ENTITY")) ) aVISUType = VISU::TENTITY;
- else if ( !aComment.compare(QString("FAMILY")) ) aVISUType = VISU::TFAMILY;
- else if ( !aComment.compare(QString("PART")) ) aVISUType = VISU::TPART; // MULTIPR
- else if ( !aComment.compare(QString("GROUP")) ) aVISUType = VISU::TGROUP;
- else if ( !aComment.compare(QString("FIELD")) ) aVISUType = VISU::TFIELD;
- else if ( !aComment.compare(QString("TIMESTAMP")) ) aVISUType = VISU::TTIMESTAMP;
- else if ( !aComment.compare(QString("ANIMATION")) ) aVISUType = VISU::TANIMATION;
- else if ( !aComment.compare(QString("ALL")) ) aVISUType = VISU::TALL;
- else
- if (MYDEBUG) MESSAGE("Error : Unknown type of VISU object!");
- }
- QString aNewStr = aStr;
- aAttComment->SetValue( aNewStr.replace( QRegExp( QString("myType=") + aType ) ,
- QString("myType=") + QString::number(aVISUType) ).latin1() );
- }
- }
+ CORBA::String_var aValue = aAttComment->Value();
+ std::string aString = Storable::CorrectPersistentString(aValue.in());
+ aAttComment->SetValue( aString.c_str() );
}
}
}
//---------------------------------------------------------------
VISU::Storable*
VISU::IsoSurfaces_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- if(!TSuperClass::Restore(theStudy, theMap))
+ if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
SetNbSurfaces(VISU::Storable::FindValue(theMap,"myNbSurface").toInt());
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
virtual
myMeshPL->SetUnstructuredGridIDMapper(anIDMapper);
+ string anEntry = GetCResult()->GetEntry(aComment.latin1());
+ if(anEntry == "")
+ throw std::runtime_error("Mesh_i::Build - anEntry was not found !!!");
+ SALOMEDS::SObject_var aSObject = GetStudyDocument()->FindObjectID(anEntry.c_str());
+
if(!theRestoring) { //Setting IOR on the label
myMeshPL->Init();
string aResultEntry = GetCResult()->GetEntry();
- string anEntry = GetCResult()->GetEntry(aComment.latin1());
- if(anEntry == "")
- throw std::runtime_error("Mesh_i::Build - anEntry was not found !!!");
- SALOMEDS::SObject_var aSObject = GetStudyDocument()->FindObjectID(anEntry.c_str());
SALOMEDS::StudyBuilder_var aStudyBuilder = GetStudyDocument()->NewBuilder();
SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aSObject,"AttributeIOR");
SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
SALOMEDS::GenericAttribute_var anAttr;
SALOMEDS::AttributePixMap_var aPixmap;
- anAttr = aStudyBuilder->FindOrCreateAttribute(GetSObject(), "AttributePixMap");
+ anAttr = aStudyBuilder->FindOrCreateAttribute(aSObject, "AttributePixMap");
aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
aPixmap->SetPixMap("ICON_TREE_MESH");
//----------------------------------------------------------------------------
VISU::Storable*
VISU::Mesh_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- if(!TSuperClass::Restore(theStudy, theMap))
+ if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
myEntity = VISU::Storable::FindValue(theMap,"myEntity").toInt();//jfa IPAL9284
const Storable::TRestoringMap& theMap)
{
Mesh_i* aMesh = new Mesh_i();
- SALOMEDS::Study_var aStudy = theSObject->GetStudy();
- return aMesh->Restore(aStudy, theMap);
+ return aMesh->Restore(theSObject, theMap);
}
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
static
//---------------------------------------------------------------
VISU::Storable*
VISU::Plot3D_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- if(!TSuperClass::Restore(theStudy, theMap))
+ if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
SetOrientation(VISU::Plot3D::Orientation(VISU::Storable::FindValue(theMap,"myBasePlane").toInt()),
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
virtual
::Prs3d_i() :
PrsObject_i(SALOMEDS::Study::_nil()),
myActorCollection(vtkActorCollection::New()),
- myIsActiveSatate(true),
- myIsRestored(true)
+ myIsActiveSatate(true)
{
if(MYDEBUG) MESSAGE("Prs3d_i::Prs3d_i - this = "<<this);
myOffset[0] = myOffset[1] = myOffset[2] = 0;
//----------------------------------------------------------------------------
VISU::Storable*
VISU::Prs3d_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- SetStudyDocument(theStudy);
- SetResultEntry(VISU::Storable::FindValue(theMap,"myResultEntry").latin1());
+ SALOMEDS::Study_var aStudy = theSObject->GetStudy();
+ SetStudyDocument(aStudy);
+
+ bool anIsExists = false;
+ QString aResultEntry = VISU::Storable::FindValue(theMap,"myResultEntry", &anIsExists);
+ if(!anIsExists){
+ SALOMEDS::SObject_var aSObject = SALOMEDS::SObject::_duplicate(theSObject);
+ for(; aSObject->Depth() > 2 && !aResultEntry.isEmpty(); aSObject = aSObject->GetFather()){
+ CORBA::Object_var anObject = VISU::SObjectToObject(aSObject);
+ if(CORBA::is_nil(anObject))
+ continue;
+ VISU::Result_var aResult = VISU::Result::_narrow(anObject);
+ if(CORBA::is_nil(aResult))
+ continue;
+ CORBA::String_var anEntry = aSObject->GetID();
+ aResultEntry = anEntry.in();
+ }
+ }
+ SetResultEntry(aResultEntry.latin1());
if(!GetCResult())
return NULL;
return this;
}
-//----------------------------------------------------------------------------
-void
-VISU::Prs3d_i
-::SaveRestoringState(SALOMEDS::Study_ptr theStudy,
- const Storable::TRestoringMap& theMap)
-{
- myRestoringStudy = SALOMEDS::Study::_duplicate(theStudy);
- myRestoringMap = theMap;
- myIsRestored = false;
-}
-
-//----------------------------------------------------------------------------
-void
-VISU::Prs3d_i
-::InitFromRestoringState()
-{
- if(!myIsRestored){
- Restore(myRestoringStudy, myRestoringMap);
- myIsRestored = true;
- }
-}
-
//----------------------------------------------------------------------------
void
VISU::Prs3d_i
//! To restore paramters of the instance from Storable::TRestoringMap
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
- //! To keep restoring params till the explicit Restore() call
- void
- SaveRestoringState(SALOMEDS::Study_ptr theStudy,
- const Storable::TRestoringMap& theMap);
-
- //! To restore the presentation according to the saved state
- void
- InitFromRestoringState();
-
//----------------------------------------------------------------------------
//! Get corresponding SALOMEDS::SObject
virtual
GetActorEntry();
private:
- bool myIsRestored;
- SALOMEDS::Study_var myRestoringStudy;
- Storable::TRestoringMap myRestoringMap;
-
void
SetResultEntry(const std::string& theResultEntry);
//---------------------------------------------------------------
VISU::Storable*
VISU::ScalarMapOnDeformedShape_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- if(!TSuperClass::Restore(theStudy, theMap))
+ if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
QString aMeshName = VISU::Storable::FindValue(theMap,"myScalarMeshName");
//! Redefines VISU_ColoredPrs3d_i::Restore
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
static const std::string myComment;
//----------------------------------------------------------------------------
VISU::Storable*
VISU::ScalarMap_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- if(!TSuperClass::Restore(theStudy, theMap))
+ if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
SetScaling(VISU::Scaling(VISU::Storable::FindValue(theMap,"myScaling").toInt()));
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
virtual
//---------------------------------------------------------------
VISU::Storable*
VISU::StreamLines_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- if(!TSuperClass::Restore(theStudy, theMap))
+ if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
double anIntegrationStep = VISU::Storable::FindValue(theMap,"myIntegrationStep").toDouble();
//! Extends VISU_ColoredPrs3d_i::Restore
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
//! Extends VISU_ColoredPrs3d_i::Update
continue;
generatePresentations(getNbFields()-1);
- if (!aPrsObj->FindAttribute(anAttr, "AttributeString")) continue;
+ if (!aPrsObj->FindAttribute(anAttr, "AttributeString"))
+ continue;
_PTR(AttributeString) aPrsComment (anAttr);
string aPrsComm = aPrsComment->Value();
if (aPrsComm.length() > 0) {
VISU::Storable::TRestoringMap aPrsMap;
VISU::Storable::StrToMap(strPrsIn,aPrsMap);
- aData.myPrs[0]->Restore(VISU::GetDSStudy(myStudy), aPrsMap);
+ aData.myPrs[0]->Restore(VISU::GetSObject(aPrsObj), aPrsMap);
}
aData.myPrs[0]->GetOffset(aData.myOffset);
for (int i = 1; i < aData.myNbFrames; i++) {
//---------------------------------------------------------------
VISU::Storable*
VISU::Vectors_i
-::Restore(SALOMEDS::Study_ptr theStudy,
+::Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap)
{
- if(!TSuperClass::Restore(theStudy, theMap))
+ if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
SetGlyphType(VISU::Vectors::GlyphType(VISU::Storable::FindValue(theMap,"myTypeGlyph").toInt()));
//! Redefines VISU_ColoredPrs3d_i::Restore
virtual
Storable*
- Restore(SALOMEDS::Study_ptr theStudy,
+ Restore(SALOMEDS::SObject_ptr theSObject,
const Storable::TRestoringMap& theMap);
static const std::string myComment;