return false;
}
+void MEDFileFieldRepresentationLeaves::dumpState(std::map<std::string,bool>& status) const
+{
+ for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it=_arrays.begin();it!=_arrays.end();it++)
+ status[(*it).getZeName()]=(*it).getStatus();
+}
+
bool MEDFileFieldRepresentationLeaves::isActivated() const
{
for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it=_arrays.begin();it!=_arrays.end();it++)
os << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" << std::endl;
}
+std::map<std::string,bool> MEDFileFieldRepresentationTree::dumpState() const
+{
+ std::map<std::string,bool> ret;
+ for(std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > >::const_iterator it0=_data_structure.begin();it0!=_data_structure.end();it0++)
+ for(std::vector< std::vector< MEDFileFieldRepresentationLeaves > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
+ for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+ (*it2).dumpState(ret);
+ return ret;
+}
+
void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms, ParaMEDMEM::MEDFileFields *ret)
{
if(!ret)
#include "vtkType.h"
#include <vector>
+#include <map>
class vtkQuadratureSchemeDefinition;
class vtkMutableDirectedGraph;
void computeFullNameInLeaves(const std::string& tsName, const std::string& meshName, const std::string& comSupStr) const;
bool containId(int id) const;
bool containZeName(const char *name, int& id) const;
+ void dumpState(std::map<std::string,bool>& status) const;
bool isActivated() const;
void printMySelf(std::ostream& os) const;
void activateAllArrays() const;
std::vector<double> getTimeSteps(int& lev0, const TimeKeeper& tk) const;
vtkDataSet *buildVTKInstance(bool isStdOrMode, double timeReq, std::string& meshName, const TimeKeeper& tk) const;
void printMySelf(std::ostream& os) const;
+ std::map<std::string,bool> dumpState() const;
//non const methods
void loadMainStructureOfFile(const char *fileName, bool isMEDOrSauv, int iPart, int nbOfParts);
void removeEmptyLeaves();
#include "MEDFileFieldRepresentationTree.hxx"
+#include <map>
#include <string>
#include <vector>
#include <sstream>
// The property keeper is usable only in pvsm mode.
PropertyKeeper PK;
int MyMTime;
- std::set<std::string> _wonderful_set;// this set is used by SetFieldsStatus method to detect the fact that SetFieldsStatus has been called for all items ! Great !
+ std::set<std::string> _wonderful_set;// this set is used by SetFieldsStatus method to detect the fact that SetFieldsStatus has been called for all items ! Great Items are not sorted ! Why ?
+ std::map<std::string,bool> _wonderful_ref;// this map stores the state before a SetFieldsStatus status.
private:
unsigned char FirstCall0;
};
this->Internal->PK.pushFieldStatusEntry(name,status);
return ;
}
+ if(this->Internal->_wonderful_set.empty())
+ this->Internal->_wonderful_ref=this->Internal->Tree.dumpState();// start of SetFieldsStatus serie -> store ref to compare at the end of the SetFieldsStatus serie.
this->Internal->_wonderful_set.insert(name);
//not pvsm mode (general case)
try
this->Internal->Tree.changeStatusOfAndUpdateToHaveCoherentVTKDataSet(this->Internal->Tree.getIdHavingZeName(name),status);
if(this->Internal->_wonderful_set.size()==GetNumberOfFieldsTreeArrays())
{
- if(!this->Internal->PluginStart0())
+ if(this->Internal->_wonderful_ref!=this->Internal->Tree.dumpState())
{
- this->Modified();
+ if(!this->Internal->PluginStart0())
+ {
+ this->Modified();
+ }
+ this->Internal->MyMTime++;
}
- this->Internal->MyMTime++;
this->Internal->_wonderful_set.clear();
}
}