From b7d6002e7ec256a7ce3de09a658f777e2f9b5758 Mon Sep 17 00:00:00 2001 From: apo Date: Wed, 4 Jul 2007 07:57:19 +0000 Subject: [PATCH] 1. To introduce self introspection methods for VISU::Result IDL interface 2. To introduce Get/SetResolution methods for VISU::Result to support VISU MULTIPR extension --- idl/VISU_Gen.idl | 115 ++++++-- src/VISU_I/VISU_MultiResult_i.cc | 456 +++++++++++++++++++++---------- src/VISU_I/VISU_MultiResult_i.hh | 42 ++- src/VISU_I/VISU_ResultUtils.cc | 73 +++-- src/VISU_I/VISU_ResultUtils.hh | 22 ++ src/VISU_I/VISU_Result_i.cc | 295 ++++++++++++++++++-- src/VISU_I/VISU_Result_i.hh | 59 +++- 7 files changed, 808 insertions(+), 254 deletions(-) diff --git a/idl/VISU_Gen.idl b/idl/VISU_Gen.idl index 5bc063ed..85c6d1a1 100644 --- a/idl/VISU_Gen.idl +++ b/idl/VISU_Gen.idl @@ -57,12 +57,13 @@ module VISU { * This enumeration contains a set of elements defining the * type of the %entity (topological units) constituting a mesh. */ - enum Entity{ NODE, /*!< Node corresponds to a geometrical point. */ - EDGE, /*!< Edge corresponds to a geometrical line connecting two points. */ - FACE, /*!< Face corresponds to a geometrical plane bounded by several lines. */ - CELL, /*!< Cell is a volumic element of a mesh */ - NONE /*!< Indicates undefined entity value */ - }; + enum Entity { + NODE, /*!< Node corresponds to a geometrical point. */ + EDGE, /*!< Edge corresponds to a geometrical line connecting two points. */ + FACE, /*!< Face corresponds to a geometrical plane bounded by several lines. */ + CELL, /*!< Cell is a volumic element of a mesh */ + NONE /*!< Indicates undefined entity value */ + }; /*! * This enumeration contains a set of elements defining the type of the %VISU object. @@ -1335,7 +1336,8 @@ module VISU { *
Time stamp represents a subfield: the results * of calculations are taken in one definite moment. */ - interface Animation : Base { + interface Animation : Base + { /*! * This enumeration contains a set of available animation modes. */ @@ -1549,13 +1551,15 @@ module VISU { void ApplyProperties(in long theFieldNum, in ColoredPrs3d thePrs); }; + /*! \brief Interface %Result * * This interface serves for inner representation of data generated * in other sources (MED object or file). This data is needed * for further construction of graphical presentations. */ - interface Result : RemovableObject, SALOME::GenericObj { + interface Result : RemovableObject, SALOME::GenericObj + { /*! Reads all data from the corresponding sources. By default the data is loaded on demand. */ boolean BuildAll(); @@ -1583,6 +1587,58 @@ module VISU { /*! Allow to check is min / max calculation over field's components already perfrormed or not */ boolean IsMinMaxDone(); + + /*! Allow to check is corresponding multi resolution structure already loaded or not */ + boolean IsPartsDone(); + + typedef sequence Entities; + + typedef string EntityName; + + typedef sequence EntityNames; + + typedef long TimeStampNumber; + + typedef sequence TimeStampNumbers; + + enum Resolution { + FULL, + MEDIUM, + LOW, + HIDDEN + }; + + typedef sequence Resolutions; + + /*! Gets existing mesh names */ + EntityNames GetMeshNames(); + + /*! Gets existing mesh entites for the given mesh name */ + Entities GetEntities(in EntityName theMeshName); + + /*! Gets existing families for the given mesh name and entity */ + EntityNames GetFamilies(in EntityName theMeshName, in Entity theEntity); + + /*! Gets existing families for the given mesh name */ + EntityNames GetGroups(in EntityName theMeshName); + + /*! Gets existing fields for the given mesh name and entity */ + EntityNames GetFields(in EntityName theMeshName, in Entity theEntity); + + /*! Gets existing fields for the given mesh name, entity and name of field */ + TimeStampNumbers GetTimeStampNumbers(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName); + + /*! Gets existing parts of multi resolution structure for the given mesh name */ + EntityNames GetParts(in EntityName theMeshName); + + /*! Gets available resolutions of multi resolution structure for the given mesh and part names */ + Resolutions GetResolutions(in EntityName theMeshName, in EntityName thePartName); + + /*! Gets current resolution of multi resolution structure for the given mesh and part names */ + Resolution GetResolution(in EntityName theMeshName, in EntityName thePartName); + + /*! Gets current resolution of multi resolution structure for the given mesh and part names */ + void SetResolution(in EntityName theMeshName, in EntityName thePartName, in Resolution theResolution); }; //------------------------------------------------------- @@ -1594,7 +1650,8 @@ module VISU { * post-processing presentations from given %Result and %Table object reference, * using the views provided by %ViewManager. */ - interface VISU_Gen : Engines::Component, SALOMEDS::Driver, Base { + interface VISU_Gen : Engines::Component, SALOMEDS::Driver, Base + { /*! Sets a definite study to be current. */ void SetCurrentStudy(in SALOMEDS::Study theStudy); @@ -1704,11 +1761,11 @@ module VISU { * \param theMeshName One of the meshes presented in MED file * \param theEntity Type of entity where the field is defined * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector. - * \param theIteration Number of iteration on the field + * \param theTimeStampNumber Number of iteration on the field */ ScalarMap ScalarMapOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, - in long theIteration); + in long theTimeStampNumber); /*! * Creates a Gauss Points presentation. @@ -1716,11 +1773,11 @@ module VISU { * \param theMeshName One of the meshes presented in MED file * \param theEntity Type of entity where the field is defined * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector. - * \param theIteration Number of iteration on the field + * \param theTimeStampNumber Number of iteration on the field */ GaussPoints GaussPointsOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, - in long theIteration); + in long theTimeStampNumber); /*! * Creates a deformed shape presentation. @@ -1728,11 +1785,11 @@ module VISU { * \param theMeshName One of the meshes presented in MED file * \param theEntity Type of entity where the field is defined * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector. - * \param theIteration Number of iteration on the field + * \param theTimeStampNumber Number of iteration on the field */ DeformedShape DeformedShapeOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, - in long theIteration); + in long theTimeStampNumber); /*! * Creates a deformed shape presentation. @@ -1740,11 +1797,11 @@ module VISU { * \param theMeshName One of the meshes presented in MED file * \param theEntity Type of entity where the field is defined * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector. - * \param theIteration Number of iteration on the field + * \param theTimeStampNumber Number of iteration on the field */ ScalarMapOnDeformedShape ScalarMapOnDeformedShapeOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, - in long theIteration); + in long theTimeStampNumber); /*! * Creates a vector presentation. @@ -1752,11 +1809,11 @@ module VISU { * \param theMeshName One of the meshes presented in MED file * \param theEntity Type of entity where the field is defined * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector. - * \param theIteration Number of iteration on the field + * \param theTimeStampNumber Number of iteration on the field */ Vectors VectorsOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, - in long theIteration); + in long theTimeStampNumber); /*! * Creates an iso surface presentation. @@ -1764,11 +1821,11 @@ module VISU { * \param theMeshName One of the meshes presented in MED file * \param theEntity Type of entity where the field is defined * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector. - * \param theIteration Number of iteration on the field + * \param theTimeStampNumber Number of iteration on the field */ IsoSurfaces IsoSurfacesOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, - in long theIteration); + in long theTimeStampNumber); /*! * Creates an stream lines presentation. @@ -1776,11 +1833,11 @@ module VISU { * \param theMeshName One of the meshes presented in MED file * \param theEntity Type of entity where the field is defined * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector. - * \param theIteration Number of iteration on the field + * \param theTimeStampNumber Number of iteration on the field */ StreamLines StreamLinesOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, - in long theIteration); + in long theTimeStampNumber); /*! * Creates a presentation of cut planes. @@ -1788,11 +1845,11 @@ module VISU { * \param theMeshName One of the meshes presented in MED file * \param theEntity Type of entity where the field is defined * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector. - * \param theIteration Number of iteration on the field + * \param theTimeStampNumber Number of iteration on the field */ CutPlanes CutPlanesOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, - in long theIteration); + in long theTimeStampNumber); /*! * Creates a presentation of cut lines. @@ -1800,11 +1857,11 @@ module VISU { * \param theMeshName One of the meshes presented in MED file * \param theEntity Type of entity where the field is defined * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector. - * \param theIteration Number of iteration on the field + * \param theTimeStampNumber Number of iteration on the field */ CutLines CutLinesOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, - in long theIteration); + in long theTimeStampNumber); /*! * Creates a Plot3D presentation. @@ -1812,11 +1869,11 @@ module VISU { * \param theMeshName One of the meshes presented in MED file * \param theEntity Type of entity where the field is defined * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector. - * \param theIteration Number of iteration on the field + * \param theTimeStampNumber Number of iteration on the field */ Plot3D Plot3DOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, - in long theIteration); + in long theTimeStampNumber); /*! * Creates a table presentation. diff --git a/src/VISU_I/VISU_MultiResult_i.cc b/src/VISU_I/VISU_MultiResult_i.cc index 1b5af1c6..794fbe96 100644 --- a/src/VISU_I/VISU_MultiResult_i.cc +++ b/src/VISU_I/VISU_MultiResult_i.cc @@ -30,9 +30,9 @@ #include "VISU_ResultUtils.hh" #include "VISU_Convertor.hxx" +#include "VISU_ConvertorUtils.hxx" #include "MULTIPR_API.hxx" -#include "MULTIPR_Obj.hxx" #include "SALOMEDS_Tool.hxx" @@ -47,8 +47,10 @@ #ifdef _DEBUG_ static int MYDEBUG = 1; +static int MYTIMEDEBUG = 0; #else static int MYDEBUG = 0; +static int MYTIMEDEBUG = 0; #endif @@ -109,101 +111,114 @@ namespace VISU //--------------------------------------------------------------- - typedef std::set TSubParts; - typedef std::map TMain2SubParts; - inline - std::string - GetResolutions(const TMain2SubParts& theMain2SubParts, + MultiResult_i::TResolutions + GetResolutions(const MultiResult_i::TMainPart2SubParts& theMainPart2SubParts, const std::string& thePartName) { - std::string aResolution = "F"; + MultiResult_i::TResolutions aResolutions; + aResolutions.insert(VISU::Result::FULL); MultiResult_i::TPartName aMainPart = ExtractMainPart(thePartName); - TMain2SubParts::const_iterator anIter = theMain2SubParts.find(aMainPart); - if(anIter != theMain2SubParts.end()){ - const TSubParts& aSubParts = anIter->second; + MultiResult_i::TMainPart2SubParts::const_iterator anIter = theMainPart2SubParts.find(aMainPart); + if(anIter != theMainPart2SubParts.end()){ + const MultiResult_i::TSubParts& aSubParts = anIter->second; if(aSubParts.find(aMainPart + "_LOW") != aSubParts.end()) - aResolution += "L"; + aResolutions.insert(VISU::Result::LOW); if(aSubParts.find(aMainPart + "_MED") != aSubParts.end()) - aResolution += "M"; + aResolutions.insert(VISU::Result::MEDIUM); + } + return aResolutions; + } + + + std::string + Resolutions2String(const MultiResult_i::TResolutions& theResolutions) + { + std::string aResult; + MultiResult_i::TResolutions::const_iterator anIter = theResolutions.begin(); + for(; anIter != theResolutions.end(); anIter++){ + VISU::Result::Resolution aResolution = *anIter; + if(aResolution == VISU::Result::FULL) + aResult += "F"; + if(aResolution == VISU::Result::LOW) + aResult += "L"; + if(aResolution == VISU::Result::MEDIUM) + aResult += "M"; } - return aResolution; + return aResult; } //--------------------------------------------------------------- inline - MultiResult_i::TResolutionID - GetResolutionID(const TMain2SubParts& theMain2SubParts, + VISU::Result::Resolution + GetResolution(const MultiResult_i::TMainPart2SubParts& theMainPart2SubParts, const std::string& thePartName) { - std::string aResolutions = GetResolutions(theMain2SubParts, - thePartName); - if(aResolutions.find('L') != std::string::npos) - return 'L'; + MultiResult_i::TResolutions aResolutions = GetResolutions(theMainPart2SubParts, thePartName); - if(aResolutions.find('M') != std::string::npos) - return 'M'; + if(aResolutions.find(VISU::Result::LOW) != aResolutions.end()) + return VISU::Result::LOW; - return 'F'; + if(aResolutions.find(VISU::Result::MEDIUM) != aResolutions.end()) + return VISU::Result::MEDIUM; + + return VISU::Result::FULL; } //--------------------------------------------------------------- inline std::string - GetIconName(const TMain2SubParts& theMain2SubParts, + GetIconName(const MultiResult_i::TMainPart2SubParts& theMainPart2SubParts, const std::string& thePartName) { - MultiResult_i::TResolutionID aResolutionID = GetResolutionID(theMain2SubParts, - thePartName); - if(aResolutionID == 'L') + VISU::Result::Resolution aResolution = GetResolution(theMainPart2SubParts, + thePartName); + if(aResolution == VISU::Result::LOW) return "ICON_MULTIPR_VIEW_LOW"; - if(aResolutionID == 'M') + if(aResolution == VISU::Result::MEDIUM) return "ICON_MULTIPR_VIEW_MEDIUM"; return "ICON_MULTIPR_VIEW_FULL"; } - //--------------------------------------------------------------- + //---------------------------------------------------------------------------- void BuildParts(Result_i* theResult, Result_i::PInput theInput, - const QFileInfo& theMultiFileInfo, + multipr::Obj* theMultiprObj, MultiResult_i::TPartInfos* thePartInfos, MultiResult_i::TPartName2FileName* thePartName2FileName, - MultiResult_i::TPartName2ResolutionID* thePartName2ResolutionID, + MultiResult_i::TPartName2Resolution* thePartName2Resolution, + MultiResult_i::TMainPart2SubParts* theMainPart2SubParts, CORBA::Boolean* theIsDone, CORBA::Boolean theIsBuild, _PTR(Study) theStudy) { if(!theIsBuild || *theIsDone) return; - - // if MED file is not a distributed MED file (created with MULTIPR), - // then it is not necessary to build parts - if (theMultiFileInfo.filePath().isEmpty()) - return; - + + TTimerLog aTimerLog(MYTIMEDEBUG, "BuildParts"); + TResultManager aResultManager(theResult); + TTransactionManager aTransactionManager(theStudy); + try { - multipr::Obj aMultiprObj; - aMultiprObj.create(theMultiFileInfo.filePath().latin1()); - if (aMultiprObj.isValidDistributedMEDFile()) { + multipr::Obj& aMultiprObj = *theMultiprObj; const VISU::TMeshMap& aMeshMap = theInput->GetMeshMap(); VISU::TMeshMap::const_iterator aMeshMapIter = aMeshMap.begin(); const VISU::PMesh& aMesh = aMeshMapIter->second; - - typedef std::vector TParts; - TParts aParts = aMultiprObj.getParts(); - + + MultiResult_i::TParts aParts = aMultiprObj.getParts(); + QString aComment = "Sub-parts: #"; aComment += QString::number(aParts.size()); - + CreateAttributes(theStudy, aMesh->myPartsEntry, NO_ICON, @@ -212,24 +227,24 @@ namespace VISU NO_PERFSITENT_REF, aComment.latin1(), false); - - MultiResult_i::TPartInfos& myPartInfos = *thePartInfos; + + MultiResult_i::TPartInfos& aPartInfos = *thePartInfos; MultiResult_i::TPartName2FileName& aPartName2FileName = *thePartName2FileName; - MultiResult_i::TPartName2ResolutionID& aPartName2ResolutionID = *thePartName2ResolutionID; - - TMain2SubParts aMain2SubParts; - + MultiResult_i::TPartName2Resolution& aPartName2Resolution = *thePartName2Resolution; + + MultiResult_i::TMainPart2SubParts& aMainPart2SubParts = *theMainPart2SubParts; + for (size_t aPartID = 0 ; aPartID < aParts.size() ; aPartID++) { const MultiResult_i::TPartName& aPartName = aParts[aPartID]; MultiResult_i::TPartName aMainPart = ExtractMainPart(aPartName); - aMain2SubParts[aMainPart].insert(aPartName); + aMainPart2SubParts[aMainPart].insert(aPartName); } - + std::string aLastEntry; for (size_t aPartID = 0 ; aPartID < aParts.size() ; aPartID++) { const MultiResult_i::TPartName& aPartName = aParts[aPartID]; std::string aStringInfo = aMultiprObj.getPartInfo(aPartName.c_str()); - + MultiResult_i::TPartInfo aPartInfo; std::istrstream anOutputStream(aStringInfo.c_str()); anOutputStream>>(aPartInfo.myMeshName); @@ -237,19 +252,20 @@ namespace VISU anOutputStream>>(aPartInfo.myName); anOutputStream>>(aPartInfo.myPath); anOutputStream>>(aPartInfo.myFileName); - + QFileInfo aFileInfo(aPartInfo.myFileName.c_str()); - myPartInfos[aFileInfo.fileName()] = aPartInfo; - + aPartInfos[aFileInfo.fileName()] = aPartInfo; + aPartName2FileName[aPartInfo.myName] = aPartInfo.myFileName; - + QString aComment = ""; - std::string aResoltutions = GetResolutions(aMain2SubParts, aPartInfo.myName); + MultiResult_i::TResolutions aResoltutions = GetResolutions(aMainPart2SubParts, aPartInfo.myName); + std::string aResoltutionsString = Resolutions2String(aResoltutions); if ( IsFullResolution(aPartInfo.myName) ) { - std::string anIconName = GetIconName(aMain2SubParts, aPartInfo.myName); - MultiResult_i::TResolutionID aResolutionID = GetResolutionID(aMain2SubParts, aPartInfo.myName); - aComment.sprintf("myComment=PART;myFile=%s;myResolutions=%s;myState=%c", - aPartInfo.myFileName.c_str(), aResoltutions.c_str(), aResolutionID); + std::string anIconName = GetIconName(aMainPart2SubParts, aPartInfo.myName); + VISU::Result::Resolution aResolution = GetResolution(aMainPart2SubParts, aPartInfo.myName); + aComment.sprintf("myComment=PART;myMeshName=%s;myFile=%s;myResolutions=%s;myState=%c", + aPartInfo.myMeshName.c_str(), aPartInfo.myFileName.c_str(), aResoltutionsString.c_str(), aResolution); aLastEntry = CreateAttributes(theStudy, aMesh->myPartsEntry, anIconName, @@ -258,10 +274,10 @@ namespace VISU NO_PERFSITENT_REF, aComment.latin1(), true); - aPartName2ResolutionID[aPartInfo.myName] = aResolutionID; + aPartName2Resolution[aPartInfo.myName] = aResolution; } else { - aComment.sprintf("myComment=PART;myFile=%s;myResolutions=%s", - aPartInfo.myFileName.c_str(), aResoltutions.c_str()); + aComment.sprintf("myComment=PART;myMeshName=%s;myFile=%s;myResolutions=%s", + aPartInfo.myMeshName.c_str(), aPartInfo.myFileName.c_str(), aResoltutionsString.c_str()); CreateAttributes(theStudy, aLastEntry, NO_ICON, @@ -272,20 +288,73 @@ namespace VISU true); } } - } else { - INFOS("invalid distributed MED file"); - } - *theIsDone = true; + + *theIsDone = true; }catch(std::exception& exc){ - INFOS("Follow exception was occured :\n"<StudyId(), theIsDone)); } + //--------------------------------------------------------------- + struct TBuildPartsArgs + { + Result_i* myResult; + Result_i::PInput myInput; + multipr::Obj* myMultiprObj; + MultiResult_i::TPartInfos* myPartInfos; + MultiResult_i::TPartName2FileName* myPartName2FileName; + MultiResult_i::TPartName2Resolution* myPartName2Resolution; + MultiResult_i::TMainPart2SubParts* myMainPart2SubParts; + CORBA::Boolean* myIsDone; + CORBA::Boolean myIsBuild; + _PTR(Study) myStudy; + + TBuildPartsArgs(Result_i* theResult, + Result_i::PInput theInput, + multipr::Obj* theMultiprObj, + MultiResult_i::TPartInfos* thePartInfos, + MultiResult_i::TPartName2FileName* thePartName2FileName, + MultiResult_i::TPartName2Resolution* thePartName2Resolution, + MultiResult_i::TMainPart2SubParts* theMainPart2SubParts, + CORBA::Boolean* theIsDone, + CORBA::Boolean theIsBuild, + _PTR(Study) theStudy): + myResult(theResult), + myInput(theInput), + myMultiprObj(theMultiprObj), + myPartInfos(thePartInfos), + myPartName2FileName(thePartName2FileName), + myPartName2Resolution(thePartName2Resolution), + myMainPart2SubParts(theMainPart2SubParts), + myIsDone(theIsDone), + myIsBuild(theIsBuild), + myStudy(theStudy) + {} + }; + + + //---------------------------------------------------------------------------- + void + BuildParts(const TBuildPartsArgs& theArgs) + { + BuildParts(theArgs.myResult, + theArgs.myInput, + theArgs.myMultiprObj, + theArgs.myPartInfos, + theArgs.myPartName2FileName, + theArgs.myPartName2Resolution, + theArgs.myMainPart2SubParts, + theArgs.myIsDone, + theArgs.myIsBuild, + theArgs.myStudy); + } + + //--------------------------------------------------------------- } @@ -333,10 +402,11 @@ VISU::MultiResult_i if(theIsAtOnce){ BuildParts(this, GetInput(), - myMultiFileInfo, + &myMultiprObj, &myPartInfos, &myPartName2FileName, - &myPartName2ResolutionID, + &myPartName2Resolution, + &myMainPart2SubParts, &myIsPartsDone, myIsBuildParts, myStudy); @@ -361,16 +431,18 @@ VISU::MultiResult_i myIsBuildParts, myStudy); { - boost::thread aThread(boost::bind(&BuildParts, - this, - GetInput(), - myMultiFileInfo, - &myPartInfos, - &myPartName2FileName, - &myPartName2ResolutionID, - &myIsPartsDone, - myIsBuildParts, - myStudy)); + TBuildPartsArgs anArgs(this, + GetInput(), + &myMultiprObj, + &myPartInfos, + &myPartName2FileName, + &myPartName2Resolution, + &myMainPart2SubParts, + &myIsPartsDone, + myIsBuildParts, + myStudy); + + boost::thread aThread(boost::bind(&BuildParts, anArgs)); } { boost::thread aThread(boost::bind(&BuildGroups, @@ -402,29 +474,11 @@ VISU::MultiResult_i QFileInfo aFileInfo(theFileName); QString aTargetFileName = aFileInfo.filePath(); if(aTargetFileName.endsWith("_grains_maitre.med")){ - // retrieve source MED file (sequential MED file) - FILE* aFile = fopen(theFileName, "rt"); - QString aSourceFileName(""); - char aBuf[1024]; - while (!feof(aFile)) { - fgets(aBuf, 1024, aFile); - char* strTag = NULL; - if ((aBuf[0] == '#') && ((strTag = strstr(aBuf, "[SOURCE]=")) != NULL)) { - char aFileName[256]; - int ret = sscanf(strTag, "[SOURCE]=%s", aFileName); - if (ret == 1) { - aSourceFileName = aFileName; - break; - } - } + myMultiprObj.create(theFileName); + if (myMultiprObj.isValidDistributedMEDFile()) { + aTargetFileName = myMultiprObj.getSequentialMEDFilename(); + myIsBuildParts = true; } - fclose(aFile); - if (aSourceFileName.isEmpty()) - throw std::runtime_error("distributed MED file; bad format"); - - myMultiFileInfo.setFile(theFileName); - aTargetFileName = aSourceFileName; - myIsBuildParts = true; } return TSuperClass::Create(aTargetFileName); @@ -439,11 +493,11 @@ VISU::MultiResult_i TSuperClass::ToStream(theStr); std::ostringstream aPartNames, aResolutions; - TPartName2ResolutionID::const_iterator anIter = myPartName2ResolutionID.begin(); - for ( ; anIter != myPartName2ResolutionID.end() ; anIter++) { + TPartName2Resolution::const_iterator anIter = myPartName2Resolution.begin(); + for ( ; anIter != myPartName2Resolution.end() ; anIter++) { const TPartName& aPartName = anIter->first; aPartNames<second; + const VISU::Result::Resolution& aResolution = anIter->second; aResolutions<second; - std::string aFileName = anInput->GetName(); - if(MYDEBUG) MESSAGE("'"<>aMeshName; + if(aMeshName == theMeshName) + aMeshParts.push_back(aPartName); + } + + VISU::Result::EntityNames_var aResult = new VISU::Result::EntityNames(); + if(aMeshParts.empty()) + return aResult._retn(); + + aResult->length(aMeshParts.size()); + for (size_t aPartID = 0 ; aPartID < aMeshParts.size() ; aPartID++) { + const MultiResult_i::TPartName& aPartName = aMeshParts[aPartID]; + aResult[aPartID] = aPartName.c_str(); } + + return aResult._retn(); } +VISU::Result::Resolutions* +VISU::MultiResult_i +::GetResolutions(const char* theMeshName, + const char* thePartName) +{ + VISU::Result::Resolutions_var aResult = new VISU::Result::Resolutions(); + MultiResult_i::TParts aParts = myMultiprObj.getParts(); + for (size_t aPartID = 0 ; aPartID < aParts.size() ; aPartID++) { + const MultiResult_i::TPartName& aPartName = aParts[aPartID]; + MultiResult_i::TPartName aMainPart = ExtractMainPart(thePartName); + if(aMainPart != thePartName) + continue; + + std::string aStringInfo = myMultiprObj.getPartInfo(aPartName.c_str()); + std::istrstream anOutputStream(aStringInfo.c_str()); + + TMeshName aMeshName; + anOutputStream>>aMeshName; + if(aMeshName != theMeshName) + continue; + + MultiResult_i::TResolutions aResolutions = VISU::GetResolutions(myMainPart2SubParts, thePartName); + if(aResolutions.empty()) + return aResult._retn(); + + aResult->length(aResolutions.size()); + MultiResult_i::TResolutions::const_iterator anIter = aResolutions.end(); + for(size_t anId = 0; anIter != aResolutions.end(); anIter++, anId++){ + const VISU::Result::Resolution& aResolution = *anIter; + aResult[anId] = aResolution; + } -//--------------------------------------------------------------- -void + break; + } + + return aResult._retn(); +} + +VISU::Result::Resolution +VISU::MultiResult_i +::GetResolution(const char* theMeshName, + const char* thePartName) +{ + TPartName2Resolution::iterator anIter = myPartName2Resolution.find(thePartName); + if(anIter == myPartName2Resolution.end()) + return VISU::Result::HIDDEN; + + const VISU::Result::Resolution& aResolution = anIter->second; + return aResolution; +} + +void VISU::MultiResult_i -::SetResolution(const std::string& thePartName, - TResolutionID theNewResolution) +::SetResolution(const char* theMeshName, + const char* thePartName, + VISU::Result::Resolution theResolution) { if(!IsFullResolution(thePartName)) return; - TPartName2FileName::iterator anIter = myPartName2FileName.find(thePartName); - if(anIter == myPartName2FileName.end()) + TPartName2Resolution::iterator anIter = myPartName2Resolution.find(thePartName); + VISU::Result::Resolution& aResolution = anIter->second; + if(aResolution == theResolution) return; - TResolutionID& aNewResolution = myPartName2ResolutionID[thePartName]; - if(aNewResolution == theNewResolution) + TPartName2FileName::iterator aFileNameIter = myPartName2FileName.find(thePartName); + if(aFileNameIter == myPartName2FileName.end()) return; - - aNewResolution = theNewResolution; + const TFileName& aFileName = aFileNameIter->second; VISU::Storable::TRestoringMap aRestoringMap; - const TFileName& aFileName = anIter->second; aRestoringMap["myComment"] = "PART"; + aRestoringMap["myMeshName"] = theMeshName; aRestoringMap["myFile"] = aFileName; - std::string aFatherEntry = GetEntry(aRestoringMap); + + const VISU::TMeshMap& aMeshMap = Result_i::GetInput()->GetMeshMap(); + VISU::TMeshMap::const_iterator aMeshIter = aMeshMap.find(theMeshName); + if(aMeshIter == aMeshMap.end()) + return; + + const VISU::PMesh& aMesh = aMeshIter->second; + std::string aFatherEntry = Storable::FindEntry(GetStudyDocument(), + aMesh->myPartsEntry, + aRestoringMap); std::string anIconName = "ICON_MULTIPR_VIEW_HIDE"; - if(theNewResolution == 'F') + if(theResolution == VISU::Result::FULL) anIconName = "ICON_MULTIPR_VIEW_FULL"; - else if(theNewResolution == 'M') + else if(theResolution == VISU::Result::MEDIUM) anIconName = "ICON_MULTIPR_VIEW_MEDIUM"; - else if(theNewResolution == 'L') + else if(theResolution == VISU::Result::LOW) anIconName = "ICON_MULTIPR_VIEW_LOW"; _PTR(Study) aStudy = GetStudy(); @@ -546,8 +682,9 @@ VISU::MultiResult_i std::ostrstream anOutputStream; anOutputStream<<"myComment=PART;"; anOutputStream<<"myFile="<second; + std::string aFileName = anInput->GetName(); + if(MYDEBUG) MESSAGE("'"<first; if(IsFullResolution(aPartName)){ - const MultiResult_i::TResolutionID& aResolutionID = anIter->second; - if(aResolutionID == 'F') + const VISU::Result::Resolution& aResolution = anIter->second; + if(aResolution == VISU::Result::FULL) UpdateRepresentationKey(thePartName2FileName, aRepresentationKey, aPartName); - if(aResolutionID == 'M') + if(aResolution == VISU::Result::MEDIUM) UpdateRepresentationKey(thePartName2FileName, aRepresentationKey, aPartName + "_MED"); - else if(aResolutionID == 'L') + else if(aResolution == VISU::Result::LOW) UpdateRepresentationKey(thePartName2FileName, aRepresentationKey, aPartName + "_LOW"); } } @@ -606,17 +762,17 @@ namespace VISU //--------------------------------------------------------------- bool UseInitialInput(const MultiResult_i::TPartName2FileName& thePartName2FileName, - const MultiResult_i::TPartName2ResolutionID& thePartName2ResolutionID) + const MultiResult_i::TPartName2Resolution& thePartName2Resolution) { bool aResult = true; MultiResult_i::TPartName2FileName::const_iterator anIter = thePartName2FileName.begin(); for ( ; anIter != thePartName2FileName.end() ; anIter++) { const MultiResult_i::TPartName& aPartName = anIter->first; if(IsFullResolution(aPartName)){ - MultiResult_i::TPartName2ResolutionID::const_iterator anIter2 = thePartName2ResolutionID.find(aPartName); - if(anIter2 != thePartName2ResolutionID.end()){ - const MultiResult_i::TResolutionID& aResolutionID = anIter2->second; - if(aResolutionID == 'F') + MultiResult_i::TPartName2Resolution::const_iterator anIter2 = thePartName2Resolution.find(aPartName); + if(anIter2 != thePartName2Resolution.end()){ + const VISU::Result::Resolution& aResolution = anIter2->second; + if(aResolution == VISU::Result::FULL) continue; } aResult = false; @@ -642,11 +798,11 @@ VISU::MultiResult_i if(!myIsPartsDone) // If corresponding data is not ready yet return TSuperClass::GetInput(); - if(UseInitialInput(myPartName2FileName, myPartName2ResolutionID)) + if(UseInitialInput(myPartName2FileName, myPartName2Resolution)) return TSuperClass::GetInput(); MultiResult_i::TRepresentationKey aRepresentationKey = - GetRepresentation(myPartName2FileName, myPartName2ResolutionID); + GetRepresentation(myPartName2FileName, myPartName2Resolution); typedef std::vector TFileNames; TFileNames aFileNames(aRepresentationKey.begin(), aRepresentationKey.end()); diff --git a/src/VISU_I/VISU_MultiResult_i.hh b/src/VISU_I/VISU_MultiResult_i.hh index fe100b8c..40961be7 100644 --- a/src/VISU_I/VISU_MultiResult_i.hh +++ b/src/VISU_I/VISU_MultiResult_i.hh @@ -33,6 +33,7 @@ # define RESULT_CLASS_NAME MultiResult_i #include "VISU_Result_i.hh" +#include "MULTIPR_Obj.hxx" #include @@ -61,11 +62,34 @@ namespace VISU CORBA::Boolean IsDone(); - typedef std::string TMeshName; + virtual + VISU::Result::EntityNames* + GetParts(const char* theMeshName); + + virtual + VISU::Result::Resolutions* + GetResolutions(const char* theMeshName, + const char* thePartName); + + virtual + VISU::Result::Resolution + GetResolution(const char* theMeshName, + const char* thePartName); + + virtual + void + SetResolution(const char* theMeshName, + const char* thePartName, + VISU::Result::Resolution theResolution); + + typedef std::string TPartName; + typedef std::vector TParts; + typedef size_t TPartID; typedef std::string TPath; typedef std::string TFileName; + typedef std::string TMeshName; struct TPartInfo { @@ -80,15 +104,20 @@ namespace VISU TPartInfos myPartInfos; typedef std::map TPartName2FileName; - typedef std::map TPartName2ResolutionID; + typedef std::map TPartName2Resolution; + typedef std::set TResolutions; typedef std::set TRepresentationKey; typedef std::map TRepresentation2Input; + typedef std::set TSubParts; + typedef std::map TMainPart2SubParts; + private: - QFileInfo myMultiFileInfo; + multipr::Obj myMultiprObj; TPartName2FileName myPartName2FileName; - TPartName2ResolutionID myPartName2ResolutionID; + TPartName2Resolution myPartName2Resolution; + TMainPart2SubParts myMainPart2SubParts; TRepresentation2Input myRepresentation2Input; @@ -128,11 +157,6 @@ namespace VISU VISU::Entity theEntity = VISU::NONE, const std::string& theFieldName = "", CORBA::Long theTimeStampNumber = -1); - - virtual - void - SetResolution(const std::string& theName, - TResolutionID theNewResolution); // 'F'=FULL 'M'=MEDIUM 'L'=LOW 'H'=HIDE }; } diff --git a/src/VISU_I/VISU_ResultUtils.cc b/src/VISU_I/VISU_ResultUtils.cc index 82bcfdc2..afab2a86 100644 --- a/src/VISU_I/VISU_ResultUtils.cc +++ b/src/VISU_I/VISU_ResultUtils.cc @@ -52,6 +52,41 @@ namespace VISU static TMutex myMutex; + //---------------------------------------------------------------------------- + TResultManager + ::TResultManager(Result_i* theResult): + myResult(theResult) + { + myResult->Register(); + } + + + //---------------------------------------------------------------------------- + TResultManager + ::~TResultManager() + { + myResult->Destroy(); + } + + + //---------------------------------------------------------------------------- + TTransactionManager + ::TTransactionManager(_PTR(Study) theStudyDocument): + myStudyBuilder(theStudyDocument->NewBuilder()) + { + TLock aLock(myMutex); + myStudyBuilder->NewCommand(); + } + + + //---------------------------------------------------------------------------- + TTransactionManager + ::~TTransactionManager() + { + TLock aLock(myMutex); + myStudyBuilder->CommitCommand(); + } + //---------------------------------------------------------------------------- TUpdateObjBrowser @@ -88,44 +123,6 @@ namespace VISU } - //---------------------------------------------------------------------------- - struct TResultManager - { - Result_i* myResult; - - TResultManager(Result_i* theResult): - myResult(theResult) - { - myResult->Register(); - } - - ~TResultManager() - { - myResult->Destroy(); - } - }; - - - //---------------------------------------------------------------------------- - struct TTransactionManager - { - _PTR(StudyBuilder) myStudyBuilder; - - TTransactionManager(_PTR(Study) theStudyDocument): - myStudyBuilder(theStudyDocument->NewBuilder()) - { - TLock aLock(myMutex); - myStudyBuilder->NewCommand(); - } - - ~TTransactionManager() - { - TLock aLock(myMutex); - myStudyBuilder->CommitCommand(); - } - }; - - //---------------------------------------------------------------------------- QString GenerateName(const std::string& theName) diff --git a/src/VISU_I/VISU_ResultUtils.hh b/src/VISU_I/VISU_ResultUtils.hh index 2c9b0aae..1f93c7cf 100644 --- a/src/VISU_I/VISU_ResultUtils.hh +++ b/src/VISU_I/VISU_ResultUtils.hh @@ -47,6 +47,28 @@ namespace VISU }; + //---------------------------------------------------------------------------- + struct TResultManager + { + Result_i* myResult; + + TResultManager(Result_i* theResult); + + ~TResultManager(); + }; + + + //---------------------------------------------------------------------------- + struct TTransactionManager + { + _PTR(StudyBuilder) myStudyBuilder; + + TTransactionManager(_PTR(Study) theStudyDocument); + + ~TTransactionManager(); + }; + + //---------------------------------------------------------------------------- QString GenerateName(const std::string& theName); diff --git a/src/VISU_I/VISU_Result_i.cc b/src/VISU_I/VISU_Result_i.cc index d5ab7ab5..915c63fc 100644 --- a/src/VISU_I/VISU_Result_i.cc +++ b/src/VISU_I/VISU_Result_i.cc @@ -406,19 +406,14 @@ VISU::Result_i theIsAtOnce, myStudy); - BuildFields(this, - myInput, - &myIsFieldsDone, - myIsBuildFields, - theIsAtOnce, - myStudy); - - BuildMinMax(this, - myInput, - &myIsMinMaxDone, - myIsBuildMinMax); - } - else { + BuildFieldDataTree(this, + myInput, + &myIsFieldsDone, + myIsBuildFields, + &myIsMinMaxDone, + myIsBuildMinMax, + myStudy); + } else { boost::thread aThread(boost::bind(boost::bind(&Result_i::BuildDataTree, this, _1), aResultEntry)); } @@ -853,14 +848,6 @@ VISU::Result_i } -//--------------------------------------------------------------- -void -VISU::Result_i -::SetResolution(const std::string& theName, - TResolutionID theNewResolution) -{} - - //--------------------------------------------------------------- VISU::Result_i::PInput VISU::Result_i @@ -932,6 +919,272 @@ VISU::Result_i return myIsMinMaxDone; } +CORBA::Boolean +VISU::Result_i +::IsPartsDone() +{ + return myIsPartsDone; +} + + +//--------------------------------------------------------------- +VISU::Result::EntityNames* +VISU::Result_i +::GetMeshNames() +{ + VISU::Result::EntityNames_var aResult = new VISU::Result::EntityNames(); + const VISU::TMeshMap& aMeshMap = GetInput()->GetMeshMap(); + if(aMeshMap.empty()) + return aResult._retn(); + + aResult->length(aMeshMap.size()); + VISU::TMeshMap::const_iterator anIter = aMeshMap.begin(); + for(size_t anId = 0; anIter != aMeshMap.end(); anIter++, anId++){ + const std::string& aName = anIter->first; + aResult[anId] = aName.c_str(); + } + + return aResult._retn(); +} + + +//--------------------------------------------------------------- +VISU::Result::Entities* +VISU::Result_i +::GetEntities(const char* theMeshName) +{ + VISU::Result::Entities_var anEntities = new VISU::Result::Entities(); + const VISU::TMeshMap& aMeshMap = GetInput()->GetMeshMap(); + if(aMeshMap.empty()) + return anEntities._retn(); + + VISU::TMeshMap::const_iterator anIter = aMeshMap.find(theMeshName); + if(anIter == aMeshMap.end()) + return anEntities._retn(); + + const VISU::PMesh& aMesh = anIter->second; + const VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap; + if(aMeshOnEntityMap.empty()) + return anEntities._retn(); + + { + anEntities->length(aMeshOnEntityMap.size()); + VISU::TMeshOnEntityMap::const_iterator anIter = aMeshOnEntityMap.end(); + for(size_t anId = 0; anIter != aMeshOnEntityMap.end(); anIter++, anId++){ + const VISU::TEntity& anEntity = anIter->first; + anEntities[anId] = VISU::Entity(anEntity); + } + } + + return anEntities._retn(); +} + +VISU::Result::EntityNames* +VISU::Result_i +::GetFamilies(const char* theMeshName, + VISU::Entity theEntity) +{ + VISU::Result::EntityNames_var aResult = new VISU::Result::EntityNames(); + const VISU::TMeshMap& aMeshMap = GetInput()->GetMeshMap(); + if(aMeshMap.empty()) + return aResult._retn(); + + VISU::TMeshMap::const_iterator anIter = aMeshMap.find(theMeshName); + if(anIter == aMeshMap.end()) + return aResult._retn(); + + const VISU::PMesh& aMesh = anIter->second; + const VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap; + if(aMeshOnEntityMap.empty()) + return aResult._retn(); + + { + VISU::TEntity anEntity = VISU::TEntity(theEntity); + VISU::TMeshOnEntityMap::const_iterator anIter = aMeshOnEntityMap.find(anEntity); + if(anIter == aMeshOnEntityMap.end()) + return aResult._retn(); + + const VISU::PMeshOnEntity& aMeshOnEntity = anIter->second; + const VISU::TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap; + if(aFamilyMap.empty()) + return aResult._retn(); + + { + aResult->length(aFamilyMap.size()); + VISU::TFamilyMap::const_iterator anIter = aFamilyMap.end(); + for(size_t anId = 0; anIter != aFamilyMap.end(); anIter++, anId++){ + const std::string& aName = anIter->first; + aResult[anId] = aName.c_str(); + } + } + } + + return aResult._retn(); +} + +VISU::Result::EntityNames* +VISU::Result_i +::GetGroups(const char* theMeshName) +{ + VISU::Result::EntityNames_var aResult = new VISU::Result::EntityNames(); + const VISU::TMeshMap& aMeshMap = GetInput()->GetMeshMap(); + if(aMeshMap.empty()) + return aResult._retn(); + + VISU::TMeshMap::const_iterator anIter = aMeshMap.find(theMeshName); + if(anIter == aMeshMap.end()) + return aResult._retn(); + + const VISU::PMesh& aMesh = anIter->second; + const VISU::TGroupMap& aGroupMap = aMesh->myGroupMap; + if(aGroupMap.empty()) + return aResult._retn(); + + { + aResult->length(aGroupMap.size()); + VISU::TGroupMap::const_iterator anIter = aGroupMap.end(); + for(size_t anId = 0; anIter != aGroupMap.end(); anIter++, anId++){ + const std::string& aName = anIter->first; + aResult[anId] = aName.c_str(); + } + } + + return aResult._retn(); +} + +VISU::Result::EntityNames* +VISU::Result_i +::GetFields(const char* theMeshName, + VISU::Entity theEntity) +{ + VISU::Result::EntityNames_var aResult = new VISU::Result::EntityNames(); + const VISU::TMeshMap& aMeshMap = GetInput()->GetMeshMap(); + if(aMeshMap.empty()) + return aResult._retn(); + + VISU::TMeshMap::const_iterator anIter = aMeshMap.find(theMeshName); + if(anIter == aMeshMap.end()) + return aResult._retn(); + + const VISU::PMesh& aMesh = anIter->second; + const VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap; + if(aMeshOnEntityMap.empty()) + return aResult._retn(); + + { + VISU::TEntity anEntity = VISU::TEntity(theEntity); + VISU::TMeshOnEntityMap::const_iterator anIter = aMeshOnEntityMap.find(anEntity); + if(anIter == aMeshOnEntityMap.end()) + return aResult._retn(); + + const VISU::PMeshOnEntity& aMeshOnEntity = anIter->second; + const VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap; + if(aFieldMap.empty()) + return aResult._retn(); + + { + aResult->length(aFieldMap.size()); + VISU::TFieldMap::const_iterator anIter = aFieldMap.end(); + for(size_t anId = 0; anIter != aFieldMap.end(); anIter++, anId++){ + const std::string& aName = anIter->first; + aResult[anId] = aName.c_str(); + } + } + } + + return aResult._retn(); +} + +VISU::Result::TimeStampNumbers* +VISU::Result_i +::GetTimeStampNumbers(const char* theMeshName, + VISU::Entity theEntity, + const char* theFieldName) +{ + VISU::Result::TimeStampNumbers_var aResult = new VISU::Result::TimeStampNumbers(); + const VISU::TMeshMap& aMeshMap = GetInput()->GetMeshMap(); + if(aMeshMap.empty()) + return aResult._retn(); + + VISU::TMeshMap::const_iterator anIter = aMeshMap.find(theMeshName); + if(anIter == aMeshMap.end()) + return aResult._retn(); + + const VISU::PMesh& aMesh = anIter->second; + const VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap; + if(aMeshOnEntityMap.empty()) + return aResult._retn(); + + { + VISU::TEntity anEntity = VISU::TEntity(theEntity); + VISU::TMeshOnEntityMap::const_iterator anIter = aMeshOnEntityMap.find(anEntity); + if(anIter == aMeshOnEntityMap.end()) + return aResult._retn(); + + const VISU::PMeshOnEntity& aMeshOnEntity = anIter->second; + const VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap; + if(aFieldMap.empty()) + return aResult._retn(); + + { + VISU::TFieldMap::const_iterator anIter = aFieldMap.find(theFieldName); + if(anIter == aFieldMap.end()) + return aResult._retn(); + + { + const VISU::PField& aField = anIter->second; + const VISU::TValField& aValField = aField->myValField; + if(aValField.empty()) + return aResult._retn(); + + { + aResult->length(aValField.size()); + VISU::TValField::const_iterator anIter = aValField.end(); + for(size_t anId = 0; anIter != aValField.end(); anIter++, anId++){ + const vtkIdType& aTimeStampNumber = anIter->first; + aResult[anId] = aTimeStampNumber; + } + } + } + } + } + + return aResult._retn(); +} + +VISU::Result::EntityNames* +VISU::Result_i +::GetParts(const char* theMeshName) +{ + VISU::Result::EntityNames_var aResult = new VISU::Result::EntityNames(); + return aResult._retn(); +} + +VISU::Result::Resolutions* +VISU::Result_i +::GetResolutions(const char* theMeshName, + const char* thePartName) +{ + VISU::Result::Resolutions_var aResult = new VISU::Result::Resolutions(); + return aResult._retn(); +} + +VISU::Result::Resolution +VISU::Result_i +::GetResolution(const char* theMeshName, + const char* thePartName) +{ + return VISU::Result::HIDDEN; +} + +void +VISU::Result_i +::SetResolution(const char* theMeshName, + const char* thePartName, + VISU::Result::Resolution theResolution) +{} + + //--------------------------------------------------------------- VISU::Result_i* VISU::Result_i diff --git a/src/VISU_I/VISU_Result_i.hh b/src/VISU_I/VISU_Result_i.hh index c4a14f5b..31bdfae5 100644 --- a/src/VISU_I/VISU_Result_i.hh +++ b/src/VISU_I/VISU_Result_i.hh @@ -126,6 +126,58 @@ namespace VISU CORBA::Boolean IsMinMaxDone(); + virtual + CORBA::Boolean + IsPartsDone(); + + virtual + VISU::Result::EntityNames* + GetMeshNames(); + + virtual + VISU::Result::Entities* + GetEntities(const char* theMeshName); + + virtual + VISU::Result::EntityNames* + GetFamilies(const char* theMeshName, + Entity theEntity); + + virtual + VISU::Result::EntityNames* + GetGroups(const char* theMeshName); + + virtual + VISU::Result::EntityNames* + GetFields(const char* theMeshName, + Entity theEntity); + + virtual + VISU::Result::TimeStampNumbers* + GetTimeStampNumbers(const char* theMeshName, + Entity theEntity, + const char* theFieldName); + + virtual + VISU::Result::EntityNames* + GetParts(const char* theMeshName); + + virtual + VISU::Result::Resolutions* + GetResolutions(const char* theMeshName, + const char* thePartName); + + virtual + VISU::Result::Resolution + GetResolution(const char* theMeshName, + const char* thePartName); + + virtual + void + SetResolution(const char* theMeshName, + const char* thePartName, + VISU::Result::Resolution theResolution); + virtual void UpdateObservers(); @@ -267,13 +319,6 @@ namespace VISU static const std::string myComment; - typedef char TResolutionID; - - virtual - void - SetResolution(const std::string& theName, - TResolutionID theNewResolution); - virtual PInput GetInput(const std::string& theMeshName = "", -- 2.39.2