Back to index

salome-paravis  6.5.0
vtkMedProfile.h
Go to the documentation of this file.
00001 // Copyright (C) 2010-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef __vtkMedProfile_h_
00021 #define __vtkMedProfile_h_
00022 
00023 #include "vtkObject.h"
00024 #include "vtkMed.h"
00025 
00026 class vtkMedIntArray;
00027 class vtkMedString;
00028 class vtkMedFile;
00029 
00030 class VTK_EXPORT vtkMedProfile : public vtkObject
00031 {
00032 public :
00033   static vtkMedProfile* New();
00034   vtkTypeRevisionMacro(vtkMedProfile, vtkObject)
00035   void PrintSelf(ostream& os, vtkIndent indent);
00036 
00037   // Description:
00038   // This is the number of elements of this profile
00039   vtkSetMacro(NumberOfElement, vtkIdType);
00040   vtkGetMacro(NumberOfElement, vtkIdType);
00041 
00042   // Description:
00043   // The name of the profile in the file
00044   vtkGetStringMacro(Name);
00045   vtkSetStringMacro(Name);
00046 
00047   // Description:
00048   // Allocate and clear memory of this profil.
00049   virtual void  SetIds(vtkMedIntArray*);
00050   vtkGetObjectMacro(Ids, vtkMedIntArray);
00051 
00052   // Description:
00053   // return true if the index array is not null and the size match
00054   virtual int IsLoaded();
00055 
00056   // Description:
00057   // The index of this field in the med file
00058   vtkSetMacro(MedIterator, med_int);
00059   vtkGetMacro(MedIterator, med_int);
00060 
00061   // Description:
00062   // Load the profile ids
00063   void  Load();
00064 
00065   // Description:
00066   // this is the file where this Profile is stored
00067   virtual void  SetParentFile(vtkMedFile*);
00068   vtkGetObjectMacro(ParentFile, vtkMedFile);
00069 
00070 protected:
00071   vtkMedProfile();
00072   virtual ~vtkMedProfile();
00073 
00074   med_int MedIterator;
00075   vtkIdType NumberOfElement;
00076   vtkMedIntArray* Ids;
00077   char* Name;
00078   med_geometry_type GeometryType;
00079   vtkMedFile* ParentFile;
00080 
00081 private:
00082   vtkMedProfile(const vtkMedProfile&); // Not implemented.
00083   void operator=(const vtkMedProfile&); // Not implemented.
00084 
00085 };
00086 
00087 #endif //__vtkMedProfil_h_