vtkMEDReader::~vtkMEDReader()
{
delete this->Internal;
+ this->Internal = 0;
}
void vtkMEDReader::Reload(int a)
int vtkMEDReader::GetServerModifTime()
{
+ if( !this->Internal )
+ return -1;
return this->Internal->MyMTime;
}
void vtkMEDReader::GenerateVectors(int val)
{
+ if ( !this->Internal )
+ return;
+
if(this->Internal->FileName.empty())
{//pvsm mode
this->Internal->PK.pushGenerateVectorsValue(val);
void vtkMEDReader::ChangeMode(int newMode)
{
+ if ( !this->Internal )
+ return;
+
if(this->Internal->FileName.empty())
{//pvsm mode
this->Internal->PK.pushChangeModeValue(newMode);
void vtkMEDReader::SetFileName(const char *fname)
{
+ if(!this->Internal)
+ return;
try
{
this->Internal->FileName=fname;
char *vtkMEDReader::GetFileName()
{
+ if (!this->Internal)
+ return 0;
return const_cast<char *>(this->Internal->FileName.c_str());
}
void vtkMEDReader::SetFieldsStatus(const char* name, int status)
{
+ if( !this->Internal )
+ return;
+
//this->Internal->_wonderful_set.insert(name);
if(this->Internal->FileName.empty())
{//pvsm mode
const char *vtkMEDReader::GetFieldsTreeArrayName(int index)
{
+ if(!this->Internal)
+ return 0;
return this->Internal->Tree.getNameOfC(index);
//std::cerr << "vtkMEDReader::GetFieldsTreeArrayName(" << index << ") called ! " << ret << std::endl;
}
int vtkMEDReader::GetFieldsTreeArrayStatus(const char *name)
{
+ if(!this->Internal)
+ return -1;
+
int zeId(this->Internal->Tree.getIdHavingZeName(name));
int ret(this->Internal->Tree.getStatusOf(zeId));
return ret;
void vtkMEDReader::SetTimesFlagsStatus(const char *name, int status)
{
+ if (!this->Internal)
+ return;
+
if(this->Internal->FileName.empty())
{//pvsm mode
this->Internal->PK.pushTimesFlagsStatusEntry(name,status);
int vtkMEDReader::GetTimesFlagsArrayStatus(const char *name)
{
+ if(!this->Internal)
+ return -1;
int pos(0);
std::istringstream iss(name); iss >> pos;
return (int)this->Internal->TK.getTimesFlagArray()[pos].first;
void vtkMEDReader::UpdateSIL(vtkInformation *info)
{
if(!this->Internal)
- return ;
+ return;
vtkMutableDirectedGraph *sil(vtkMutableDirectedGraph::New());
std::string meshName(this->BuildSIL(sil));
if(meshName!=this->Internal->DftMeshName)
*/
std::string vtkMEDReader::BuildSIL(vtkMutableDirectedGraph* sil)
{
+ if (!this->Internal)
+ return std::string();
sil->Initialize();
vtkSmartPointer<vtkVariantArray> childEdge(vtkSmartPointer<vtkVariantArray>::New());
childEdge->InsertNextValue(0);
double vtkMEDReader::PublishTimeStepsIfNeeded(vtkInformation *outInfo, bool& isUpdated)
{
+ if(!this->Internal)
+ return 0.0;
+
int lev0(-1);
std::vector<double> tsteps;
if(!this->Internal->IsStdOrMode)
void vtkMEDReader::FillMultiBlockDataSetInstance(vtkMultiBlockDataSet *output, double reqTS)
{
+ if( !this->Internal )
+ return;
std::string meshName;
vtkDataSet *ret(this->Internal->Tree.buildVTKInstance(this->Internal->IsStdOrMode,reqTS,meshName,this->Internal->TK));
if(this->Internal->GenerateVect)