Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkGenericAttributeCollection.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkGenericAttributeCollection.h,v $
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 =========================================================================*/
00035 #ifndef __vtkGenericAttributeCollection_h
00036 #define __vtkGenericAttributeCollection_h
00037 
00038 #include "vtkObject.h"
00039 
00040 class vtkGenericAttributeInternalVector;
00041 class vtkGenericAttribute;
00042 
00043 class VTK_FILTERING_EXPORT vtkGenericAttributeCollection : public vtkObject
00044 {
00045 public:
00047   static vtkGenericAttributeCollection *New();
00048   
00050 
00051   vtkTypeRevisionMacro(vtkGenericAttributeCollection,vtkObject);
00052   virtual void PrintSelf(ostream& os, vtkIndent indent);
00054   
00058   int GetNumberOfAttributes();
00059   
00062   int GetNumberOfComponents();
00063   
00067   int GetMaxNumberOfComponents();
00068   
00072   unsigned long GetActualMemorySize();
00073   
00076   int IsEmpty();
00077   
00081   vtkGenericAttribute *GetAttribute(int i);
00082  
00087   int FindAttribute(const char *name);
00088   
00093   void InsertNextAttribute(vtkGenericAttribute *a);
00094 
00099   void InsertAttribute(int i, vtkGenericAttribute *a);
00100 
00104   void RemoveAttribute(int i);
00105 
00107   void Reset();
00108 
00112   void DeepCopy(vtkGenericAttributeCollection *other);
00113   
00117   void ShallowCopy(vtkGenericAttributeCollection *other);
00118   
00121   virtual unsigned long int GetMTime();
00122   
00123   // *** ALL THE FOLLOWING METHODS SHOULD BE REMOVED WHEN when the 
00124   // new pipeline update mechanism is checked in.
00125   // *** BEGIN
00126 
00128 
00131   vtkGetMacro(ActiveAttribute, int);
00133   
00135 
00138   vtkGetMacro(ActiveComponent, int);
00140 
00147   void SetActiveAttribute(int attribute, int component = 0);
00148   
00150 
00152   vtkGetMacro(NumberOfAttributesToInterpolate, int);
00154 
00155   //BTX
00157 
00160   int *GetAttributesToInterpolate();
00161   //ETX
00163   
00167   int HasAttribute(int size, int *attributes, int attribute);
00168 
00170 
00176   void SetAttributesToInterpolate(int size, int *attributes);
00177   void SetAttributesToInterpolateToAll();
00179 
00180 protected:
00182   vtkGenericAttributeCollection();
00183 
00185   virtual ~vtkGenericAttributeCollection();
00186 
00188   vtkGenericAttributeInternalVector* AttributeInternalVector;
00189 
00190   int ActiveAttribute;
00191   int ActiveComponent;
00192   int NumberOfAttributesToInterpolate;
00193   int AttributesToInterpolate[10];
00194   
00195   int NumberOfComponents; // cache
00196   int MaxNumberOfComponents; // cache
00197   unsigned long ActualMemorySize; // cache
00198   vtkTimeStamp ComputeTime; // cache time stamp
00199 
00202   void ComputeNumbers();
00203   
00204 private:
00205   vtkGenericAttributeCollection(const vtkGenericAttributeCollection &);  // Not implemented.
00206   void operator=(const vtkGenericAttributeCollection &);  // Not implemented.
00207 };
00208 #endif