class SalomeApp_Module;
-namespace VISU
-{
- class ColoredPrs3dCache_i;
-}
-
class VisuGUI_CacheDlg : public QDialog
{
Q_OBJECT
#include "VisuGUI_Tools.h"
#include "VisuGUI_ViewTools.h"
#include "VISU_ColoredPrs3dFactory.hh"
-#include "VISU_ColoredPrs3dCache_i.hh"
#include <vtkRenderer.h>
return this;
}
-//----------------------------------------------------------------------------
-VISU::ColoredPrs3d_i*
-VISU::
-CreateHolder2GetDeviceByEnum(VISU::VISUType theType,
- VISU::Result_ptr theResult,
- const std::string& theMeshName,
- VISU::Entity theEntity,
- const std::string& theFieldName,
- CORBA::Long theIteration)
-{
- VISU::ColoredPrs3d_i* aColoredPrs3d = NULL;
- if(Result_i* aResult = dynamic_cast<Result_i*>(GetServant(theResult).in())){
- VISU::ColoredPrs3dHolder::BasicInput anInput;
- anInput.myResult = VISU::Result::_duplicate(theResult);
- anInput.myMeshName = theMeshName.c_str();
- anInput.myEntity = theEntity;
- anInput.myFieldName = theFieldName.c_str();
- anInput.myTimeStampNumber = theIteration;
-
- SALOMEDS::Study_var aStudy = aResult->GetStudyDocument();
- VISU::ColoredPrs3dCache_var aCache = ColoredPrs3dCache_i::GetInstance(aStudy);
- VISU::ColoredPrs3dHolder_var aHolder = aCache->CreateHolder(theType, anInput);
-
- if( CORBA::is_nil(aHolder) )
- return NULL;
-
- VISU::ColoredPrs3d_var aPrs3d = aHolder->GetDevice();
- aColoredPrs3d = dynamic_cast<VISU::ColoredPrs3d_i*>(GetServant(aPrs3d).in());
- }
- return aColoredPrs3d;
-}
-
-
//----------------------------------------------------------------------------
VISU::ColoredPrs3d_i*
VISU::ColoredPrs3dCache_i
static const std::string myComment;
};
+
//----------------------------------------------------------------------------
- //! Creates ColoredPrs3dHolder by enumeration value and gets its first device
- ColoredPrs3d_i*
- CreateHolder2GetDeviceByEnum(VISU::VISUType theType,
- VISU::Result_ptr theResult,
- const std::string& theMeshName,
- VISU::Entity theEntity,
- const std::string& theFieldName,
- CORBA::Long theIteration);
-
-
- //----------------------------------------------------------------------------
- //! Creates ColoredPrs3dHolder by type and gets its first device
- template<class TColoredPrs3d_i>
- TColoredPrs3d_i*
- CreateHolder2GetDeviceByType(VISU::Result_ptr theResult,
- const std::string& theMeshName,
- VISU::Entity theEntity,
- const std::string& theFieldName,
- CORBA::Long theIteration)
- {
- typedef typename TL::TColoredType2Enum<TColoredPrs3d_i>::TResult TEnum;
- VISU::VISUType aColoredPrs3dType = VISU::VISUType(TEnum::value);
- ColoredPrs3d_i* aColoredPrs3d = CreateHolder2GetDeviceByEnum(aColoredPrs3dType,
- theResult,
- theMeshName,
- theEntity,
- theFieldName,
- theIteration);
- return dynamic_cast<TColoredPrs3d_i*>(aColoredPrs3d);
- }
-
}
#endif
// Module : VISU
#include "VISU_ColoredPrs3dFactory.hh"
+#include "VISU_ColoredPrs3dCache_i.hh"
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
#define NO_CAS_CATCH
}
return NULL;
}
+
+
+ //----------------------------------------------------------------------------
+ VISU::ColoredPrs3d_i*
+ CreateHolder2GetDeviceByEnum(VISU::VISUType theType,
+ VISU::Result_ptr theResult,
+ const std::string& theMeshName,
+ VISU::Entity theEntity,
+ const std::string& theFieldName,
+ CORBA::Long theIteration)
+ {
+ VISU::ColoredPrs3d_i* aColoredPrs3d = NULL;
+ if(Result_i* aResult = dynamic_cast<Result_i*>(GetServant(theResult).in())){
+ VISU::ColoredPrs3dHolder::BasicInput anInput;
+ anInput.myResult = VISU::Result::_duplicate(theResult);
+ anInput.myMeshName = theMeshName.c_str();
+ anInput.myEntity = theEntity;
+ anInput.myFieldName = theFieldName.c_str();
+ anInput.myTimeStampNumber = theIteration;
+
+ SALOMEDS::Study_var aStudy = aResult->GetStudyDocument();
+ VISU::ColoredPrs3dCache_var aCache = ColoredPrs3dCache_i::GetInstance(aStudy);
+ VISU::ColoredPrs3dHolder_var aHolder = aCache->CreateHolder(theType, anInput);
+
+ if( CORBA::is_nil(aHolder) )
+ return NULL;
+
+ VISU::ColoredPrs3d_var aPrs3d = aHolder->GetDevice();
+ aColoredPrs3d = dynamic_cast<VISU::ColoredPrs3d_i*>(GetServant(aPrs3d).in());
+ }
+ return aColoredPrs3d;
+ }
+
+
//----------------------------------------------------------------------------
}
typedef typename TPrs3d_i::TInterface TPrs3d;
return TPrs3d::_nil();
}
+
+
+ //----------------------------------------------------------------------------
+ //! Creates ColoredPrs3dHolder by enumeration value and gets its first device
+ ColoredPrs3d_i*
+ CreateHolder2GetDeviceByEnum(VISU::VISUType theType,
+ VISU::Result_ptr theResult,
+ const std::string& theMeshName,
+ VISU::Entity theEntity,
+ const std::string& theFieldName,
+ CORBA::Long theTimeStampNumber);
+
+
+ //----------------------------------------------------------------------------
+ //! Creates ColoredPrs3dHolder by type and gets its first device
+ template<class TColoredPrs3d_i>
+ TColoredPrs3d_i*
+ CreateHolder2GetDeviceByType(VISU::Result_ptr theResult,
+ const std::string& theMeshName,
+ VISU::Entity theEntity,
+ const std::string& theFieldName,
+ CORBA::Long theTimeStampNumber)
+ {
+ typedef typename TL::TColoredType2Enum<TColoredPrs3d_i>::TResult TEnum;
+ VISU::VISUType aColoredPrs3dType = VISU::VISUType(TEnum::value);
+ ColoredPrs3d_i* aColoredPrs3d = CreateHolder2GetDeviceByEnum(aColoredPrs3dType,
+ theResult,
+ theMeshName,
+ theEntity,
+ theFieldName,
+ theTimeStampNumber);
+ return dynamic_cast<TColoredPrs3d_i*>(aColoredPrs3d);
+ }
+
+
//----------------------------------------------------------------------------
}