Back to index

salome-paravis  6.5.0
vtkMedLink.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 __vtkMedLink_h_
00021 #define __vtkMedLink_h_
00022 
00023 #include "vtkObject.h"
00024 #include "vtkMed.h"
00025 
00026 #include <string>
00027 #include <map>
00028 
00029 class vtkMedString;
00030 
00031 class VTK_EXPORT vtkMedLink: public vtkObject
00032 {
00033 public:
00034   static vtkMedLink* New();
00035   vtkTypeRevisionMacro(vtkMedLink, vtkObject);
00036   void PrintSelf(ostream& os, vtkIndent indent);
00037 
00038   // Description:
00039   // the index of this field in the med file.
00040   vtkSetMacro(MedIterator, med_int);
00041   vtkGetMacro(MedIterator, med_int);
00042 
00043   // Description:
00044   // Set the name of the mesh linked to.
00045   vtkSetStringMacro(MeshName);
00046   vtkGetStringMacro(MeshName);
00047 
00048   // Description:
00049   // Set the name of the file this link points to.
00050   vtkSetStringMacro(Link);
00051   vtkGetStringMacro(Link);
00052 
00053   // Description:
00054   // returns the full path to the linked file.
00055   // If the Link is already a full path, it is returned.
00056   // If the directory is a relative path, the returned path is the
00057   // concatenation of the directory where the
00058   // original file is in and the Link.
00059   const char* GetFullLink(const char* originalFileName);
00060 
00061   // Description:
00062   // this stores the iterator that should be used when unmounting this link
00063   void  SetMountedIterator(med_class, med_int);
00064   med_int GetMountedIterator(med_class);
00065 
00066 protected:
00067   vtkMedLink();
00068   virtual ~vtkMedLink();
00069 
00070   med_int MedIterator;
00071   char* MeshName;
00072   char * Link;
00073 
00074   std::string FullLinkPath;
00075 
00076   // BTX
00077   std::map<med_class, int> Status;
00078   std::map<med_class, med_int> MountedIterator;
00079   //ETX
00080 
00081 private:
00082   vtkMedLink(const vtkMedLink&); // Not implemented.
00083   void operator=(const vtkMedLink&); // Not implemented.
00084 
00085 };
00086 
00087 #endif //__vtkMedLink_h_