VTK
dox/Common/vtkTransformCollection.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkTransformCollection.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00026 #ifndef __vtkTransformCollection_h
00027 #define __vtkTransformCollection_h
00028 
00029 #include "vtkCollection.h"
00030 
00031 #include "vtkTransform.h" // Needed for inline methods
00032 
00033 class VTK_COMMON_EXPORT vtkTransformCollection : public vtkCollection
00034 {
00035 public:
00036   vtkTypeMacro(vtkTransformCollection,vtkCollection);
00037   static vtkTransformCollection *New();
00038 
00040   void AddItem(vtkTransform *);
00041 
00044   vtkTransform *GetNextItem();
00045 
00046   //BTX
00048 
00050   vtkTransform *GetNextTransform(vtkCollectionSimpleIterator &cookie) {
00051     return static_cast<vtkTransform *>(this->GetNextItemAsObject(cookie));};
00052   //ETX
00054 
00055 protected:
00056   vtkTransformCollection() {};
00057   ~vtkTransformCollection() {};
00058 
00059 
00060 private:
00061   // hide the standard AddItem from the user and the compiler.
00062   void AddItem(vtkObject *o)
00063     {
00064       this->vtkCollection::AddItem(o);
00065     }
00066 
00067 private:
00068   vtkTransformCollection(const vtkTransformCollection&);  // Not implemented.
00069   void operator=(const vtkTransformCollection&);  // Not implemented.
00070 };
00071 
00072 //----------------------------------------------------------------------------
00073 inline void vtkTransformCollection::AddItem(vtkTransform *t) 
00074 {
00075   this->vtkCollection::AddItem(t);
00076 }
00077 
00078 //----------------------------------------------------------------------------
00079 inline vtkTransform *vtkTransformCollection::GetNextItem() 
00080 { 
00081   return static_cast<vtkTransform *>(this->GetNextItemAsObject());
00082 }
00083 
00084 #endif