Back to index

salome-paravis  6.5.0
vtkMedFamily.cxx
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 #include "vtkMedFamily.h"
00021 
00022 #include "vtkObjectFactory.h"
00023 #include "vtkSmartPointer.h"
00024 
00025 #include "vtkMedGroup.h"
00026 #include "vtkMedUtilities.h"
00027 
00028 vtkCxxGetObjectVectorMacro(vtkMedFamily, Group, vtkMedGroup);
00029 vtkCxxSetObjectVectorMacro(vtkMedFamily, Group, vtkMedGroup);
00030 
00031 vtkCxxRevisionMacro(vtkMedFamily, "$Revision: 1.1.4.6.2.1 $")
00032 vtkStandardNewMacro(vtkMedFamily)
00033 
00034 vtkMedFamily::vtkMedFamily()
00035 {
00036   this->Id = 0;
00037   this->Name = NULL;
00038   this->Group = new vtkObjectVector<vtkMedGroup>();
00039   this->MedIterator = -1;
00040   this->PointOrCell = vtkMedUtilities::OnPoint;
00041 
00042   // by default, the family is part of the "NoGroup" fake group
00043   this->AllocateNumberOfGroup(1);
00044   vtkMedGroup* nogroup = this->GetGroup(0);
00045   nogroup->SetName(vtkMedUtilities::NoGroupName);
00046 
00047   this->SetName("UNDEFINED_FAMILY");
00048 }
00049 
00050 vtkMedFamily::~vtkMedFamily()
00051 {
00052   this->SetName(NULL);
00053   delete this->Group;
00054 }
00055 
00056 void vtkMedFamily::PrintSelf(ostream& os, vtkIndent indent)
00057 {
00058   this->Superclass::PrintSelf(os, indent);
00059   PRINT_IVAR(os, indent, Id);
00060   PRINT_IVAR(os, indent, MedIterator);
00061   PRINT_IVAR(os, indent, PointOrCell);
00062   PRINT_OBJECT_VECTOR(os, indent, Group);
00063 }