if (myAllCurvesInvertedCheck->isChecked())
myPrsCopy->SetAllCurvesInverted(true);
- VISU::TSameAsFactory<VISU::TCUTLINES>().Copy(thePrs, myPrsCopy);
+ VISU::TSameAsFactory<VISU::TCUTLINES>().Copy(myPrsCopy, thePrs);
return anIsOk;
}
anIsOk &= myScalarPane->storeToPrsObject(myPrsCopy);
anIsOk &= myCutPane->storeToPrsObject(myPrsCopy);
- VISU::TSameAsFactory<VISU::TCUTPLANES>().Copy(thePrs, myPrsCopy);
+ VISU::TSameAsFactory<VISU::TCUTPLANES>().Copy(myPrsCopy, thePrs);
return anIsOk;
}
myPrsCopy->SetScale(getFactor());
myPrsCopy->ShowColored(isColored());
- VISU::TSameAsFactory<VISU::TDEFORMEDSHAPE>().Copy(thePrs, myPrsCopy);
+ VISU::TSameAsFactory<VISU::TDEFORMEDSHAPE>().Copy(myPrsCopy, thePrs);
return anIsOk;
}
myPrsCopy->SetMagnification( mySizeBox->getMagnification() );
myPrsCopy->SetMagnificationIncrement( mySizeBox->getIncrement() );
- VISU::TSameAsFactory<VISU::TGAUSSPOINTS>().Copy(thePrs, myPrsCopy);
+ VISU::TSameAsFactory<VISU::TGAUSSPOINTS>().Copy(myPrsCopy, thePrs);
return anIsOk;
}
anIsOk &= myScalarPane->storeToPrsObject( myPrsCopy );
anIsOk &= myIsoPane->storeToPrsObject( myPrsCopy );
- VISU::TSameAsFactory<VISU::TISOSURFACES>().Copy(thePrs, myPrsCopy);
+ VISU::TSameAsFactory<VISU::TISOSURFACES>().Copy(myPrsCopy, thePrs);
return anIsOk;
}
anIsOk &= myScalarPane->storeToPrsObject( myPrsCopy );
anIsOk &= myIsoPane->storeToPrsObject( myPrsCopy );
- VISU::TSameAsFactory<VISU::TPLOT3D>().Copy(thePrs, myPrsCopy);
+ VISU::TSameAsFactory<VISU::TPLOT3D>().Copy(myPrsCopy, thePrs);
return anIsOk;
}
int anIsOk = myInputPane->storeToPrsObject( myPrsCopy );
anIsOk &= myScalarPane->storeToPrsObject( myPrsCopy );
- VISU::TSameAsFactory<VISU::TSCALARMAP>().Copy(thePrs, myPrsCopy);
+ VISU::TSameAsFactory<VISU::TSCALARMAP>().Copy(myPrsCopy, thePrs);
return anIsOk;
}
if(myUpdateScalars)
SetScalarField( false );
- VISU::TSameAsFactory<VISU::TSCALARMAPONDEFORMEDSHAPE>().Copy(thePrs, myPrsCopy);
+ VISU::TSameAsFactory<VISU::TSCALARMAPONDEFORMEDSHAPE>().Copy(myPrsCopy, thePrs);
return anIsOk;
}
// tr("ERR_CANT_BUILD_PRESENTATION"),
// tr("BUT_OK"));
- VISU::TSameAsFactory<VISU::TSTREAMLINES>().Copy(thePrs, myPrsCopy);
+ VISU::TSameAsFactory<VISU::TSTREAMLINES>().Copy(myPrsCopy, thePrs);
return anIsOk;
}
} else
myPrsCopy->SetGlyphType(VISU::Vectors::NONE);
- VISU::TSameAsFactory<VISU::TVECTORS>().Copy(thePrs, myPrsCopy);
+ VISU::TSameAsFactory<VISU::TVECTORS>().Copy(myPrsCopy, thePrs);
return anIsOk;
}
GenericObjPtr&
operator=(TGenericObj* thePointer)
{
- GenericObjPtr(thePointer).swap(*this);
+ GenericObjPtr aTmp(thePointer);
+ aTmp.swap(*this);
return *this;
}
GenericObjPtr&
operator=(const GenericObjPtr& thePointer)
{
- GenericObjPtr(thePointer).swap(*this);
+ GenericObjPtr aTmp(thePointer);
+ aTmp.swap(*this);
return *this;
}
#include CORBA_SERVER_HEADER(SALOMEDS)
#include "VISU_I.hxx"
+#include "SALOME_GenericObjPointer.hh"
#include "VISU_ScalarMapOnDeformedShape_i.hh"
#include "VISU_Plot3D_i.hh"
#include "VISU_GaussPoints_i.hh"
typedef typename TL::TColoredEnum2Type<colored_prs3d_type_enum>::TResult TColoredPrs3d;
void
- Copy(ColoredPrs3d_i* theColoredPrs3dTo, ColoredPrs3d_i* theColoredPrs3dFrom)
+ Copy(ColoredPrs3d_i* theColoredPrs3dFrom, ColoredPrs3d_i* theColoredPrs3dTo)
{
theColoredPrs3dTo->SetCResult(theColoredPrs3dFrom->GetCResult());
theColoredPrs3dTo->SetMeshName(theColoredPrs3dFrom->GetCMeshName().c_str());
theColoredPrs3dTo->SameAs(theColoredPrs3dFrom);
}
- TColoredPrs3d*
+ SALOME::GenericObjPtr<TColoredPrs3d>
Create(ColoredPrs3d_i* theColoredPrs3d,
ColoredPrs3d_i::EPublishInStudyMode thePublishInStudyMode)
{
- TColoredPrs3d* aSameColoredPrs3d = new TColoredPrs3d(thePublishInStudyMode);
- Copy(aSameColoredPrs3d, theColoredPrs3d);
+ SALOME::GenericObjPtr<TColoredPrs3d> aSameColoredPrs3d(new TColoredPrs3d(thePublishInStudyMode));
+ Copy(theColoredPrs3d, aSameColoredPrs3d);
+ aSameColoredPrs3d->Destroy();
return aSameColoredPrs3d;
}
};
return aResult;
try{
bool anIsEstimated = true;
- VISU::Result_i::PInput anInput = theResult->GetInput(theMeshName,
- theEntity,
- theFieldName,
- theTimeStampNumber);
+ VISU::Result_i::PInput anInput = theResult->GetInput();
size_t aSize = anInput->GetTimeStampOnGaussPtsSize(theMeshName,
(VISU::TEntity)theEntity,
theFieldName,
#include <strstream>
+#ifdef _DEBUG_
+static int MYDEBUG = 1;
+#else
+static int MYDEBUG = 0;
+#endif
+
namespace VISU
{
VISU::MultiResult_i
::~MultiResult_i()
{
- //cout<<"MultiResult_i::~MultiResult_i - '"<<myRepresentation2Input.size()<<"' - "<<endl;
+ if(MYDEBUG) MESSAGE("MultiResult_i::~MultiResult_i - this = "<<this<<": "<<myRepresentation2Input.size());
TRepresentation2Input::iterator anIter = myRepresentation2Input.begin();
for ( ; anIter != myRepresentation2Input.end() ; anIter++) {
const PInput& anInput = anIter->second;
std::string aFileName = anInput->GetName();
- //cout<<"'"<<aFileName<<"'; "<<endl;
+ if(MYDEBUG) MESSAGE("'"<<aFileName<<"'; ");
QFileInfo aFileInfo(aFileName.c_str());
QFile(aFileInfo.absFilePath()).remove();
QDir().rmdir(aFileInfo.dirPath(TRUE));
TRepresentation2Input::iterator anIter = myRepresentation2Input.find(aRepresentationKey);
if(anIter == myRepresentation2Input.end()){
std::string aFileName = SALOMEDS_Tool::GetTmpDir() + "tmp.med";
- //cout<<"MultiResult_i::GetInput - '"<<aFileName<<"' - "<<endl;
- {
+ if(MYDEBUG){
+ MESSAGE("MultiResult_i::GetInput - '"<<aFileName<<"': ");
TFileNames::const_iterator anIter = aFileNames.begin();
for ( ; anIter != aFileNames.end() ; anIter++) {
const MultiResult_i::TFileName& aFileName = *anIter;
- //cout<<"'"<<aFileName<<"'; "<<endl;
+ MESSAGE("'"<<aFileName<<"'; ");
}
}
int aRes = multipr::merge(aFileNames, theMeshName.c_str(), theFieldName.c_str(), aFileName.c_str());
- //cout<<"aRes = "<<aRes<<endl;
+ if(MYDEBUG) MESSAGE("aRes = "<<aRes);
if (aRes == 0) {
QFile(aFileName.c_str()).remove();
throw std::runtime_error("empty mesh");
#include <boost/bind.hpp>
#ifdef _DEBUG_
-static int MYDEBUG = 0;
+static int MYDEBUG = 1;
#else
static int MYDEBUG = 0;
#endif
VISU::Prs3d_i
::SetCResult(VISU::Result_i* theResult)
{
- VISU::Result_i* aResult = GetCResult();
- if(aResult != theResult){
- if(aResult)
- aResult->Destroy();
- if(theResult){
- theResult->Register();
+ if(GetCResult() != theResult){
+ if(theResult)
SetStudyDocument(theResult->GetStudyDocument());
- }
myResult = theResult;
myParamsTime.Modified();
}
VISU::ScalarMap_i
::DoSetInput(bool theIsInitilizePipe, bool theReInit)
{
- VISU::Result_i::PInput anInput = GetCResult()->GetInput();
+ VISU::Result_i::PInput anInput = GetCResult()->GetInput(GetCMeshName(),
+ GetEntity(),
+ GetCFieldName(),
+ GetTimeStampNumber());
if(!anInput)
throw std::runtime_error("Mesh_i::Build - GetCResult()->GetInput() == NULL !!!");