}
-//----------------------------------------------------------------------------
-template<unsigned int colored_prs3d_type_enum>
-size_t
-CheckIsPossible(const VISU::ColoredPrs3dHolder::BasicInput& theInput,
- bool theMemoryCheck)
-{
- VISU::Result_i* aResult = dynamic_cast<VISU::Result_i*>( VISU::GetServant(theInput.myResult).in() );
- std::string aMeshName = theInput.myMeshName.in();
- VISU::Entity anEntity = theInput.myEntity;
- std::string aFieldName = theInput.myFieldName.in();
- CORBA::Long aTimeStampNumber = theInput.myTimeStampNumber;
-
- typedef typename VISU::TL::TColoredEnum2Type<colored_prs3d_type_enum>::TResult TColoredPrs3d;
- return TColoredPrs3d::IsPossible(aResult,
- aMeshName,
- anEntity,
- aFieldName,
- aTimeStampNumber,
- theMemoryCheck);
-}
-
-
//----------------------------------------------------------------------------
int
VISU::ColoredPrs3dCache_i
const VISU::ColoredPrs3dHolder::BasicInput& theInput)
{
//cout << "VISU::ColoredPrs3dCache_i::IsPossible " << endl;
- size_t aMemory = 0;
- switch(theType){
- case TSCALARMAP:
- aMemory = CheckIsPossible<TSCALARMAP>(theInput, true);
- break;
- case TGAUSSPOINTS:
- aMemory = CheckIsPossible<TGAUSSPOINTS>(theInput, true);
- break;
- case TDEFORMEDSHAPE:
- aMemory = CheckIsPossible<TDEFORMEDSHAPE>(theInput, true);
- break;
- case TSCALARMAPONDEFORMEDSHAPE:
- aMemory = CheckIsPossible<TSCALARMAPONDEFORMEDSHAPE>(theInput, true);
- break;
- case TISOSURFACE:
- aMemory = CheckIsPossible<TISOSURFACE>(theInput, true);
- break;
- case TSTREAMLINES:
- aMemory = CheckIsPossible<TSTREAMLINES>(theInput, true);
- break;
- case TPLOT3D:
- aMemory = CheckIsPossible<TPLOT3D>(theInput, true);
- break;
- case TCUTPLANES:
- aMemory = CheckIsPossible<TCUTPLANES>(theInput, true);
- break;
- case TCUTLINES:
- aMemory = CheckIsPossible<TCUTLINES>(theInput, true);
- break;
- case TVECTORS:
- aMemory = CheckIsPossible<TVECTORS>(theInput, true);
- break;
- }
+ size_t aMemory = VISU::CheckIsPossible(theType, theInput, true);
+
if(aMemory > 0){
if(GetMemoryMode() == VISU::ColoredPrs3dCache::LIMITED){
CORBA::Float aMemoryUsed = GetMemorySize();
}
+ //----------------------------------------------------------------------------
+ size_t
+ CheckIsPossible(VISU::VISUType theType,
+ const VISU::ColoredPrs3dHolder::BasicInput& theInput,
+ bool theMemoryCheck)
+ {
+ size_t aMemory = 0;
+ switch(theType){
+ case TSCALARMAP:
+ aMemory = CheckIsPossible<TSCALARMAP>(theInput, theMemoryCheck);
+ break;
+ case TGAUSSPOINTS:
+ aMemory = CheckIsPossible<TGAUSSPOINTS>(theInput, theMemoryCheck);
+ break;
+ case TDEFORMEDSHAPE:
+ aMemory = CheckIsPossible<TDEFORMEDSHAPE>(theInput, theMemoryCheck);
+ break;
+ case TSCALARMAPONDEFORMEDSHAPE:
+ aMemory = CheckIsPossible<TSCALARMAPONDEFORMEDSHAPE>(theInput, theMemoryCheck);
+ break;
+ case TISOSURFACE:
+ aMemory = CheckIsPossible<TISOSURFACE>(theInput, theMemoryCheck);
+ break;
+ case TSTREAMLINES:
+ aMemory = CheckIsPossible<TSTREAMLINES>(theInput, theMemoryCheck);
+ break;
+ case TPLOT3D:
+ aMemory = CheckIsPossible<TPLOT3D>(theInput, theMemoryCheck);
+ break;
+ case TCUTPLANES:
+ aMemory = CheckIsPossible<TCUTPLANES>(theInput, theMemoryCheck);
+ break;
+ case TCUTLINES:
+ aMemory = CheckIsPossible<TCUTLINES>(theInput, theMemoryCheck);
+ break;
+ case TVECTORS:
+ aMemory = CheckIsPossible<TVECTORS>(theInput, theMemoryCheck);
+ break;
+ }
+ return aMemory;
+ }
+
+
//----------------------------------------------------------------------------
}
theTimeStampNumber);
return dynamic_cast<TColoredPrs3d_i*>(aColoredPrs3d);
}
+
+ //----------------------------------------------------------------------------
+ //! Check is possible to create ColoredPrs3dHolder with the given input
+ size_t
+ CheckIsPossible(VISU::VISUType theType,
+ const VISU::ColoredPrs3dHolder::BasicInput& theInput,
+ bool theMemoryCheck);
+ //----------------------------------------------------------------------------
+ //! Check is possible to create ColoredPrs3dHolder with the given input
+ template<unsigned int colored_prs3d_type_enum>
+ size_t
+ CheckIsPossible(const VISU::ColoredPrs3dHolder::BasicInput& theInput,
+ bool theMemoryCheck)
+ {
+ VISU::Result_i* aResult = dynamic_cast<VISU::Result_i*>( VISU::GetServant(theInput.myResult).in() );
+ std::string aMeshName = theInput.myMeshName.in();
+ VISU::Entity anEntity = theInput.myEntity;
+ std::string aFieldName = theInput.myFieldName.in();
+ CORBA::Long aTimeStampNumber = theInput.myTimeStampNumber;
+
+ typedef typename VISU::TL::TColoredEnum2Type<colored_prs3d_type_enum>::TResult TColoredPrs3d;
+ return TColoredPrs3d::IsPossible(aResult,
+ aMeshName,
+ anEntity,
+ aFieldName,
+ aTimeStampNumber,
+ theMemoryCheck);
+ }
//----------------------------------------------------------------------------
}